-
Notifications
You must be signed in to change notification settings - Fork 62
141 lines (132 loc) · 4.54 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: ["ubuntu-latest"]
rust_channel: ["stable", "beta", "nightly"]
include:
- rust_channel: "stable"
os: "macOS-latest"
- rust_channel: "stable-x86_64-pc-windows-gnu"
os: "windows-latest"
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set env (macOS)
if: matrix.os == 'macOS-latest'
run: |
echo "CARGO_PROFILE_DEV_SPLIT_DEBUGINFO=packed" >> $GITHUB_ENV
echo "CARGO_PROFILE_TEST_SPLIT_DEBUGINFO=packed" >> $GITHUB_ENV
echo "CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO=packed" >> $GITHUB_ENV
echo "CARGO_PROFILE_BENCH_SPLIT_DEBUGINFO=packed" >> $GITHUB_ENV
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust channel
run: |
rustup install ${{matrix.rust_channel}}
rustup default ${{matrix.rust_channel}}
- name: Test debug
run: |
cargo test --verbose
cargo test --verbose --features all
- name: Test release
run: |
cargo test --verbose --release
cargo test --verbose --release --features all
- name: Test unpacked debuginfo
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: cargo clean && cargo test correctness --features loader
env:
RUSTFLAGS: "-C split-debuginfo=unpacked"
- name: Test packed debuginfo
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: cargo clean && cargo test correctness --features loader
env:
RUSTFLAGS: "-C split-debuginfo=packed"
features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features std
- run: cargo build --no-default-features --features std,cpp_demangle
- run: cargo build --no-default-features --features std,rustc-demangle
- run: cargo build --no-default-features --features loader
- run: cargo build --no-default-features --features fallible-iterator
- run: cargo build --no-default-features --features smallvec
- run: cargo build --no-default-features --features bin
- run: cargo build --no-default-features --features all
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install nightly rust
run: |
rustup install nightly
rustup default nightly
- run: cargo bench
bench-addr2line:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./scripts/benchmark-addr2line-docker.sh
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust
run: rustup update 1.65.0 && rustup default 1.65.0
- name: Build
run: |
# ruzstd needs rust 1.73.0
cargo update -p object --precise 0.36.0
cargo build --features loader
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust
run: |
rustup install stable
rustup default stable
rustup component add rustfmt
- run: cargo fmt --all -- --check
coverage:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust
run: |
rustup install stable
rustup default stable
- name: Build addr2line
run: cargo build --features bin
- name: Run cargo-tarpaulin
run: cargo tarpaulin --skip-clean --ignore-tests --out Lcov --implicit-test-threads
- name: Upload to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './lcov.info'
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo doc