Skip to content

Commit 26fac8d

Browse files
committed
Use env-vars to simplify commands
1 parent fc66ff5 commit 26fac8d

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
include:
1818
- os: windows-latest
1919
gen: Visual Studio 17 2022
20-
flags: /experimental:module
2120
- os: ubuntu-latest
2221
gen: Ninja
23-
flags: ""
2422
env:
2523
CMAKE_GENERATOR: ${{ matrix.gen }}
26-
CXXFLAGS: ${{ matrix.flags }}
24+
CMAKE_BUILD_TYPE: Release
25+
CMAKE_CONFIG_TYPE: Release
26+
CMAKE_PREFIX_PATH: ${{github.workspace}}/_local
2727
runs-on: ${{ matrix.os }}
2828
steps:
2929
# System set-up
@@ -43,29 +43,25 @@ jobs:
4343
4444
# Main cppfront library
4545
- name: Configure cppfront
46-
run: cmake -S . -B build/cppfront -DCMAKE_BUILD_TYPE=Release
46+
run: cmake -S . -B build/cppfront
4747
- name: Build cppfront
48-
run: cmake --build build/cppfront --config Release
48+
run: cmake --build build/cppfront
4949
- name: Install cppfront locally
50-
run: cmake --install build/cppfront --config Release --prefix _local
50+
run: cmake --install build/cppfront --prefix _local
5151

5252
# Regression tests
5353
- name: Configure regression tests
54-
run: >
55-
cmake -S regression-tests -B build/regression-tests -DCMAKE_BUILD_TYPE=Release
56-
"-DCMAKE_PREFIX_PATH=${{github.workspace}}/_local"
54+
run: cmake -S regression-tests -B build/regression-tests
5755
- name: Build regression tests
58-
run: cmake --build build/regression-tests --config Release
56+
run: cmake --build build/regression-tests
5957
- name: Run regression tests
60-
run: ctest --output-on-failure -C Release -j 2
58+
run: ctest --output-on-failure -j 2
6159
working-directory: build/regression-tests
6260

6361
# Example
6462
- name: Configure example
65-
run: >
66-
cmake -S example -B build/example -DCMAKE_BUILD_TYPE=Release
67-
"-DCMAKE_PREFIX_PATH=${{github.workspace}}/_local"
63+
run: cmake -S example -B build/example
6864
- name: Build example
69-
run: cmake --build build/example --config Release
65+
run: cmake --build build/example
7066
- name: Run example
7167
run: ./build/example/main && cmake -E cat xyzzy

0 commit comments

Comments
 (0)