]> git.proxmox.com Git - rustc.git/blob - src/tools/rustfmt/.github/workflows/linux.yml
New upstream version 1.61.0+dfsg1
[rustc.git] / src / tools / rustfmt / .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 }}, ${{ matrix.cfg_release_channel }})
12 env:
13 CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
14 strategy:
15 # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
16 # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
17 # In order to prevent overusing too much of that 60 limit, we throttle the
18 # number of rustfmt jobs that will run concurrently.
19 max-parallel: 1
20 fail-fast: false
21 matrix:
22 target: [
23 x86_64-unknown-linux-gnu,
24 ]
25 cfg_release_channel: [nightly, stable]
26
27 steps:
28 - name: checkout
29 uses: actions/checkout@v2
30
31 # Run build
32 - name: install rustup
33 run: |
34 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
35 sh rustup-init.sh -y --default-toolchain none
36 rustup target add ${{ matrix.target }}
37
38 - name: build
39 run: |
40 rustc -Vv
41 cargo -V
42 cargo build
43 env:
44 RUSTFLAGS: '-D warnings'
45
46 - name: test
47 run: cargo test
48 env:
49 RUSTFLAGS: '-D warnings'