Skip to content

Commit

Permalink
.github: Attempt 4
Browse files Browse the repository at this point in the history
Signed-off-by: Casper Andersson <[email protected]>
  • Loading branch information
cappe987 committed Dec 30, 2024
1 parent 948fbff commit 0d0de5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
- name: Test
run: |
cd build
# Use sudo since in Ubuntu 24.04 you can't run `unshare` when unprivilegied
sudo make test
make pipeline_test
build-aarch64:
name: Build aarch64
runs-on: ubuntu-latest
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ install(TARGETS tstest

add_custom_target(test
COMMAND
# unshare -r -n ${PROJECT_SOURCE_DIR}/test/test.sh ${PROJECT_BINARY_DIR}/tstest $(t)
# unshare -n ${PROJECT_SOURCE_DIR}/test/test.sh ${PROJECT_BINARY_DIR}/tstest $(t)
unshare -r -n ${PROJECT_SOURCE_DIR}/test/test.sh ${PROJECT_BINARY_DIR}/tstest $(t)
DEPENDS ${PROJECT_BINARY_DIR}/tstest
)

# Add separate command for pipeline since apparently `unshare` is
# problematic there on Ubuntu 24.04.
add_custom_target(pipeline_test
COMMAND
${PROJECT_SOURCE_DIR}/test/test.sh ${PROJECT_BINARY_DIR}/tstest $(t)
DEPENDS ${PROJECT_BINARY_DIR}/tstest
)
Expand Down

0 comments on commit 0d0de5c

Please sign in to comment.