Skip to content

Commit

Permalink
ci: add workflow to build in amp-devcontainer-cpp (#656)
Browse files Browse the repository at this point in the history
* ci: add workflow to build in amp-devcontainer-cpp

* ci: use default ccache variant for container build

* ci: use default ccache variant for container build

* ci: build RelWithDebInfo in devcontainer

* infra/util/test/CMakeLists: Disable false positive warning on stringop overflow

* ci: run RelWithDebInfo tests for amp-devcontainer-cpp workflow
  • Loading branch information
richardapeters authored Jun 19, 2024
1 parent 6865acf commit 0d2b500
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,30 @@ jobs:
with:
name: test-logs
path: build/host/Testing/Temporary/
host_build_test_container:
name: Host Build & Test (amp-devcontainer-cpp)
runs-on: ubuntu-latest
container: ghcr.io/philips-software/amp-devcontainer-cpp:5.1.1@sha256:457da136e67ec84fde1ab742999fa2bf2f5174353bbaf3283a7e3de2b0abdaa4 # 5.1.1
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 # v1.2.13
with:
key: ${{ github.job }}-ubuntu-latest
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: "host"
buildPreset: "host-RelWithDebInfo"
testPreset: "host-RelWithDebInfo"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"
- name: Upload test logs
if: ${{ failure() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-logs
path: build/host/Testing/Temporary/
host_build_test:
name: Host Build & Test
runs-on: ${{ matrix.os }}
Expand Down
6 changes: 6 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
"configuration": "Debug",
"inherits": "defaults"
},
{
"name": "host-RelWithDebInfo",
"configurePreset": "host",
"configuration": "RelWithDebInfo",
"inherits": "defaults"
},
{
"name": "coverage",
"configurePreset": "coverage",
Expand Down
5 changes: 5 additions & 0 deletions infra/util/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ target_sources(infra.util_test PRIVATE
TestVariant.cpp
)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Workaround for false positive on stringop overflow
set_source_files_properties(TestBoundedVector.cpp PROPERTIES COMPILE_FLAGS -Wno-stringop-overflow)
endif()

if (EMIL_BUILD_WIN)
target_sources(infra.util_test PRIVATE
TestNatvis.cpp
Expand Down

0 comments on commit 0d2b500

Please sign in to comment.