build(deps): bump golang.org/x/sys from 0.11.0 to 0.12.0 #308
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: 1.20.5 | |
- name: Check module vendoring | |
run: | | |
go mod tidy | |
go mod vendor | |
go mod verify | |
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1) | |
- name: Cache LLVM and Clang | |
id: cache-llvm | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: $HOME/.clang | |
key: llvm-15.0 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 | |
with: | |
version: "15.0" | |
directory: $HOME/.clang | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Generate and build | |
run: make pwru | |
- name: Store executable | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce | |
with: | |
name: pwru | |
path: pwru | |
test: | |
runs-on: ubuntu-latest-4cores-16gb | |
name: Test | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
kernel: [ '5.4-v0.3', '5.15-v0.3', '6.3-main', 'bpf-next-main' ] | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Retrieve stored pwru executable | |
uses: actions/download-artifact@v3 | |
with: | |
name: pwru | |
path: pwru | |
- name: Run tests | |
uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d | |
with: | |
test-name: pwru-test | |
image-version: ${{ matrix.kernel }} | |
install-dependencies: 'true' | |
dns-resolver: '1.1.1.1' | |
host-mount: ./ | |
cmd: | | |
set -x | |
chmod +x /host/pwru/pwru | |
# Block traffic to both endpoints, so that we can see kfree_skb* | |
# in traces (test assertion) | |
iptables -I OUTPUT 1 -m tcp --proto tcp --dst 1.0.0.1/32 --dport 8080 -j DROP | |
ip6tables -I OUTPUT 1 -m tcp --proto tcp --dst 2606:4700:4700::1001 --dport 8080 -j DROP | |
i=0 | |
for addr in '1.0.0.1' '2606:4700:4700::1001'; do | |
i=\$((i+1)) | |
port=8080 | |
/host/pwru/pwru --output-tuple \ | |
--output-file=/tmp/pwru-\$i.log \ | |
--ready-file=/tmp/pwru-\$i.ready \ | |
"dst host \$addr and port \$port" 2>/tmp/pwru-\$i.status & | |
PWRU_PID=\$! | |
while [ ! -f /tmp/pwru-\$i.ready ]; do sleep 1; done | |
url=\$addr | |
if \$(echo \$addr | grep -q ':'); then url="[\$addr]"; fi | |
echo \$url | |
curl -vvv -sS --fail --connect-timeout "1" -o /dev/null http://\$url:\$port || true | |
kill \$PWRU_PID | |
wait \$PWRU_PID | |
grep "kfree_skb" /tmp/pwru-\$i.log | grep -F "\${url}:\${port}" | |
done | |
- name: Fetch artifacts | |
if: ${{ !success() }} | |
uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d | |
with: | |
provision: 'false' | |
cmd: | | |
cat /tmp/pwru-*.status || true | |
cat /tmp/pwru-*.ready || true | |
cat /tmp/pwru-*.log || true |