Skip to content

Commit 42090bd

Browse files
authored
CI-unixish.yml: run CMake build (#317)
1 parent da449d1 commit 42090bd

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

.github/workflows/CI-unixish.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313

1414
runs-on: ${{ matrix.os }}
1515

16+
env:
17+
CXX: ${{ matrix.compiler }}
18+
1619
steps:
1720
- uses: actions/checkout@v3
1821

@@ -23,53 +26,66 @@ jobs:
2326
sudo apt-get install valgrind
2427
2528
- name: make simplecpp
26-
run: make -j$(nproc) CXX=${{ matrix.compiler }}
29+
run: make -j$(nproc)
2730

2831
- name: make test
29-
run: make -j$(nproc) test CXX=${{ matrix.compiler }}
32+
run: make -j$(nproc) test
3033

3134
- name: selfcheck
3235
run: |
33-
make -j$(nproc) selfcheck CXX=${{ matrix.compiler }}
36+
make -j$(nproc) selfcheck
37+
38+
- name: Run CMake
39+
run: |
40+
cmake -S . -B cmake.output
41+
42+
- name: CMake simplecpp
43+
run: |
44+
cmake --build cmake.output --target simplecpp -- -j $(nproc)
45+
46+
- name: CMake testrunner
47+
run: |
48+
cmake --build cmake.output --target testrunner -- -j $(nproc)
49+
./cmake.output/testrunner
3450
3551
- name: Run valgrind
3652
if: matrix.os == 'ubuntu-22.04'
3753
run: |
3854
make clean
3955
# this valgrind version doesn't support DWARF 5 yet
40-
make -j$(nproc) CXX=${{ matrix.compiler }} CXXFLAGS="-gdwarf-4"
56+
make -j$(nproc) CXXFLAGS="-gdwarf-4"
4157
valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./testrunner
4258
valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./simplecpp simplecpp.cpp -e
4359
4460
- name: Run with libstdc++ debug mode
4561
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'g++'
4662
run: |
4763
make clean
48-
make -j$(nproc) test selfcheck CXX=${{ matrix.compiler }} CXXFLAGS="-g3 -D_GLIBCXX_DEBUG"
64+
make -j$(nproc) test selfcheck CXXFLAGS="-g3 -D_GLIBCXX_DEBUG"
4965
5066
- name: Run with libc++ debug mode
5167
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'clang++'
5268
run: |
5369
make clean
54-
make -j$(nproc) test selfcheck CXX=${{ matrix.compiler }} CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_ENABLE_ASSERTIONS=1" LDFLAGS="-lc++"
70+
make -j$(nproc) test selfcheck CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_ENABLE_ASSERTIONS=1" LDFLAGS="-lc++"
5571
5672
- name: Run AddressSanitizer
5773
if: matrix.os == 'ubuntu-22.04'
5874
run: |
5975
make clean
60-
make -j$(nproc) test selfcheck CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -fsanitize=address" LDFLAGS="-fsanitize=address"
76+
make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -fsanitize=address" LDFLAGS="-fsanitize=address"
6177
env:
6278
ASAN_OPTIONS: detect_stack_use_after_return=1
6379

6480
- name: Run UndefinedBehaviorSanitizer
6581
if: matrix.os == 'ubuntu-22.04'
6682
run: |
6783
make clean
68-
make -j$(nproc) test selfcheck CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -fsanitize=undefined -fno-sanitize=signed-integer-overflow" LDFLAGS="-fsanitize=undefined -fno-sanitize=signed-integer-overflow"
84+
make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -fsanitize=undefined -fno-sanitize=signed-integer-overflow" LDFLAGS="-fsanitize=undefined -fno-sanitize=signed-integer-overflow"
6985
7086
# TODO: requires instrumented libc++
7187
- name: Run MemorySanitizer
7288
if: false && matrix.os == 'ubuntu-22.04' && matrix.compiler == 'clang++'
7389
run: |
7490
make clean
75-
make -j$(nproc) test selfcheck CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -stdlib=libc++ -fsanitize=memory" LDFLAGS="-lc++ -fsanitize=memory"
91+
make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -stdlib=libc++ -fsanitize=memory" LDFLAGS="-lc++ -fsanitize=memory"

.github/workflows/CI-windows.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ jobs:
3131
if: matrix.os == 'windows-2019'
3232
run: |
3333
cmake -G "Visual Studio 16 2019" -A x64 . || exit /b !errorlevel!
34-
dir
3534
3635
- name: Run cmake
3736
if: matrix.os == 'windows-2022'
3837
run: |
3938
cmake -G "Visual Studio 17 2022" -A x64 . || exit /b !errorlevel!
40-
dir
41-
39+
4240
- name: Build
4341
run: |
4442
msbuild -m simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!

0 commit comments

Comments
 (0)