-
Notifications
You must be signed in to change notification settings - Fork 19
52 lines (48 loc) · 1.56 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Continuous integration
on:
push:
branches:
- master
pull_request:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: 1.36.0 # MSRV
- rust: stable
- rust: beta
- rust: nightly
- rust: nightly-i686-unknown-linux-gnu
- rust: stable
target: s390x-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Install packages
if: matrix.rust == 'nightly-i686-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get install -y gcc-multilib
- name: Tests
env:
TARGET: ${{ matrix.target }}
run: ./ci/script.sh
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
# protection, rather than having to add each job separately.
success:
name: bors
runs-on: ubuntu-latest
needs: [tests]
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'