CI: Test execution of projects

reviewable/pr125/r1
Michal Rostecki 2 years ago committed by Tamir Duberstein
parent b6ecbb8bd1
commit d70c689dd9
No known key found for this signature in database

@ -63,4 +63,6 @@ jobs:
with: with:
tool: bpf-linker,cargo-generate tool: bpf-linker,cargo-generate
- run: sudo apt update
- run: sudo apt install expect
- run: ./test.sh ${{ github.workspace }} ${{ matrix.program }} - run: ./test.sh ${{ github.workspace }} ${{ matrix.program }}

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -eux
TEMPLATE_DIR=$1 TEMPLATE_DIR=$1
if [ -z "${TEMPLATE_DIR}" ]; then echo "template dir required"; exit 1; fi if [ -z "${TEMPLATE_DIR}" ]; then echo "template dir required"; exit 1; fi
@ -60,5 +60,12 @@ cargo build --package test --release
# trying to compile the panic handler twice: once from the bpf program, and again from std via aya. # trying to compile the panic handler twice: once from the bpf program, and again from std via aya.
cargo clippy --exclude test-ebpf --all-targets --workspace -- --deny warnings cargo clippy --exclude test-ebpf --all-targets --workspace -- --deny warnings
cargo clippy --package test-ebpf --all-targets -- --deny warnings cargo clippy --package test-ebpf --all-targets -- --deny warnings
expect << EOF
log_user 1
set pid [spawn cargo xtask run]
expect "Waiting for Ctrl-C..."
exec kill -SIGINT \$pid
EOF
popd popd
exit 0

Loading…
Cancel
Save