-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
263 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,50 +2,52 @@ name: CMake | |
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
branches: ["master", "conan2"] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
branches: ["master"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{matrix.os}} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
os: [ubuntu-latest, windows-latest] | ||
build_type: [Release, Debug] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup ccache | ||
uses: Chocobo1/setup-ccache-action@v1 | ||
with: | ||
windows_compile_environment: msvc | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache CMake build directory | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-cmake-build | ||
with: | ||
path: ${{github.workspace}}/build | ||
key: ${{matrix.os}}-${{env.BUILD_TYPE}}-build2 | ||
- name: Get conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Configure CMake (Windows) | ||
# Builind with shared libs fails on Windows ATM | ||
if: runner.os == 'Windows' | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF | ||
- name: Get conan home | ||
id: conan-home | ||
run: echo "CONAN_HOME=$(conan config home)" >> $GITHUB_OUTPUT | ||
|
||
- name: Configure CMake | ||
if: runner.os != 'Windows' | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
- name: Cache conan packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.conan-home.outputs.CONAN_HOME/p}} | ||
key: ${{ matrix.os }}-${{ matrix.build_type }}-packages | ||
|
||
- name: Create default profile | ||
run: conan profile detect --force | ||
|
||
- name: Install dependencies | ||
run: | | ||
conan install . \ | ||
--settings build_type=${{ matrix.build_type }} \ | ||
--build=missing \ | ||
--conf tools.system.package_manager:mode=install \ | ||
--conf tools.system.package_manager:sudo=True | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
conan install . \ | ||
--settings build_type=${{ matrix.build_type }} \ | ||
--build=missing | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
|
||
- name: Build | ||
# According to this link, github runners should have at least two CPUs | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2 | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
run: conan build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.