-
Notifications
You must be signed in to change notification settings - Fork 46
69 lines (57 loc) · 1.75 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
on:
push:
branches: [ master ]
pull_request:
merge_group:
name: Continuous integration
jobs:
ci:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
rust:
# MSRV
- "1.70.0"
- stable
os: [ubuntu-latest, macos-latest, windows-latest]
experimental: [false]
include:
- rust: nightly
os: ubuntu-latest
experimental: true
steps:
- uses: actions/checkout@v4
- name: Setup Rust
shell: bash
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal
rustup default ${{ matrix.rust }}
rustup component add llvm-tools clippy rustfmt
echo "::add-matcher::.github/workflows/rust.json"
- name: Clippy
run: cargo clippy -- -D warnings
- name: rustfmt
run: cargo fmt --all -- --check
- name: Build and install cargo-binutils
run: cargo install --path . -f
- name: Run cargo-nm
run: cargo nm --bin cargo-nm -- --undefined-only
- name: Run cargo-objdump
run: cargo objdump --bin cargo-objdump -- -h
- name: Run cargo-objcopy (on Linux only)
if: matrix.os == 'ubuntu-latest'
run: cargo objcopy --bin cargo-objdump -v -- -O binary objdump.bin
- name: Run cargo-size
run: cargo size --bin cargo-size -v
- name: Run cargo-strip (on Linux only)
if: matrix.os == 'ubuntu-latest'
run: cargo strip --bin cargo-strip -v
conclusion:
runs-on: ubuntu-latest
needs: ci
if: always()
steps:
- name: Done
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'