]>
Commit | Line | Data |
---|---|---|
3dfed10e XL |
1 | name: CI |
2 | ||
3 | on: | |
4 | push: | |
5 | branches: | |
6 | - master | |
7 | pull_request: | |
8 | branches: | |
9 | - master | |
10 | ||
11 | jobs: | |
12 | test: | |
13 | name: Test | |
14 | runs-on: ${{ matrix.os }} | |
15 | strategy: | |
16 | matrix: | |
3dfed10e | 17 | include: |
cdc7bbd5 | 18 | - os: ubuntu-latest |
3dfed10e | 19 | rust: stable |
cdc7bbd5 | 20 | - os: ubuntu-latest |
3dfed10e | 21 | rust: beta |
cdc7bbd5 | 22 | - os: ubuntu-latest |
3dfed10e | 23 | rust: nightly |
cdc7bbd5 | 24 | - os: macos-latest |
3dfed10e | 25 | rust: stable |
cdc7bbd5 | 26 | - os: macos-latest |
fc512014 | 27 | rust: nightly |
3dfed10e XL |
28 | # Note that these are on nightly due to rust-lang/rust#63700 not being |
29 | # on stable yet | |
cdc7bbd5 | 30 | - os: windows-latest |
3dfed10e | 31 | rust: stable-x86_64-msvc |
cdc7bbd5 | 32 | - os: windows-latest |
3dfed10e | 33 | rust: stable-i686-msvc |
cdc7bbd5 | 34 | - os: windows-latest |
3dfed10e | 35 | rust: stable-x86_64-gnu |
cdc7bbd5 | 36 | - os: windows-latest |
3dfed10e XL |
37 | rust: stable-i686-gnu |
38 | steps: | |
39 | - uses: actions/checkout@v1 | |
40 | with: | |
41 | submodules: true | |
42 | - name: Install Rust (rustup) | |
43 | run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
44 | shell: bash | |
fc512014 XL |
45 | - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV |
46 | shell: bash | |
cdc7bbd5 | 47 | |
3dfed10e XL |
48 | # full fidelity of backtraces on 32-bit msvc requires frame pointers, so |
49 | # enable that for our tests | |
50 | - name: Force frame pointers | |
fc512014 | 51 | run: echo RUSTFLAGS="-Cforce-frame-pointers $RUSTFLAGS" >> $GITHUB_ENV |
3dfed10e | 52 | shell: bash |
cdc7bbd5 XL |
53 | if: matrix.rust == 'stable-i686-msvc' |
54 | ||
55 | # Force packed debuginfo on macOS because libbacktrace only works with | |
56 | # packed debuginfo. We specifically test later that both packed and | |
57 | # unpacked work. | |
58 | - run: | | |
59 | echo CARGO_PROFILE_DEV_SPLIT_DEBUGINFO=packed >> $GITHUB_ENV | |
60 | echo CARGO_PROFILE_TEST_SPLIT_DEBUGINFO=packed >> $GITHUB_ENV | |
61 | if: matrix.os == 'macos-latest' | |
62 | ||
3dfed10e XL |
63 | - run: cargo build --manifest-path crates/backtrace-sys/Cargo.toml |
64 | - run: cargo build | |
65 | - run: cargo test | |
66 | - run: cargo test --features "gimli-symbolize" | |
67 | - run: cargo test --features "libbacktrace" | |
cdc7bbd5 | 68 | - run: cargo check --features "libbacktrace gimli-symbolize" |
3dfed10e XL |
69 | - run: cargo test --features "serialize-rustc" |
70 | - run: cargo test --features "serialize-serde" | |
71 | - run: cargo test --features "verify-winapi" | |
72 | - run: cargo test --features "cpp_demangle" | |
73 | - run: cargo test --no-default-features | |
74 | - run: cargo test --no-default-features --features "libbacktrace" | |
75 | - run: cargo test --no-default-features --features "gimli-symbolize" | |
76 | - run: cargo test --no-default-features --features "gimli-symbolize libbacktrace" | |
77 | - run: cargo test --no-default-features --features "libbacktrace std" | |
78 | - run: cargo test --no-default-features --features "gimli-symbolize std" | |
79 | - run: cargo test --no-default-features --features "std" | |
80 | - run: cargo test --manifest-path crates/cpp_smoke_test/Cargo.toml | |
81 | - run: cargo test --manifest-path crates/macos_frames_test/Cargo.toml | |
82 | - run: cargo test --features libbacktrace --manifest-path crates/without_debuginfo/Cargo.toml | |
83 | - run: cargo test --features gimli-symbolize --manifest-path crates/without_debuginfo/Cargo.toml | |
84 | - run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features libbacktrace | |
85 | - run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features gimli-symbolize | |
cdc7bbd5 XL |
86 | |
87 | # Test that if debuginfo is compressed gimli still works | |
88 | - run: cargo test | |
3dfed10e | 89 | if: contains(matrix.os, 'ubuntu') |
cdc7bbd5 XL |
90 | env: |
91 | RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gabi" | |
92 | - run: cargo test | |
3dfed10e | 93 | if: contains(matrix.os, 'ubuntu') |
cdc7bbd5 XL |
94 | env: |
95 | RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gnu" | |
96 | ||
97 | # Test that, on macOS, packed/unpacked debuginfo both work | |
98 | - run: cargo clean && cargo test | |
99 | # Test that, on macOS, packed/unpacked debuginfo both work | |
100 | if: matrix.os == 'macos-latest' | |
101 | env: | |
102 | CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: unpacked | |
103 | CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: unpacked | |
104 | - run: cargo clean && cargo test | |
105 | if: matrix.os == 'macos-latest' | |
106 | env: | |
107 | CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: packed | |
108 | CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: packed | |
109 | ||
110 | # Test that, on Linux, packed/unpacked debuginfo both work | |
111 | - run: cargo clean && cargo test | |
112 | if: matrix.rust == 'nightly' | |
113 | env: | |
114 | RUSTFLAGS: "-C split-debuginfo=unpacked -Zunstable-options" | |
115 | - run: cargo clean && cargo test | |
116 | if: matrix.rust == 'nightly' | |
117 | env: | |
118 | RUSTFLAGS: "-C split-debuginfo=packed -Zunstable-options" | |
119 | ||
120 | # Test that including as a submodule will still work | |
3dfed10e XL |
121 | - run: cargo build --manifest-path crates/as-if-std/Cargo.toml |
122 | ||
123 | windows_arm64: | |
124 | name: Windows AArch64 | |
125 | runs-on: windows-latest | |
126 | steps: | |
127 | - uses: actions/checkout@v1 | |
128 | with: | |
129 | submodules: true | |
130 | - name: Install Rust | |
131 | run: rustup update stable --no-self-update && rustup default stable | |
132 | shell: bash | |
fc512014 XL |
133 | - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV |
134 | shell: bash | |
3dfed10e XL |
135 | - run: rustup target add aarch64-pc-windows-msvc |
136 | - run: cargo test --no-run --target aarch64-pc-windows-msvc | |
137 | - run: cargo test --no-run --target aarch64-pc-windows-msvc --features verify-winapi | |
138 | ||
139 | ios: | |
140 | name: iOS | |
141 | runs-on: macos-latest | |
142 | strategy: | |
143 | matrix: | |
3dfed10e XL |
144 | include: |
145 | - target: aarch64-apple-ios | |
146 | sdk: iphoneos | |
147 | - target: x86_64-apple-ios | |
148 | sdk: iphonesimulator | |
149 | steps: | |
150 | - uses: actions/checkout@v1 | |
151 | with: | |
152 | submodules: true | |
3dfed10e XL |
153 | - run: rustup target add ${{ matrix.target }} |
154 | - run: | | |
fc512014 | 155 | export RUSTFLAGS=-Dwarnings |
3dfed10e XL |
156 | export SDK_PATH=`xcrun --show-sdk-path --sdk ${{ matrix.sdk }}` |
157 | export RUSTFLAGS="-C link-arg=-isysroot -C link-arg=$SDK_PATH" | |
158 | cargo test --no-run --target ${{ matrix.target }} | |
159 | name: Build tests | |
160 | ||
161 | docker: | |
162 | name: Docker | |
163 | runs-on: ubuntu-latest | |
164 | strategy: | |
165 | matrix: | |
166 | target: | |
167 | - aarch64-unknown-linux-gnu | |
168 | - arm-unknown-linux-gnueabihf | |
169 | - armv7-unknown-linux-gnueabihf | |
170 | - i586-unknown-linux-gnu | |
171 | - i686-unknown-linux-gnu | |
172 | - powerpc64-unknown-linux-gnu | |
fc512014 | 173 | - s390x-unknown-linux-gnu |
3dfed10e XL |
174 | - x86_64-pc-windows-gnu |
175 | - x86_64-unknown-linux-gnu | |
176 | - x86_64-unknown-linux-musl | |
177 | - arm-linux-androideabi | |
178 | - armv7-linux-androideabi | |
179 | - aarch64-linux-android | |
180 | - i686-linux-android | |
181 | - x86_64-linux-android | |
182 | steps: | |
183 | - uses: actions/checkout@v1 | |
184 | with: | |
185 | submodules: true | |
186 | - name: Install Rust | |
187 | run: rustup update stable && rustup default stable | |
188 | - run: rustup target add ${{ matrix.target }} | |
189 | - run: cargo generate-lockfile | |
fc512014 XL |
190 | - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV |
191 | shell: bash | |
3dfed10e XL |
192 | - run: ./ci/run-docker.sh ${{ matrix.target }} |
193 | ||
194 | rustfmt: | |
195 | name: Rustfmt | |
196 | runs-on: ubuntu-latest | |
197 | steps: | |
198 | - uses: actions/checkout@v1 | |
199 | with: | |
200 | submodules: true | |
201 | - name: Install Rust | |
202 | run: rustup update stable && rustup default stable && rustup component add rustfmt | |
203 | - run: cargo fmt --all -- --check | |
204 | ||
205 | build: | |
206 | name: Build Targets | |
207 | runs-on: ubuntu-latest | |
208 | strategy: | |
209 | matrix: | |
cdc7bbd5 XL |
210 | target: |
211 | - wasm32-unknown-unknown | |
212 | - wasm32-wasi | |
213 | - x86_64-fuchsia | |
214 | - x86_64-fortanix-unknown-sgx | |
215 | - x86_64-unknown-illumos | |
3dfed10e XL |
216 | steps: |
217 | - uses: actions/checkout@v1 | |
218 | with: | |
219 | submodules: true | |
220 | - name: Install Rust | |
221 | run: rustup update nightly && rustup default nightly | |
222 | - run: rustup target add ${{ matrix.target }} | |
fc512014 XL |
223 | - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV |
224 | shell: bash | |
3dfed10e | 225 | - run: cargo build --target ${{ matrix.target }} |
cdc7bbd5 | 226 | - run: cargo build --manifest-path crates/as-if-std/Cargo.toml --target ${{ matrix.target }} |
3dfed10e XL |
227 | |
228 | msrv: | |
229 | name: MSRV | |
230 | runs-on: ubuntu-latest | |
231 | steps: | |
232 | - uses: actions/checkout@v1 | |
233 | with: | |
234 | submodules: true | |
235 | - name: Install Rust | |
cdc7bbd5 | 236 | run: rustup update 1.42.0 && rustup default 1.42.0 |
3dfed10e | 237 | - run: cargo build |
29967ef6 XL |
238 | |
239 | miri: | |
240 | name: Miri | |
241 | runs-on: ubuntu-latest | |
242 | steps: | |
243 | - uses: actions/checkout@v1 | |
244 | with: | |
245 | submodules: true | |
246 | - name: Install Rust | |
247 | run: ./ci/miri-rustup.sh | |
248 | - run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test |