-
-
Notifications
You must be signed in to change notification settings - Fork 52
48 lines (43 loc) · 1.45 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Rust
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: [ lq_run ]
steps:
- uses: actions/checkout@v4
- name: Set Version ENV
run: pushd src; echo "::set-env name=VERSION::$(cat VERSION_STRING)"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Check env var
run: |
echo ${{ env.VERSION }}
- name: Install dependencies
run: sudo /bin/apt-get update; sudo /bin/apt-get install --no-install-recommends python3-pip clang gcc gcc-multilib llvm libelf-dev git nano graphviz esbuild curl screen llvm pkg-config linux-tools-common linux-tools-`/bin/uname r` libbpf-dev mold
if: matrix.os == 'ubuntu-latest'
- name: Build
run: pushd src/rust; cargo build --verbose --all; popd
- name: Run tests
run: pushd src/rust; cargo test --verbose --all; popd
- name: Build .deb file
run: ./build_dpkg.sh --nostamp
working-directory: src/
- name: Archive .deb file
uses: actions/upload-artifact@v4
with:
name: libreqos_${{ env.VERSION }}.-1_amd64.deb
path: src/dist/libreqos_${{ env.VERSION }}.-1_amd64.deb
audit:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install tools
run: pushd src/rust; cargo install cargo-audit; popd
- name: Audit for CVEs
run: cd src/rust; cargo audit -c always