• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on: [push, pull_request]
4
5jobs:
6  # This job downloads and stores `cross` as an artifact, so that it can be
7  # redownloaded across all of the jobs. Currently this copied pasted between
8  # `ci.yml` and `deploy.yml`. Make sure to update both places when making
9  # changes.
10  install-cross:
11    runs-on: ubuntu-latest
12    steps:
13      - uses: XAMPPRocky/get-github-release@v1
14        id: cross
15        with:
16          owner: rust-embedded
17          repo: cross
18          matches: ${{ matrix.platform }}
19          token: ${{ secrets.GITHUB_TOKEN }}
20      - uses: actions/upload-artifact@v2
21        with:
22          name: cross-${{ matrix.platform }}
23          path: ${{ steps.cross.outputs.install_path }}
24    strategy:
25      matrix:
26        platform: [linux-musl]
27
28  windows:
29    runs-on: windows-latest
30    # Windows technically doesn't need this, but if we don't block windows on it
31    # some of the windows jobs could fill up the concurrent job queue before
32    # one of the install-cross jobs has started, so this makes sure all
33    # artifacts are downloaded first.
34    needs: install-cross
35    steps:
36      - uses: actions/checkout@v2
37        with:
38          submodules: true
39      - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
40        shell: bash
41      - run: ci/test.bash cargo ${{ matrix.target }}
42        shell: bash
43
44    strategy:
45      fail-fast: false
46      matrix:
47        channel: [stable, beta, nightly]
48        target:
49          - i686-pc-windows-msvc
50          - x86_64-pc-windows-msvc
51          - i686-pc-windows-gnu
52          - x86_64-pc-windows-gnu
53
54  macos:
55    runs-on: macos-latest
56    # macOS isn't currently using this either, but see the note about Windows above.
57    needs: install-cross
58    steps:
59      - uses: actions/checkout@v2
60        with:
61          submodules: true
62      - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
63      - run: ci/test.bash cargo ${{ matrix.target }}
64
65    strategy:
66      fail-fast: false
67      matrix:
68        channel: [stable, beta, nightly]
69        target:
70          - x86_64-apple-darwin
71
72  linux:
73    runs-on: ubuntu-latest
74    needs: install-cross
75    steps:
76      - uses: actions/checkout@v2
77        with:
78          submodules: true
79
80      - name: Download Cross
81        uses: actions/download-artifact@v1
82        with:
83          name: cross-linux-musl
84          path: /tmp/
85      - run: chmod +x /tmp/cross
86      - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
87      - run: ci/test.bash /tmp/cross ${{ matrix.target }}
88
89    strategy:
90      fail-fast: false
91      matrix:
92        channel: [stable, beta, nightly]
93        target:
94          - aarch64-unknown-linux-gnu
95          - aarch64-unknown-linux-musl
96          #- arm-unknown-linux-gnueabi
97          - arm-unknown-linux-gnueabihf
98          #- arm-unknown-linux-musleabi
99          - arm-unknown-linux-musleabihf
100          #- armv5te-unknown-linux-musleabi
101          - armv7-unknown-linux-gnueabihf
102          - armv7-unknown-linux-musleabihf
103          - i586-unknown-linux-gnu
104          - i586-unknown-linux-musl
105          - i686-unknown-linux-gnu
106          - i686-unknown-linux-musl
107          #- powerpc-unknown-linux-gnu
108          #- powerpc64-unknown-linux-gnu
109          #- powerpc64le-unknown-linux-gnu
110          - s390x-unknown-linux-gnu
111          - x86_64-unknown-linux-gnu
112          - x86_64-unknown-linux-musl
113