|
1 | 1 | ---
|
2 |
| -name: CI - Build |
3 |
| -on: |
4 |
| - pull_request: |
5 |
| - push: |
6 |
| - branches: |
7 |
| - - "master" |
8 |
| - schedule: |
9 |
| - - cron: "0 16 * * 1" # 8am PST every Monday |
10 |
| -jobs: |
11 |
| - lint: |
12 |
| - name: PR Checks |
13 |
| - runs-on: ubuntu-latest |
14 |
| - steps: |
15 |
| - - uses: actions/checkout@v4 |
16 |
| - with: |
17 |
| - submodules: recursive |
| 2 | + name: CI |
| 3 | + on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - "master" |
| 8 | + schedule: |
| 9 | + - cron: "0 16 * * 1" # 8am PST every Monday |
| 10 | + jobs: |
| 11 | + lint: |
| 12 | + name: Lints |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + submodules: recursive |
18 | 18 |
|
19 |
| - - name: Install rust |
20 |
| - run: | |
21 |
| - rustup -V |
22 |
| - rustup set profile minimal |
23 |
| - rustup toolchain install stable |
24 |
| - rustup show |
| 19 | + - name: Install rust |
| 20 | + run: | |
| 21 | + rustup -V |
| 22 | + rustup set profile minimal |
| 23 | + rustup toolchain install stable |
| 24 | + rustup show |
25 | 25 |
|
26 |
| - - name: Check Formatting |
27 |
| - run: cargo fmt --check --all |
| 26 | + - name: Check Formatting |
| 27 | + run: cargo fmt --check --all |
28 | 28 |
|
29 |
| - - name: Clippy |
30 |
| - run: cargo clippy --check --workspace --all-features |
31 |
| - build: |
32 |
| - name: Build and test |
33 |
| - runs-on: ${{ matrix.os }} |
34 |
| - strategy: |
35 |
| - matrix: |
36 |
| - include: |
37 |
| - # Ubuntus |
38 |
| - - os: ubuntu-latest |
39 |
| - binary_target: x86_64-unknown-linux-musl |
40 |
| - needs_musl: true |
41 |
| - toolchain: stable |
42 |
| - - os: ubuntu-20.04 |
43 |
| - binary_target: x86_64-unknown-linux-gnu |
44 |
| - toolchain: stable |
| 29 | + - name: Clippy |
| 30 | + run: cargo clippy --check --workspace --all-features |
| 31 | + build: |
| 32 | + name: Build and test |
| 33 | + runs-on: ${{ matrix.os }} |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + include: |
| 37 | + # Ubuntus |
| 38 | + - os: ubuntu-latest |
| 39 | + binary_target: x86_64-unknown-linux-musl |
| 40 | + needs_musl: true |
| 41 | + toolchain: stable |
| 42 | + - os: ubuntu-20.04 |
| 43 | + binary_target: x86_64-unknown-linux-gnu |
| 44 | + toolchain: stable |
45 | 45 |
|
46 |
| - # MacOS ARM |
47 |
| - - os: macos-latest |
48 |
| - binary_target: aarch64-apple-darwin |
49 |
| - toolchain: stable |
| 46 | + # MacOS ARM |
| 47 | + - os: macos-latest |
| 48 | + binary_target: aarch64-apple-darwin |
| 49 | + toolchain: stable |
50 | 50 |
|
51 |
| - # Windows |
52 |
| - - os: windows-latest |
53 |
| - binary_target: x86_64-pc-windows-msvc |
54 |
| - toolchain: stable |
| 51 | + # Windows |
| 52 | + - os: windows-latest |
| 53 | + binary_target: x86_64-pc-windows-msvc |
| 54 | + toolchain: stable |
55 | 55 |
|
56 |
| - # Nightly Rust |
57 |
| - - os: ubuntu-latest |
58 |
| - binary_target: x86_64-unknown-linux-gnu |
59 |
| - toolchain: nightly |
| 56 | + # Nightly Rust |
| 57 | + - os: ubuntu-latest |
| 58 | + binary_target: x86_64-unknown-linux-gnu |
| 59 | + toolchain: nightly |
60 | 60 |
|
61 |
| - # MSRV |
62 |
| - - os: ubuntu-latest |
63 |
| - binary_target: x86_64-unknown-linux-gnu |
64 |
| - toolchain: 1.62.1 |
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v4 |
67 |
| - with: |
68 |
| - submodules: recursive |
| 61 | + # MSRV |
| 62 | + - os: ubuntu-latest |
| 63 | + binary_target: x86_64-unknown-linux-gnu |
| 64 | + toolchain: 1.62.1 |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + with: |
| 68 | + submodules: recursive |
69 | 69 |
|
70 |
| - - name: Install musl tools |
71 |
| - if: matrix.needs_musl |
72 |
| - run: | |
73 |
| - sudo apt-get install musl-tools |
74 |
| - sudo ln -s /usr/bin/musl-gcc /usr/bin/musl-g++ |
| 70 | + - name: Install musl tools |
| 71 | + if: matrix.needs_musl |
| 72 | + run: | |
| 73 | + sudo apt-get install musl-tools |
| 74 | + sudo ln -s /usr/bin/musl-gcc /usr/bin/musl-g++ |
75 | 75 |
|
76 |
| - # Required for bindgen on Windows |
77 |
| - - name: Install LLVM and Clang |
78 |
| - uses: KyleMayes/install-llvm-action@v2 |
79 |
| - if: matrix.os == 'windows-latest' |
80 |
| - with: |
81 |
| - version: "10.0" |
82 |
| - directory: ${{ runner.temp }}/llvm-10.0/ |
| 76 | + # Required for bindgen on Windows |
| 77 | + - name: Install LLVM and Clang |
| 78 | + uses: KyleMayes/install-llvm-action@v2 |
| 79 | + if: matrix.os == 'windows-latest' |
| 80 | + with: |
| 81 | + version: "10.0" |
| 82 | + directory: ${{ runner.temp }}/llvm-10.0/ |
83 | 83 |
|
84 |
| - - name: Set CMake generator |
85 |
| - if: matrix.os == 'windows-latest' |
86 |
| - run: | |
87 |
| - echo "CMAKE_GENERATOR=NMake Makefiles" >> $env:GITHUB_ENV |
88 |
| - echo "${{ env.CMAKE_GENERATOR }}" |
89 |
| - echo $env:CMAKE_GENERATOR |
| 84 | + - name: Set CMake generator |
| 85 | + if: matrix.os == 'windows-latest' |
| 86 | + run: | |
| 87 | + echo "CMAKE_GENERATOR=NMake Makefiles" >> $env:GITHUB_ENV |
| 88 | + echo "${{ env.CMAKE_GENERATOR }}" |
| 89 | + echo $env:CMAKE_GENERATOR |
90 | 90 |
|
91 |
| - - name: Install rust ${{ matrix.binary_target }} |
92 |
| - run: | |
93 |
| - rustup -V |
94 |
| - rustup set profile minimal |
95 |
| - rustup toolchain install --force-non-host ${{ matrix.toolchain }}-${{ matrix.binary_target }} |
96 |
| - rustup show |
| 91 | + - name: Install rust ${{ matrix.binary_target }} |
| 92 | + run: | |
| 93 | + rustup -V |
| 94 | + rustup set profile minimal |
| 95 | + rustup toolchain install --force-non-host ${{ matrix.toolchain }}-${{ matrix.binary_target }} |
| 96 | + rustup show |
97 | 97 |
|
98 |
| - - name: Build |
99 |
| - run: cargo build --workspace --all-features |
| 98 | + - name: Build |
| 99 | + run: cargo build --workspace --all-features |
100 | 100 |
|
101 |
| - - name: Test |
102 |
| - run: cargo test --workspace --all-features |
| 101 | + - name: Test |
| 102 | + run: cargo test --workspace --all-features |
0 commit comments