Skip to content

Commit

Permalink
gh ci: make use of presets, ref #88
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Jun 15, 2024
1 parent 8ba8690 commit cdfe665
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
working-directory: ci
steps:
- name: Clone
uses: actions/checkout@v3
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Configure
run: cmake .. -DCMAKE_BUILD_TYPE=Release
run: cmake --preset release -B build
- name: Unicast messages
run: cmake --build . --config Release --target run-bench-dynamix-msg-unicast
run: cmake --build build --target run-bench-dynamix-msg-unicast
- name: Multicast messages
run: cmake --build . --config Release --target run-bench-dynamix-msg-multicast
run: cmake --build build --target run-bench-dynamix-msg-multicast
- name: Type Creation
run: cmake --build . --config Release --target run-bench-dynamix-type-creation
run: cmake --build build --target run-bench-dynamix-type-creation
25 changes: 11 additions & 14 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ jobs:
matrix:
cfg:
# ubuntu sanitize address, undefined, leak, thread
- {name: 'linux gcc dbg s:addr,ub,leak', os: ubuntu-latest, btype: Debug, cmakeflags: '-DSAN_ADDR=1 -DSAN_UB=1 -DSAN_LEAK=1'}
- {name: 'linux gcc rel s:addr', os: ubuntu-latest, btype: RelWithDebInfo, cmakeflags: '-DSAN_ADDR=1'}
- {name: 'linux gcc rel s:thread', os: ubuntu-latest, btype: RelWithDebInfo, cmakeflags: '-DSAN_THREAD=1'}
- {name: 'linux gcc dbg s:addr,ub,leak', os: ubuntu-latest, preset: debug-aublsan}
- {name: 'linux gcc rel s:addr', os: ubuntu-latest, preset: release-asan}
- {name: 'linux gcc rel s:thread', os: ubuntu-latest, preset: release-tsan}
# macos - no ub santizer (there are still some apple-specific ub sanitizer issues to fix)
# https://github.com/iboB/dynamix/issues/44
# also no leak sanitizer since it's not supported by apple
- {name: 'mac clang dbg s:addr', os: macos-latest, btype: Debug, cmakeflags: '-DSAN_ADDR=1'}
- {name: 'mac clang rel s:addr', os: macos-latest, btype: RelWithDebInfo, cmakeflags: '-DSAN_ADDR=1'}
- {name: 'mac clang rel s:thread', os: macos-latest, btype: RelWithDebInfo, cmakeflags: '-DSAN_THREAD=1'}
- {name: 'mac clang dbg s:addr', os: macos-latest, preset: debug-asan}
- {name: 'mac clang rel s:addr', os: macos-latest, preset: release-asan}
- {name: 'mac clang rel s:thread', os: macos-latest, preset: release-tsan}
# windows sanitize address
- {name: 'win msvc dbg s:addr', os: windows-latest, btype: Debug, cmakeflags: '-DSAN_ADDR=1'}
- {name: 'win msvc rel s:addr', os: windows-latest, btype: RelWithDebInfo, cmakeflags: '-DSAN_ADDR=1'}
defaults:
run:
working-directory: ci
- {name: 'win msvc dbg s:addr', os: windows-latest, preset: debug-asan}
- {name: 'win msvc rel s:addr', os: windows-latest, preset: release-asan}
steps:
- name: Clone
uses: actions/checkout@v3
Expand All @@ -42,11 +39,11 @@ jobs:
if: matrix.cfg.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.cfg.btype }} ${{ matrix.cfg.cmakeflags }}
run: cmake --preset ${{ matrix.cfg.preset }} -B build
- name: Build
run: cmake --build .
run: cmake --build build
- name: Test
run: ctest --output-on-failure
run: ctest --test-dir build --output-on-failure
env:
# just set this to all configs, it will be used where it matters and ignored otherwise
UBSAN_OPTIONS: halt_on_error=1

0 comments on commit cdfe665

Please sign in to comment.