Skip to content

Commit

Permalink
fix: do not use custom handling for release build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
steinwurf-sofie committed Sep 23, 2024
1 parent ca45e0c commit 59970db
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 16 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/linux_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,26 @@ jobs:
fail-fast: false
matrix:
config:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Cmake (GCC) Latest (Debug)
cxx: g++
cc: gcc
extra_args: -DCMAKE_BUILD_TYPE=Debug
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Cmake (Clang) Latest (Debug)
cxx: clang++
cc: clang
extra_args: -DCMAKE_BUILD_TYPE=Debug
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Cmake (GCC) Latest
cxx: g++
cc: gcc
extra_args:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Cmake (Clang) Latest
cxx: clang++
cc: clang
extra_args:
runs-on:
- self-hosted
- docker
Expand All @@ -58,7 +70,7 @@ jobs:
with:
max_attempts: 3
timeout_minutes: 15
command: cd build && cmake ../ -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Debug
command: cd build && cmake ../ -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} {{ matrix.config.extra_args }}
- name: CMake Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j$(((`nproc` + 1) / 2))
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/linux_mkspecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,25 @@ jobs:
matrix:
config:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
CXX: g++
name: GCC Latest
CXX: g++
cxx_mkspec:
env:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Clang Latest
CXX: clang++
cxx_mkspec:
env:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: GCC Latest (Debug)
CXX: g++
cxx_mkspec: --cxx_debug
env:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:2.0.0
name: Clang Latest (Debug)
CXX: clang++
cxx_mkspec: --cxx_debug
env:
runs-on:
- self-hosted
- docker
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/macos_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ jobs:
- arch: ARM64
os: big_sur
name: Apple Big Sur (ARM)

extra_args:
- arch: ARM64
os: big_sur
name: Apple Big Sur (ARM) (Debug)
extra_args: -DCMAKE_BUILD_TYPE=Debug
runs-on: [self-hosted, macOS, "${{ matrix.config.os }}", "${{ matrix.config.arch }}", cmake, builder]
name: ${{ matrix.config.name }}
steps:
Expand All @@ -44,7 +48,7 @@ jobs:
with:
max_attempts: 3
timeout_minutes: 15
command: cd build && cmake ${{github.workspace}} -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" -DCMAKE_BUILD_TYPE=Debug
command: cd build && cmake ${{github.workspace}} -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" ${{ matrix.config.extra_args }}
- name: CMake Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/macos_mkspecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ jobs:
fail-fast: false
matrix:
config:
- arch: ARM64
os: big_sur
name: Apple Big Sur (ARM) (Debug)
extra_args: --cxx_debug
- arch: ARM64
os: big_sur
name: Apple Big Sur (ARM)
extra_args:
runs-on: [self-hosted, macOS, "${{ matrix.config.os }}", "${{ matrix.config.arch }}", builder]
name: ${{ matrix.config.name }}
steps:
Expand All @@ -36,7 +41,7 @@ jobs:
with:
max_attempts: 3
timeout_minutes: 15
command: python3 waf configure --git_protocol=git@ ${{ env.EXTRA_RESOLVE_OPTIONS }}
command: python3 waf configure --git_protocol=git@ ${{ env.EXTRA_RESOLVE_OPTIONS }} ${{ matrix.config.extra_args }}
- name: Build
run: |
echo "::add-matcher::.github/gcc-problem-matcher.json"
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/windows_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ env:
jobs:
windows_cmake:
timeout-minutes: 45
matrix:
config:
- name: Cmake (MSVC) (Debug)
extra_args: -DCMAKE_BUILD_TYPE=Debug
- name: Cmake (MSVC)
extra_args:
strategy:
fail-fast: false
runs-on: [self-hosted, windows, cmake, builder]
name: ${{ matrix.os }}
name: ${{ matrix.config.name }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,12 +40,12 @@ jobs:
with:
max_attempts: 3
timeout_minutes: 15
command: cd build | cmake ${{github.workspace}} -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" -DCMAKE_BUILD_TYPE=Debug
command: cd build | cmake ${{ github.workspace }} -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" ${{ matrix.config.extra_args }}
- name: CMake Build
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: cmake --build . -j
- name: CTest
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: ctest -V
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/windows_mkspecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
config:
- cxx_mkspec: cxx_msvc17_x64
name: MSVC 17 64-bit
extra_args:
- cxx_mkspec: cxx_msvc17_x64
name: MSVC 17 64-bit (Debug)
extra_args: --cxx_debug
runs-on: [self-hosted, "${{ matrix.config.cxx_mkspec }}", builder]
name: ${{ matrix.config.name }}
steps:
Expand All @@ -33,7 +37,7 @@ jobs:
with:
max_attempts: 3
timeout_minutes: 15
command: python waf configure --git_protocol=git@ --cxx_mkspec=${{ matrix.config.cxx_mkspec }} ${{ env.EXTRA_RESOLVE_OPTIONS }}
command: python waf configure --git_protocol=git@ --cxx_mkspec=${{ matrix.config.cxx_mkspec }} ${{ matrix.conf.extra_args }} ${{ env.EXTRA_RESOLVE_OPTIONS }}
- name: Build
run: |
echo "::add-matcher::.github/gcc-problem-matcher.json"
Expand Down
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,8 @@ if (${PROJECT_NAME} STREQUAL ${STEINWURF_TOP_NAME})

if (MSVC)
add_compile_options(/W4)
# Make Release builds explicitly keep NDEBUG unset.
string(REGEX REPLACE "/DNDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
else()
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
# Make Release builds explicitly keep NDEBUG unset.
string(REGEX REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
endif()

add_test(verify_tests verify_tests)
Expand Down

0 comments on commit 59970db

Please sign in to comment.