]> git.lizzy.rs Git - rust.git/blob - .github/workflows/linux.yml
Use rustup in CI to automatically determine the toolchain version needed
[rust.git] / .github / workflows / linux.yml
1 name: linux
2 on:
3   push:
4     branches:
5       - master
6   pull_request:
7
8 jobs:
9   test:
10     runs-on: ubuntu-latest
11     name: (${{ matrix.target }}, nightly)
12     strategy:
13       # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
14       # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
15       # In order to prevent overusing too much of that 60 limit, we throttle the
16       # number of rustfmt jobs that will run concurrently.
17       max-parallel: 1
18       fail-fast: false
19       matrix:
20         target: [
21           x86_64-unknown-linux-gnu,
22         ]
23
24     steps:
25     - name: checkout
26       uses: actions/checkout@v2
27
28       # Run build
29     - name: install rustup
30       run: |
31         curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
32         sh rustup-init.sh -y --default-toolchain none
33         rustup target add ${{ matrix.target }}
34
35     - name: build
36       run: |
37         rustc -Vv
38         cargo -V
39         cargo build
40
41     - name: test
42       run: cargo test