• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: rust-next
2on:
3  schedule:
4  - cron: '3 3 3 * *'
5permissions:
6  contents: read
7
8jobs:
9  test:
10    name: Test
11    strategy:
12      matrix:
13        build: [stable, linux, windows, mac, nightly, minimal, default, next]
14        include:
15        - build: stable
16          os: ubuntu-latest
17          rust: "stable"
18          features: "full"
19        - build: linux
20          os: ubuntu-latest
21          rust: "beta"
22          features: "full"
23        - build: windows
24          os: windows-latest
25          rust: "beta"
26          features: "full"
27        - build: mac
28          os: macos-latest
29          rust: "beta"
30          features: "full"
31        - build: nightly
32          os: ubuntu-latest
33          rust: "nightly"
34          features: "full"
35        - build: minimal
36          os: ubuntu-latest
37          rust: "stable"
38          features: "minimal"
39        - build: default
40          os: ubuntu-latest
41          rust: "stable"
42          features: "default"
43        - build: next
44          os: ubuntu-latest
45          rust: "stable"
46          features: "next"
47    continue-on-error: ${{ matrix.rust != 'stable' }}
48    runs-on: ${{ matrix.os }}
49    steps:
50    - name: Checkout repository
51      uses: actions/checkout@v3
52    - name: Install Rust
53      uses: actions-rs/toolchain@v1
54      with:
55        toolchain: ${{ matrix.rust }}
56        profile: minimal
57        override: true
58    - uses: Swatinem/rust-cache@v2
59    - name: Build
60      run: make build-${{matrix.features}}
61    - name: Test
62      run: make test-${{matrix.features}}
63    - name: Test (benches)
64      run: make test-${{matrix.features}} ARGS='--workspace --benches'
65    - name: Test (ultra-minimal)
66      if: matrix.build == 'minimal'
67      run: make test-minimal ARGS='--manifest-path Cargo.toml'
68  rustfmt:
69    name: rustfmt
70    strategy:
71      matrix:
72        rust:
73        - stable
74        - beta
75    continue-on-error: ${{ matrix.rust != 'stable' }}
76    runs-on: ubuntu-latest
77    steps:
78    - name: Checkout repository
79      uses: actions/checkout@v3
80    - name: Install Rust
81      uses: actions-rs/toolchain@v1
82      with:
83        toolchain: ${{ matrix.rust }}
84        profile: minimal
85        override: true
86        components: rustfmt
87    - uses: Swatinem/rust-cache@v2
88    - name: Check formatting
89      run: cargo fmt --all -- --check
90  clippy:
91    name: clippy
92    strategy:
93      matrix:
94        rust:
95        - 1.64.0  # MSRV
96        - stable
97    continue-on-error: ${{ matrix.rust != '1.64.0' }}  # MSRV
98    runs-on: ubuntu-latest
99    steps:
100    - name: Checkout repository
101      uses: actions/checkout@v3
102    - name: Install Rust
103      uses: actions-rs/toolchain@v1
104      with:
105        toolchain: ${{ matrix.rust }}
106        profile: minimal
107        override: true
108        components: clippy
109    - uses: Swatinem/rust-cache@v2
110    - name: Lint (ultra-minimal)
111      run: make clippy-minimal ARGS='--manifest-path Cargo.toml'
112    - name: Lint Minimal
113      run: make clippy-minimal
114    - name: Lint All
115      run: make clippy-full
116    - name: Lint (release)
117      run: make clippy-release
118