mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
👷 Fixed test CI build
This commit is contained in:
parent
b002b00b6c
commit
336044a840
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
|
@ -27,6 +27,12 @@ jobs:
|
||||||
path: ../Qt
|
path: ../Qt
|
||||||
key: ${{ runner.os }}-QtCache-20201005
|
key: ${{ runner.os }}-QtCache-20201005
|
||||||
|
|
||||||
|
- name: Cache conan
|
||||||
|
uses: actions/cache@v2.1.4
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-conan-root-${{ hashFiles('**/conanfile.txt') }}
|
||||||
|
path: ~/.conan
|
||||||
|
|
||||||
# LINUX
|
# LINUX
|
||||||
- name: Install p7zip (Ubuntu)
|
- name: Install p7zip (Ubuntu)
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
|
@ -43,6 +49,7 @@ jobs:
|
||||||
- name: Install dependencies (Ubuntu)
|
- name: Install dependencies (Ubuntu)
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
|
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install \
|
sudo apt-get -y install \
|
||||||
cmake \
|
cmake \
|
||||||
|
@ -65,15 +72,17 @@ jobs:
|
||||||
|
|
||||||
- name: Create build directory (Ubuntu)
|
- name: Create build directory (Ubuntu)
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: mkdir build-test
|
||||||
mkdir build-test
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Add conan pkgs
|
||||||
|
run: cmake -P conan-pkgs/add_conan_pkgs.cmake
|
||||||
|
|
||||||
- name: Build (Ubuntu)
|
- name: Build (Ubuntu)
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
cmake -DBUILD_TESTS=On -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DUSE_PACKAGE_MANAGER=ON -DBUILD_TESTS=ON -DBUILD_APP=OFF ..
|
||||||
cmake --build . --config Release
|
make -j
|
||||||
working-directory: build-test
|
working-directory: build-test
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
CMAKE_PREFIX_PATH
|
|
||||||
# Building on Windows
|
# Building on Windows
|
||||||
|
|
||||||
**Note that installing all the development prerequisites and libraries will require about 30 GB of free disk space. Please ensure this space is available on your `C:` drive before proceeding.**
|
**Note that installing all the development prerequisites and libraries will require about 30 GB of free disk space. Please ensure this space is available on your `C:` drive before proceeding.**
|
||||||
|
|
23
BUILDING_WITH_CMAKE.md
Normal file
23
BUILDING_WITH_CMAKE.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
TODO
|
||||||
|
---------
|
||||||
|
|
||||||
|
## Build with conan
|
||||||
|
* Install cmake conan qt
|
||||||
|
* `cmake -P conan-pkgs/add_conan_pkgs.cmake`
|
||||||
|
* `mkdir build`
|
||||||
|
`cd build`
|
||||||
|
`cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PACKAGE_MANAGER=ON ..`
|
||||||
|
`make -j`
|
||||||
|
|
||||||
|
## Build with cmake meta-build project
|
||||||
|
* Install cmake qt
|
||||||
|
* `cd lib`
|
||||||
|
`cmake -DCMAKE_BUILD_TYPE=Release ..`
|
||||||
|
`make -j`
|
||||||
|
|
||||||
|
* `mkdir build`
|
||||||
|
`cd build`
|
||||||
|
`cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=lib/Dependencies_<name of the generator> ..`
|
||||||
|
`make -j`
|
||||||
|
|
||||||
|
## Build manually
|
|
@ -13,9 +13,6 @@ set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
|
SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
|
||||||
SET(LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
|
SET(LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
|
||||||
SET(ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
|
SET(ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
|
||||||
|
@ -45,19 +42,24 @@ else (USE_PACKAGE_MANAGER)
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
|
find_package(Serialize REQUIRED)
|
||||||
|
find_package(Signals REQUIRED)
|
||||||
|
find_package(Settings REQUIRED)
|
||||||
|
|
||||||
|
if (BUILD_APP)
|
||||||
find_package(LibCommuni REQUIRED)
|
find_package(LibCommuni REQUIRED)
|
||||||
find_package(Qt5keychain REQUIRED)
|
find_package(Qt5keychain REQUIRED)
|
||||||
find_package(Rapidjson REQUIRED)
|
find_package(Rapidjson REQUIRED)
|
||||||
find_package(Signals REQUIRED)
|
|
||||||
find_package(Settings REQUIRED)
|
|
||||||
find_package(Serialize REQUIRED)
|
|
||||||
find_package(Websocketpp REQUIRED)
|
find_package(Websocketpp REQUIRED)
|
||||||
|
endif ()
|
||||||
if (BUILD_TESTS)
|
if (BUILD_TESTS)
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
endif (USE_PACKAGE_MANAGER)
|
endif (USE_PACKAGE_MANAGER)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
|
||||||
if (BUILD_APP)
|
if (BUILD_APP)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
9
conan-pkgs/add_conan_pkgs.cmake
Normal file
9
conan-pkgs/add_conan_pkgs.cmake
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
macro(add_pkg NAME)
|
||||||
|
execute_process(COMMAND conan export ${CMAKE_CURRENT_LIST_DIR}/${NAME} chatterino/local)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
add_pkg("QtKeychain")
|
||||||
|
add_pkg("Serialize")
|
||||||
|
add_pkg("Settings")
|
||||||
|
add_pkg("Signals")
|
||||||
|
add_pkg("WebSocketpp")
|
|
@ -1,14 +1,14 @@
|
||||||
[requires]
|
[requires]
|
||||||
boost/1.75.0
|
boost/1.75.0
|
||||||
communi/3.6.0@test/test
|
communi/3.6.0@chatterino/local
|
||||||
gtest/1.10.0
|
gtest/1.10.0
|
||||||
openssl/1.1.1d
|
openssl/1.1.1d
|
||||||
QtKeychain/0.12.90@test/test
|
QtKeychain/0.12.90@chatterino/local
|
||||||
rapidjson/cci.20200410
|
rapidjson/cci.20200410
|
||||||
serialize/0.1@test/test
|
serialize/0.1@chatterino/local
|
||||||
settings/0.1@test/test
|
settings/0.1@chatterino/local
|
||||||
signals/0.1@test/test
|
signals/0.1@chatterino/local
|
||||||
WebSocketpp/0.8.1@test/test
|
WebSocketpp/0.8.1@chatterino/local
|
||||||
|
|
||||||
[generators]
|
[generators]
|
||||||
cmake
|
cmake
|
||||||
|
|
Loading…
Reference in a new issue