👷 Fix CI build

This commit is contained in:
Edgar 2021-02-14 13:41:36 +01:00 committed by Rasmus Karlsson
parent 1f95e63aa7
commit 0fe0a58373
6 changed files with 30 additions and 32 deletions

View file

@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-20.04, macos-latest]
qt-version: [5.15.2, 5.12.10]
build-system: [qmake, cmake]
fail-fast: false
@ -53,31 +53,29 @@ jobs:
if: startsWith(matrix.os, 'windows')
uses: actions/cache@v2.1.4
with:
key: ${{ runner.os }}-conan-root-${{ hashFiles('**/conanfile-qmake.txt') }}
key: ${{ runner.os }}-conan-root-${{ hashFiles('**/conanfile.txt') }}
path: ~/.conan
- name: Cache conan packages
if: startsWith(matrix.os, 'windows')
uses: actions/cache@v2.1.4
with:
key: ${{ runner.os }}-conan-pkg-${{ hashFiles('**/conanfile-qmake.txt') }}
key: ${{ runner.os }}-conan-pkg-${{ hashFiles('**/conanfile.txt') }}
path: C:/.conan/
- name: Install dependencies (Windows)
if: startsWith(matrix.os, 'windows')
run: |
choco install conan jom -y
refreshenv
run: choco install conan jom -y
shell: cmd
- name: Build (Windows)
if: startsWith(matrix.os, 'windows') && matrix.build-system == 'qmake'
run: |
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
SET PATH=%PATH%;C:\Program Files\Conan\conan\
mkdir build
cd build
"C:\Program Files\Conan\conan\conan.exe" install ..\conanfile-qmake.txt
conan install ..\conanfile-qmake.txt
qmake ..
jom
windeployqt release/chatterino.exe --release --no-compiler-runtime --no-translations --no-opengl-sw --dir Chatterino2/
@ -90,15 +88,14 @@ jobs:
if: startsWith(matrix.os, 'windows') && matrix.build-system == 'cmake'
run: |
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
SET PATH=%PATH%;C:\Program Files\Conan\conan\
mkdir build
cd build
"C:\Program Files\Conan\conan\conan.exe" install ..\conanfile-qmake.txt
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
nmake
windeployqt release/chatterino.exe --release --no-compiler-runtime --no-translations --no-opengl-sw --dir Chatterino2/
cp release/chatterino.exe Chatterino2/
echo nightly > Chatterino2/modes
7z a chatterino-windows-x86-64.zip Chatterino2/
cmake -G"NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DUSE_PACKAGE_MANAGER=ON ..
jom
jom copy_dll
echo nightly > bin/modes
7z a chatterino-windows-x86-64.zip bin/
shell: cmd
- name: Upload artifact (Windows)
@ -115,6 +112,8 @@ jobs:
sudo apt-get update
sudo apt-get -y install \
cmake \
virtualenv \
rapidjson-dev \
libssl-dev \
libboost-dev \
libboost-system-dev \
@ -144,7 +143,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_PACKAGE_MANAGER=ON ..
make -j8
shell: bash
@ -183,7 +182,7 @@ jobs:
run: |
mkdir build
cd build
cmake ..
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PACKAGE_MANAGER=ON ..
make -j8
shell: bash

View file

@ -49,10 +49,10 @@ jobs:
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
sudo apt-get update
sudo apt-get -y install \
cmake \
virtualenv \
rapidjson-dev \
libssl-dev \
libboost-dev \
@ -75,9 +75,6 @@ jobs:
run: mkdir build-test
shell: bash
- name: Add conan pkgs
run: cmake -P conan-pkgs/add_conan_pkgs.cmake
- name: Build (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
@ -88,8 +85,7 @@ jobs:
- name: Test (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
./chatterino-test --platform minimal
run: ./bin/chatterino-test --platform minimal
working-directory: build-test
shell: bash

View file

@ -35,7 +35,7 @@ endif()
if (USE_PACKAGE_MANAGER)
include(pmm)
pmm(CONAN)
pmm(CONAN REMOTES anotherfoxguy-artifactory https://anotherfoxguy.jfrog.io/artifactory/api/conan/chatterino)
else (USE_PACKAGE_MANAGER)
set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/dependencies" CACHE PATH "Path to the dependencies")

View file

@ -219,8 +219,11 @@ generate_source_groups(${SOURCE_FILES})
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_compile_definitions(${PROJECT_NAME} PRIVATE CMAKE_BUILD CHATTERINO UNICODE USEWINSDK AB_CUSTOM_THEME AB_CUSTOM_SETTINGS IRC_STATIC IRC_NAMESPACE=Communi)
target_compile_definitions(${PROJECT_NAME} PRIVATE CMAKE_BUILD CHATTERINO UNICODE AB_CUSTOM_THEME AB_CUSTOM_SETTINGS IRC_STATIC IRC_NAMESPACE=Communi)
target_compile_definitions(${PROJECT_NAME} PRIVATE CHATTERINO_GIT_HASH=\"XD\" CHATTERINO_GIT_RELEASE=\"XD\" CHATTERINO_GIT_COMMIT=\"XD\")
if (WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE USEWINSDK)
endif ()
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

View file

@ -11,8 +11,6 @@
#else
# include "keychain.h"
#endif
#include <QSaveFile>
#include <boost/variant.hpp>

View file

@ -1,6 +1,6 @@
include(GoogleTest)
project(chatterino-tests)
project(chatterino-test)
set(main_dir ${CMAKE_SOURCE_DIR}/src)
@ -62,8 +62,10 @@ else ()
)
endif ()
target_compile_definitions(${PROJECT_NAME} PRIVATE CHATTERINO CHATTERINO_TEST UNICODE USEWINSDK AB_CUSTOM_THEME AB_CUSTOM_SETTINGS IRC_STATIC IRC_NAMESPACE=Communi)
target_compile_definitions(${PROJECT_NAME} PRIVATE CHATTERINO CHATTERINO_TEST UNICODE AB_CUSTOM_THEME AB_CUSTOM_SETTINGS IRC_STATIC IRC_NAMESPACE=Communi)
target_compile_definitions(${PROJECT_NAME} PRIVATE CHATTERINO_GIT_HASH=\"XD\" CHATTERINO_GIT_RELEASE=\"XD\" CHATTERINO_GIT_COMMIT=\"XD\")
if (WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE USEWINSDK)
endif ()
#gtest_discover_tests(${PROJECT_NAME})