Skip to content

Commit c06f54d

Browse files
authored
Update CI.yaml
1 parent dd050db commit c06f54d

File tree

1 file changed

+48
-47
lines changed

1 file changed

+48
-47
lines changed

.github/workflows/CI.yaml

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: CI
33
permissions:
44
pages: write
55
id-token: write
6-
76
on:
87
push:
98
branches: [ master ]
@@ -12,60 +11,62 @@ on:
1211

1312
jobs:
1413
build:
15-
runs-on: ubuntu-latest
1614
strategy:
1715
fail-fast: false
1816
matrix:
19-
rust: [stable, beta, nightly]
20-
17+
os: [ ubuntu-latest, windows-latest, macos-latest ]
18+
rust: [ stable, beta, nightly ]
19+
runs-on: ${{ matrix.os }}
2120
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
with:
25-
submodules: true
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: true
2625

27-
- name: Set up Rust
28-
uses: actions-rs/toolchain@v1
29-
with:
30-
toolchain: ${{ matrix.rust }}
31-
override: true
32-
components: rustfmt, clippy
26+
- name: Set up Rust
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
override: true
31+
components: rustfmt, clippy
3332

34-
- name: Cache Cargo registry
35-
uses: actions/cache@v4
36-
with:
37-
path: |
38-
~/.cargo/registry
39-
~/.cargo/git
40-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
41-
restore-keys: |
42-
${{ runner.os }}-cargo-registry-
33+
- name: Cache Cargo registry
34+
if: runner.os != 'Windows'
35+
uses: actions/cache@v4
36+
with:
37+
path: |
38+
~/.cargo/registry
39+
~/.cargo/git
40+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
41+
restore-keys: |
42+
${{ runner.os }}-cargo-registry-
4343
44-
- name: Dependencies
45-
run: |
46-
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
47-
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
48-
sudo apt update
49-
sudo apt install vulkan-sdk
44+
- name: Dependencies
45+
if: runner.os == 'Linux'
46+
run: |
47+
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
48+
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
49+
sudo apt update
50+
sudo apt install vulkan-sdk
5051
51-
- run: cargo build --verbose --workspace --all-targets --all-features
52-
- run: cargo check --verbose --workspace --all-targets --all-features
53-
- run: cargo clippy --verbose --workspace --all-targets --all-features -- -D warnings
54-
- run: cargo fmt --all -- --check
55-
- run: cargo test --verbose --workspace --all-targets --all-features --no-fail-fast --lib --bins --examples --tests --benches
56-
- run: git diff --exit-code
52+
- run: cargo build --verbose --workspace --all-targets --all-features
53+
- run: cargo check --verbose --workspace --all-targets --all-features
54+
- run: cargo clippy --verbose --workspace --all-targets --all-features -- -D warnings
55+
- run: cargo fmt --all -- --check
56+
- run: cargo test --verbose --workspace --all-targets --all-features --no-fail-fast --lib --bins --examples --tests --benches
57+
- run: git diff --exit-code
5758

58-
- name: Generate cargo docs
59-
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
60-
run: cargo doc --workspace --no-deps
59+
- name: Generate cargo docs
60+
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
61+
run: cargo doc --workspace --no-deps
6162

62-
- name: Upload artifact
63-
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
64-
uses: actions/upload-pages-artifact@v3
65-
with:
66-
path: "./target/doc"
63+
- name: Upload artifact
64+
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
65+
uses: actions/upload-pages-artifact@v3
66+
with:
67+
path: "./target/doc"
6768

68-
- name: Deploy to GitHub Pages
69-
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
70-
id: deployment
71-
uses: actions/deploy-pages@v4
69+
- name: Deploy to GitHub Pages
70+
if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }}
71+
id: deployment
72+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)