-
Notifications
You must be signed in to change notification settings - Fork 147
73 lines (71 loc) · 2.12 KB
/
01-build-and-test-unix.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
on:
workflow_call:
inputs:
os:
required: true
type: string
toolchain:
required: true
type: string
msrv:
required: false
default: false
type: boolean
env:
RUST_BACKTRACE: 1
CARGO_TERM_VERBOSE: true
CARGO_TERM_COLOR: always
jobs:
build-and-test:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- if: ${{ contains(inputs.os, 'ubuntu') }}
run: sudo apt-get install libpcap-dev
- if: ${{ contains(inputs.os, 'macos') }}
run: brew install libpcap
- run: |
rustup update --no-self-update ${{ inputs.toolchain }}
rustup override set ${{ inputs.toolchain }}
- if: inputs.msrv
run: cp msrv.lock Cargo.lock
- name: 'LIBPCAP_VER: 1.0.0'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.0.0'
- name: 'LIBPCAP_VER: 1.2.1'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.2.1'
- name: 'LIBPCAP_VER: 1.5.0'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.5.0'
- name: 'LIBPCAP_VER: 1.5.3'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.5.3'
- name: 'LIBPCAP_VER: 1.7.2'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.7.2'
- name: 'LIBPCAP_VER: 1.9.0'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.9.0'
- name: 'LIBPCAP_VER: 1.9.1'
run: cargo build --lib --tests
env:
LIBPCAP_VER: '1.9.1'
- run: cargo build --all-targets
- run: cargo test --all-targets
- run: cargo build --all-targets --release
- run: cargo test --all-targets --release
- if: ${{ ! inputs.msrv }}
run: cargo build --all-targets --all-features
- if: ${{ ! inputs.msrv}}
run: cargo test --all-targets --all-features
- if: ${{ ! inputs.msrv }}
run: cargo build --all-targets --release --all-features
- if: ${{ ! inputs.msrv}}
run: cargo test --all-targets --release --all-features