-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (73 loc) · 2.39 KB
/
ci.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
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v1
with:
components: rustfmt, clippy
- uses: pre-commit/[email protected]
with:
extra_args: --all-files
msrv-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-msrv
- name: Check cospeed MSRV
run: cargo msrv --path crates/codspeed verify -- cargo check --all-features --config codspeed=true
- name: Check bencher_compat MSRV
run: cargo msrv --path crates/bencher_compat verify -- cargo check --all-features --config codspeed=true
- name: Check criterion_compat MSRV
run: cargo msrv --path crates/criterion_compat verify -- cargo check --all-features --config codspeed=true
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v1
- run: cargo test --all
compat-integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v1
with:
cache-target: release
- run: cargo install --path crates/cargo-codspeed --locked
- run: cargo codspeed build -p codspeed
- run: cargo codspeed build -p codspeed-bencher-compat
- run: cargo codspeed build --features async_futures -p codspeed-criterion-compat
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
build-upload-binaries:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: aarch64-unknown-linux-gnu
setup: |
sudo apt-get install -y gcc-aarch64-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v0
with:
targets: ${{ matrix.target }}
cache-target: ${{ matrix.target }}/release
- name: Setup environment for target
if: ${{ matrix.setup }}
run: ${{ matrix.setup }}
- run: cargo build --release --features vendored-openssl --bin cargo-codspeed --target ${{ matrix.target }}