CI: add build-test github action

pull/1/head
Alessandro Decina 3 years ago
parent 240c65507b
commit d085bdb89f

@ -0,0 +1,37 @@
name: Build
on:
push:
branches:
- main
- ci
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install llvm-11-dev libclang-11-dev
- name: Install bpf-linker
run: cargo install bpf-linker
- name: Build
run: cargo build --verbose
- name: Run tests
run: RUST_BACKTRACE=full cargo test --verbose --tests
Loading…
Cancel
Save