Skip to content

Commit

Permalink
CI: Test execution of projects
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Oct 13, 2024
1 parent b6ecbb8 commit d5ada3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ jobs:
with:
tool: bpf-linker,cargo-generate

- run: sudo apt update
- run: sudo apt install expect
- run: ./test.sh ${{ github.workspace }} ${{ matrix.program }}
10 changes: 8 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -ex
set -eux

TEMPLATE_DIR=$1
if [ -z "${TEMPLATE_DIR}" ]; then echo "template dir required"; exit 1; fi
Expand Down Expand Up @@ -60,5 +60,11 @@ cargo build --package test --release
# 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 --package test-ebpf --all-targets -- --deny warnings

RUST_LOG=info expect << EOF
spawn cargo xtask run
expect "Waiting for Ctrl-C..."
send \x03
EOF

popd
exit 0

0 comments on commit d5ada3b

Please sign in to comment.