|
| 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: |
| 17 | + thing: [stable, beta, nightly, macos, windows-msvc64, windows-msvc32, windows-gnu64, windows-gnu32] |
| 18 | + include: |
| 19 | + - thing: stable |
| 20 | + os: ubuntu-latest |
| 21 | + rust: stable |
| 22 | + - thing: beta |
| 23 | + os: ubuntu-latest |
| 24 | + rust: beta |
| 25 | + - thing: nightly |
| 26 | + os: ubuntu-latest |
| 27 | + rust: nightly |
| 28 | + - thing: macos |
| 29 | + os: macos-latest |
| 30 | + rust: stable |
| 31 | + # Note that these are on nightly due to rust-lang/rust#63700 not being |
| 32 | + # on stable yet |
| 33 | + - thing: windows-msvc64 |
| 34 | + os: windows-latest |
| 35 | + rust: nightly-x86_64-msvc |
| 36 | + - thing: windows-msvc32 |
| 37 | + os: windows-latest |
| 38 | + rust: nightly-i686-msvc |
| 39 | + - thing: windows-gnu64 |
| 40 | + os: windows-latest |
| 41 | + rust: nightly-x86_64-gnu |
| 42 | + - thing: windows-gnu32 |
| 43 | + os: windows-latest |
| 44 | + rust: nightly-i686-gnu |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@master |
| 47 | + with: |
| 48 | + submodules: true |
| 49 | + - name: Install Rust (rustup) |
| 50 | + run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} |
| 51 | + if: matrix.os != 'macos-latest' |
| 52 | + - name: Install Rust (macos) |
| 53 | + run: | |
| 54 | + curl https://sh.rustup.rs | sh -s -- -y |
| 55 | + echo "##[add-path]$HOME/.cargo/bin" |
| 56 | + if: matrix.os == 'macos-latest' |
| 57 | + # full fidelity of backtraces on 32-bit msvc requires frame pointers, so |
| 58 | + # enable that for our tests |
| 59 | + - name: Force frame pointers |
| 60 | + run: echo "##[set-env name=RUSTFLAGS]-Cforce-frame-pointers" |
| 61 | + shell: bash |
| 62 | + if: matrix.thing == 'windows-msvc32' |
| 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 --no-default-features |
| 68 | + - run: cargo test --no-default-features --features "std" |
| 69 | + - run: cargo test --no-default-features --features "libunwind std" |
| 70 | + - run: cargo test --no-default-features --features "libunwind dladdr std" |
| 71 | + - run: cargo test --no-default-features --features "libunwind libbacktrace std" |
| 72 | + - run: cargo test --no-default-features --features "libunwind libbacktrace dbghelp std" |
| 73 | + - run: cargo test --no-default-features --features "libunwind coresymbolication dbghelp std" |
| 74 | + - run: cargo test --no-default-features --features "libunwind coresymbolication dbghelp std libbacktrace" |
| 75 | + - run: cargo test --no-default-features --features "unix-backtrace std" |
| 76 | + - run: cargo test --no-default-features --features "unix-backtrace dladdr std" |
| 77 | + - run: cargo test --no-default-features --features "unix-backtrace libbacktrace std" |
| 78 | + - run: cargo test --no-default-features --features "unix-backtrace coresymbolication std" |
| 79 | + - run: cargo test --no-default-features --features "serialize-serde std" |
| 80 | + - run: cargo test --no-default-features --features "serialize-rustc std" |
| 81 | + - run: cargo test --no-default-features --features "serialize-rustc serialize-serde std" |
| 82 | + - run: cargo test --no-default-features --features "cpp_demangle std" |
| 83 | + - run: cargo test --no-default-features --features "dbghelp std" |
| 84 | + - run: cargo test --no-default-features --features "dbghelp std verify-winapi" |
| 85 | + - run: cargo test --manifest-path crates/cpp_smoke_test/Cargo.toml |
| 86 | + - run: cargo test --features libbacktrace --manifest-path crates/without_debuginfo/Cargo.toml |
| 87 | + - run: cargo test --features "libbacktrace coresymbolication" --manifest-path crates/without_debuginfo/Cargo.toml |
| 88 | + - run: cargo test --features "libbacktrace gimli-symbolize" --manifest-path crates/without_debuginfo/Cargo.toml |
| 89 | + |
| 90 | + windows_arm64: |
| 91 | + name: Windows AArch64 |
| 92 | + runs-on: windows-latest |
| 93 | + steps: |
| 94 | + - uses: actions/checkout@master |
| 95 | + with: |
| 96 | + submodules: true |
| 97 | + - name: Install Rust |
| 98 | + run: rustup update stable && rustup default stable |
| 99 | + - run: rustup target add aarch64-pc-windows-msvc |
| 100 | + - run: cargo test --no-run --target aarch64-pc-windows-msvc |
| 101 | + - run: cargo test --no-run --target aarch64-pc-windows-msvc --features verify-winapi |
| 102 | + |
| 103 | + ios: |
| 104 | + name: iOS |
| 105 | + runs-on: macos-latest |
| 106 | + strategy: |
| 107 | + matrix: |
| 108 | + target: |
| 109 | + - aarch64-apple-ios |
| 110 | + - armv7-apple-ios |
| 111 | + - armv7s-apple-ios |
| 112 | + - i386-apple-ios |
| 113 | + - x86_64-apple-ios |
| 114 | + include: |
| 115 | + - target: aarch64-apple-ios |
| 116 | + sdk: iphoneos |
| 117 | + - target: armv7-apple-ios |
| 118 | + sdk: iphoneos |
| 119 | + - target: armv7s-apple-ios |
| 120 | + sdk: iphoneos |
| 121 | + - target: i386-apple-ios |
| 122 | + sdk: iphonesimulator |
| 123 | + - target: x86_64-apple-ios |
| 124 | + sdk: iphonesimulator |
| 125 | + steps: |
| 126 | + - uses: actions/checkout@master |
| 127 | + with: |
| 128 | + submodules: true |
| 129 | + - name: Install Rust ( |
| 130 | + run: | |
| 131 | + curl https://sh.rustup.rs | sh -s -- -y |
| 132 | + echo "##[add-path]$HOME/.cargo/bin" |
| 133 | + - run: rustup target add ${{ matrix.target }} |
| 134 | + - run: | |
| 135 | + export SDK_PATH=`xcrun --show-sdk-path --sdk ${{ matrix.sdk }}` |
| 136 | + export RUSTFLAGS="-C link-arg=-isysroot -C link-arg=$SDK_PATH" |
| 137 | + cargo test --no-run --target ${{ matrix.target }} |
| 138 | + name: Build tests |
| 139 | +
|
| 140 | + docker: |
| 141 | + name: Docker |
| 142 | + runs-on: ubuntu-latest |
| 143 | + strategy: |
| 144 | + matrix: |
| 145 | + target: |
| 146 | + - aarch64-unknown-linux-gnu |
| 147 | + - arm-unknown-linux-gnueabihf |
| 148 | + - armv7-unknown-linux-gnueabihf |
| 149 | + - i586-unknown-linux-gnu |
| 150 | + - i686-unknown-linux-gnu |
| 151 | + - powerpc64-unknown-linux-gnu |
| 152 | + - x86_64-pc-windows-gnu |
| 153 | + - x86_64-unknown-linux-gnu |
| 154 | + - x86_64-unknown-linux-musl |
| 155 | + - arm-linux-androideabi |
| 156 | + - armv7-linux-androideabi |
| 157 | + - aarch64-linux-android |
| 158 | + - i686-linux-android |
| 159 | + - x86_64-linux-android |
| 160 | + steps: |
| 161 | + - uses: actions/checkout@master |
| 162 | + with: |
| 163 | + submodules: true |
| 164 | + - name: Install Rust |
| 165 | + run: rustup update stable && rustup default stable |
| 166 | + - run: rustup target add ${{ matrix.target }} |
| 167 | + - run: cargo generate-lockfile |
| 168 | + - run: ./ci/run-docker.sh ${{ matrix.target }} |
| 169 | + |
| 170 | + rustfmt: |
| 171 | + name: Rustfmt |
| 172 | + runs-on: ubuntu-latest |
| 173 | + steps: |
| 174 | + - uses: actions/checkout@master |
| 175 | + with: |
| 176 | + submodules: true |
| 177 | + - name: Install Rust |
| 178 | + run: rustup update stable && rustup default stable && rustup component add rustfmt |
| 179 | + - run: cargo fmt --all -- --check |
| 180 | + |
| 181 | + wasm: |
| 182 | + name: WebAssembly |
| 183 | + runs-on: ubuntu-latest |
| 184 | + steps: |
| 185 | + - uses: actions/checkout@master |
| 186 | + with: |
| 187 | + submodules: true |
| 188 | + - name: Install Rust |
| 189 | + run: rustup update stable && rustup default stable |
| 190 | + - run: rustup target add wasm32-unknown-unknown |
| 191 | + - run: cargo build --target wasm32-unknown-unknown |
| 192 | + |
| 193 | + msrv: |
| 194 | + name: MSRV |
| 195 | + runs-on: ubuntu-latest |
| 196 | + steps: |
| 197 | + - uses: actions/checkout@master |
| 198 | + with: |
| 199 | + submodules: true |
| 200 | + - name: Install Rust |
| 201 | + run: rustup update 1.32.0 && rustup default 1.32.0 |
| 202 | + - run: cargo build |
0 commit comments