|
| 1 | +name: Rust |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches-ignore: |
| 6 | + - trying.tmp |
| 7 | + - staging.tmp |
| 8 | + pull_request: |
| 9 | + |
| 10 | +jobs: |
| 11 | + miri: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - env: |
| 16 | + TARGET: x86_64-unknown-linux-gnu |
| 17 | + run: sh ci/miri.sh |
| 18 | + |
| 19 | + rustfmt_clippy: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + - env: |
| 24 | + TARGET: i586-unknown-linux-gnu |
| 25 | + run: sh ci/tools.sh |
| 26 | + |
| 27 | + test: |
| 28 | + runs-on: ${{ matrix.os }} |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v2 |
| 31 | + - uses: actions-rs/toolchain@v1 |
| 32 | + with: |
| 33 | + toolchain: ${{ matrix.channel }} |
| 34 | + override: true |
| 35 | + - env: |
| 36 | + TARGET: ${{ matrix.target }} |
| 37 | + CHANNEL: ${{ matrix.channel }} |
| 38 | + CROSS: ${{ matrix.target != 'x86_64-unknown-linux-gnu' && '1' || '0' }} |
| 39 | + NO_STD: ${{ matrix.target == 'thumbv6m-none-eabi' && '1' || '0' }} |
| 40 | + run: sh ci/run.sh |
| 41 | + strategy: |
| 42 | + matrix: |
| 43 | + os: [ubuntu-latest] |
| 44 | + target: [ |
| 45 | + x86_64-unknown-linux-gnu, |
| 46 | + i686-unknown-linux-gnu, |
| 47 | + i586-unknown-linux-gnu, |
| 48 | + armv7-unknown-linux-gnueabihf, |
| 49 | + aarch64-unknown-linux-gnu, |
| 50 | + thumbv6m-none-eabi, |
| 51 | + x86_64-pc-windows-gnu, |
| 52 | + ] |
| 53 | + channel: [1.49.0, nightly] |
| 54 | + include: |
| 55 | + - os: macos-latest |
| 56 | + target: x86_64-apple-darwin |
| 57 | + channel: nightly |
| 58 | + - os: windows-latest |
| 59 | + target: x86_64-pc-windows-msvc |
| 60 | + channel: nightly |
| 61 | + - os: macos-latest |
| 62 | + target: x86_64-apple-darwin |
| 63 | + channel: 1.49.0 |
| 64 | + - os: windows-latest |
| 65 | + target: x86_64-pc-windows-msvc |
| 66 | + channel: 1.49.0 |
| 67 | + - os: ubuntu-latest |
| 68 | + target: x86_64-unknown-linux-gnu |
| 69 | + channel: beta |
| 70 | + - os: ubuntu-latest |
| 71 | + target: x86_64-unknown-linux-gnu |
| 72 | + channel: stable |
| 73 | + |
| 74 | + # These jobs doesn't actually test anything, but they're only used to tell |
| 75 | + # bors the build completed, as there is no practical way to detect when a |
| 76 | + # workflow is successful listening to webhooks only. |
| 77 | + # |
| 78 | + # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! |
| 79 | + |
| 80 | + end-success: |
| 81 | + name: bors build finished |
| 82 | + if: github.event.pusher.name == 'bors' && success() |
| 83 | + runs-on: ubuntu-latest |
| 84 | + needs: [miri, rustfmt_clippy, test] |
| 85 | + |
| 86 | + steps: |
| 87 | + - name: Mark the job as successful |
| 88 | + run: exit 0 |
| 89 | + |
| 90 | + end-failure: |
| 91 | + name: bors build finished |
| 92 | + if: github.event.pusher.name == 'bors' && (failure() || cancelled()) |
| 93 | + runs-on: ubuntu-latest |
| 94 | + needs: [miri, rustfmt_clippy, test] |
| 95 | + |
| 96 | + steps: |
| 97 | + - name: Mark the job as a failure |
| 98 | + run: exit 1 |
0 commit comments