-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use an action for cmake instead of doing things manually
- Loading branch information
Showing
1 changed file
with
30 additions
and
52 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 |
---|---|---|
|
@@ -25,33 +25,18 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: lukka/get-cmake@latest | ||
|
||
- name: create build environment | ||
run: cmake -E make_directory ${{ runner.workspace }}/_build | ||
|
||
- name: setup cmake initial cache | ||
run: touch compiler-cache.cmake | ||
|
||
- name: configure cmake | ||
env: | ||
CXX: ${{ matrix.compiler }} | ||
shell: bash | ||
working-directory: ${{ runner.workspace }}/_build | ||
run: > | ||
cmake -C ${{ github.workspace }}/compiler-cache.cmake | ||
$GITHUB_WORKSPACE | ||
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
-DBUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-DCMAKE_CXX_COMPILER=${{ env.CXX }} | ||
-DCMAKE_CXX_VISIBILITY_PRESET=hidden | ||
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON | ||
- name: build | ||
shell: bash | ||
working-directory: ${{ runner.workspace }}/_build | ||
run: cmake --build . --config ${{ matrix.build_type }} | ||
uses: threeal/[email protected] | ||
with: | ||
build-dir: ${{ runner.workspace }}/_build | ||
cxx-compiler: ${{ matrix.compiler }} | ||
options: | | ||
BENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
BUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
CMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
CMAKE_CXX_COMPILER=${{ env.CXX }} | ||
CMAKE_CXX_VISIBILITY_PRESET=hidden | ||
CMAKE_VISIBILITY_INLINES_HIDDEN=ON | ||
- name: test | ||
shell: bash | ||
|
@@ -70,8 +55,6 @@ jobs: | |
msvc: | ||
- VS-16-2019 | ||
- VS-17-2022 | ||
arch: | ||
- x64 | ||
build_type: | ||
- Debug | ||
- Release | ||
|
@@ -89,21 +72,18 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: lukka/get-cmake@latest | ||
|
||
- name: configure cmake | ||
run: > | ||
cmake -S . -B _build/ | ||
-A ${{ matrix.arch }} | ||
-G "${{ matrix.generator }}" | ||
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
-DBUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
- name: build | ||
run: cmake --build _build/ --config ${{ matrix.build_type }} | ||
uses: threeal/[email protected] | ||
with: | ||
build-dir: ${{ runner.workspace }}/_build | ||
generator: ${{ matrix.generator }} | ||
options: | | ||
BENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
BUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
- name: test | ||
run: ctest --test-dir _build/ -C ${{ matrix.build_type }} -VV | ||
working-directory: ${{ runner.workspace }}/_build | ||
run: ctest -C ${{ matrix.build_type }} -VV | ||
|
||
msys2: | ||
name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.lib }}.${{ matrix.msys2.msystem }} | ||
|
@@ -143,20 +123,18 @@ jobs: | |
pacboy: >- | ||
gcc:p | ||
clang:p | ||
cmake:p | ||
ninja:p | ||
- name: configure cmake | ||
env: | ||
CXX: ${{ matrix.msys2.compiler }} | ||
run: > | ||
cmake -S . -B _build/ | ||
-GNinja | ||
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
-DBUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
- name: build | ||
run: cmake --build _build/ --config ${{ matrix.build_type }} | ||
uses: threeal/[email protected] | ||
with: | ||
build-dir: ${{ runner.workspace }}/_build | ||
generator: Ninja | ||
cxx-compiler: ${{ matrix.msys2.msystem.compiler }} | ||
options: | | ||
BENCHMARK_DOWNLOAD_DEPENDENCIES=ON | ||
BUILD_SHARED_LIBS=${{ matrix.lib == 'shared' }} | ||
- name: test | ||
run: ctest --test-dir _build/ -C ${{ matrix.build_type }} -VV | ||
working-directory: ${{ runner.workspace }}/_build | ||
run: ctest -C ${{ matrix.build_type }} -VV |