]> git.proxmox.com Git - rustc.git/blame - library/backtrace/.github/workflows/main.yml
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / library / backtrace / .github / workflows / main.yml
CommitLineData
3dfed10e
XL
1name: CI
2
3on:
4 push:
5 branches:
6 - master
7 pull_request:
8 branches:
9 - master
10
11jobs:
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
3dfed10e
XL
55 - run: cargo build
56 - run: cargo test
3dfed10e
XL
57 - run: cargo test --features "serialize-rustc"
58 - run: cargo test --features "serialize-serde"
59 - run: cargo test --features "verify-winapi"
60 - run: cargo test --features "cpp_demangle"
61 - run: cargo test --no-default-features
3dfed10e
XL
62 - run: cargo test --no-default-features --features "std"
63 - run: cargo test --manifest-path crates/cpp_smoke_test/Cargo.toml
94222f64 64 # This test is specifically about packed debuginfo with `*.dSYM` files
3dfed10e 65 - run: cargo test --manifest-path crates/macos_frames_test/Cargo.toml
94222f64
XL
66 env:
67 CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: packed
68 CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: packed
3dfed10e 69 - run: cargo test --features gimli-symbolize --manifest-path crates/without_debuginfo/Cargo.toml
3dfed10e 70 - run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features gimli-symbolize
cdc7bbd5 71
94222f64 72 # Test debuginfo compression still works
cdc7bbd5 73 - run: cargo test
3dfed10e 74 if: contains(matrix.os, 'ubuntu')
cdc7bbd5
XL
75 env:
76 RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gabi"
77 - run: cargo test
3dfed10e 78 if: contains(matrix.os, 'ubuntu')
cdc7bbd5
XL
79 env:
80 RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gnu"
81
82 # Test that, on macOS, packed/unpacked debuginfo both work
83 - run: cargo clean && cargo test
84 # Test that, on macOS, packed/unpacked debuginfo both work
85 if: matrix.os == 'macos-latest'
86 env:
87 CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: unpacked
88 CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: unpacked
89 - run: cargo clean && cargo test
90 if: matrix.os == 'macos-latest'
91 env:
92 CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: packed
93 CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: packed
94
95 # Test that, on Linux, packed/unpacked debuginfo both work
96 - run: cargo clean && cargo test
97 if: matrix.rust == 'nightly'
98 env:
99 RUSTFLAGS: "-C split-debuginfo=unpacked -Zunstable-options"
100 - run: cargo clean && cargo test
101 if: matrix.rust == 'nightly'
102 env:
103 RUSTFLAGS: "-C split-debuginfo=packed -Zunstable-options"
104
94222f64
XL
105 # Test that separate debug info works
106 - run: ./ci/debuglink-docker.sh
107 if: contains(matrix.os, 'ubuntu')
108
109 # Test that including as a submodule will still work, both with and without
110 # the `backtrace` feature enabled.
3dfed10e 111 - run: cargo build --manifest-path crates/as-if-std/Cargo.toml
94222f64 112 - run: cargo build --manifest-path crates/as-if-std/Cargo.toml --no-default-features
3dfed10e
XL
113
114 windows_arm64:
115 name: Windows AArch64
116 runs-on: windows-latest
117 steps:
118 - uses: actions/checkout@v1
119 with:
120 submodules: true
121 - name: Install Rust
122 run: rustup update stable --no-self-update && rustup default stable
123 shell: bash
fc512014
XL
124 - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
125 shell: bash
3dfed10e
XL
126 - run: rustup target add aarch64-pc-windows-msvc
127 - run: cargo test --no-run --target aarch64-pc-windows-msvc
128 - run: cargo test --no-run --target aarch64-pc-windows-msvc --features verify-winapi
129
130 ios:
131 name: iOS
132 runs-on: macos-latest
133 strategy:
134 matrix:
3dfed10e
XL
135 include:
136 - target: aarch64-apple-ios
137 sdk: iphoneos
138 - target: x86_64-apple-ios
139 sdk: iphonesimulator
140 steps:
141 - uses: actions/checkout@v1
142 with:
143 submodules: true
3dfed10e
XL
144 - run: rustup target add ${{ matrix.target }}
145 - run: |
fc512014 146 export RUSTFLAGS=-Dwarnings
3dfed10e
XL
147 export SDK_PATH=`xcrun --show-sdk-path --sdk ${{ matrix.sdk }}`
148 export RUSTFLAGS="-C link-arg=-isysroot -C link-arg=$SDK_PATH"
149 cargo test --no-run --target ${{ matrix.target }}
150 name: Build tests
151
152 docker:
153 name: Docker
154 runs-on: ubuntu-latest
155 strategy:
156 matrix:
157 target:
158 - aarch64-unknown-linux-gnu
159 - arm-unknown-linux-gnueabihf
160 - armv7-unknown-linux-gnueabihf
161 - i586-unknown-linux-gnu
162 - i686-unknown-linux-gnu
163 - powerpc64-unknown-linux-gnu
fc512014 164 - s390x-unknown-linux-gnu
3dfed10e
XL
165 - x86_64-pc-windows-gnu
166 - x86_64-unknown-linux-gnu
167 - x86_64-unknown-linux-musl
168 - arm-linux-androideabi
169 - armv7-linux-androideabi
170 - aarch64-linux-android
171 - i686-linux-android
172 - x86_64-linux-android
173 steps:
174 - uses: actions/checkout@v1
175 with:
176 submodules: true
177 - name: Install Rust
178 run: rustup update stable && rustup default stable
179 - run: rustup target add ${{ matrix.target }}
180 - run: cargo generate-lockfile
fc512014
XL
181 - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
182 shell: bash
3dfed10e
XL
183 - run: ./ci/run-docker.sh ${{ matrix.target }}
184
185 rustfmt:
186 name: Rustfmt
187 runs-on: ubuntu-latest
188 steps:
189 - uses: actions/checkout@v1
190 with:
191 submodules: true
192 - name: Install Rust
193 run: rustup update stable && rustup default stable && rustup component add rustfmt
194 - run: cargo fmt --all -- --check
195
196 build:
197 name: Build Targets
198 runs-on: ubuntu-latest
199 strategy:
200 matrix:
cdc7bbd5
XL
201 target:
202 - wasm32-unknown-unknown
203 - wasm32-wasi
204 - x86_64-fuchsia
205 - x86_64-fortanix-unknown-sgx
206 - x86_64-unknown-illumos
3dfed10e
XL
207 steps:
208 - uses: actions/checkout@v1
209 with:
210 submodules: true
211 - name: Install Rust
212 run: rustup update nightly && rustup default nightly
213 - run: rustup target add ${{ matrix.target }}
fc512014
XL
214 - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
215 shell: bash
3dfed10e 216 - run: cargo build --target ${{ matrix.target }}
cdc7bbd5 217 - run: cargo build --manifest-path crates/as-if-std/Cargo.toml --target ${{ matrix.target }}
3dfed10e
XL
218
219 msrv:
220 name: MSRV
221 runs-on: ubuntu-latest
222 steps:
223 - uses: actions/checkout@v1
224 with:
225 submodules: true
226 - name: Install Rust
cdc7bbd5 227 run: rustup update 1.42.0 && rustup default 1.42.0
3dfed10e 228 - run: cargo build
29967ef6
XL
229
230 miri:
231 name: Miri
232 runs-on: ubuntu-latest
233 steps:
234 - uses: actions/checkout@v1
235 with:
236 submodules: true
237 - name: Install Rust
238 run: ./ci/miri-rustup.sh
239 - run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test