• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on:
2  push: # Run CI for all branches except GitHub merge queue tmp branches
3    branches-ignore:
4    - "gh-readonly-queue/**"
5  pull_request: # Run CI for PRs on any branch
6  merge_group: # Run CI for the GitHub merge queue
7
8name: Build
9
10env:
11  RUSTFLAGS: '--deny warnings'
12
13jobs:
14  build:
15    runs-on: ubuntu-latest
16    strategy:
17      matrix:
18        rust: [stable]
19        TARGET:
20          - aarch64-unknown-linux-gnu
21          - aarch64-unknown-linux-musl
22          - arm-unknown-linux-gnueabi
23          - arm-unknown-linux-gnueabihf
24          - armv7-unknown-linux-gnueabihf
25          - i686-unknown-linux-gnu
26          - i686-unknown-linux-musl
27          # - loongarch64-unknown-linux-gnu
28          - powerpc-unknown-linux-gnu
29          # - powerpc64-unknown-linux-gnu
30          - powerpc64le-unknown-linux-gnu
31          - riscv64gc-unknown-linux-gnu
32          - s390x-unknown-linux-gnu
33          - x86_64-unknown-linux-gnu
34          - x86_64-unknown-linux-musl
35
36        include:
37          # MSRV
38          - rust: 1.65.0
39            TARGET: x86_64-unknown-linux-gnu
40
41          # Test nightly but don't fail
42          - rust: nightly
43            TARGET: x86_64-unknown-linux-gnu
44            experimental: true
45
46    steps:
47      - uses: actions/checkout@v2
48      - uses: actions-rs/toolchain@v1
49        with:
50          profile: minimal
51          toolchain: ${{ matrix.rust }}
52          target: ${{ matrix.TARGET }}
53          override: true
54
55      - name: Build
56        uses: actions-rs/cargo@v1
57        with:
58          command: build
59          args: --target=${{ matrix.TARGET }}
60
61      - name: Build all features
62        uses: actions-rs/cargo@v1
63        with:
64          command: build
65          args: --target=${{ matrix.TARGET }} --all-features
66
67      - name: Test
68        uses: actions-rs/cargo@v1
69        with:
70          use-cross: true
71          command: test
72          args: --target=${{ matrix.TARGET }}
73
74      - name: Test all features
75        uses: actions-rs/cargo@v1
76        with:
77          use-cross: true
78          command: test
79          args: --target=${{ matrix.TARGET }} --all-features
80
81  checks:
82    runs-on: ubuntu-latest
83
84    steps:
85      - uses: actions/checkout@v2
86      - uses: actions-rs/toolchain@v1
87        with:
88          profile: minimal
89          toolchain: stable
90          components: rustfmt
91
92      - name: Doc
93        uses: actions-rs/cargo@v1
94        with:
95          command: doc
96
97      - name: Formatting
98        uses: actions-rs/cargo@v1
99        with:
100          command: fmt
101          args: --all -- --check
102
103  clippy:
104    runs-on: ubuntu-latest
105    env:
106      RUSTFLAGS: '--allow warnings'
107    steps:
108      - uses: actions/checkout@v2
109      - uses: actions-rs/toolchain@v1
110        with:
111          profile: minimal
112          toolchain: 1.65.0
113          components: clippy
114
115      - uses: actions-rs/clippy-check@v1
116        with:
117          token: ${{ secrets.GITHUB_TOKEN }}
118