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