Skip to content

Commit d46eff7

Browse files
gwen-lgemilk
andauthored
Restore CI + improvement (#249)
### Checklist * [X] I have read the [Contributor Guide](../CONTRIBUTING.md) * [X] I have read and agree to the [Code of Conduct](../CODE_OF_CONDUCT.md) * [X] I have added a description of my changes and why I'd like them included in the section below ### Description of Changes - Move `CI` to GitHub Runners, as custom Runners does not seem available. - Migrate to `actions/checkout@v4` - use `--locked` on cargo commands to help reduce CI duration - enable use of `rust-cache` action (Swatinem/rust-cache@v2) to help reduce build time. :exclamation: `main` seems to be _broken_ --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
1 parent 4a290e9 commit d46eff7

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ env:
2020
jobs:
2121
lint:
2222
name: Lint
23-
runs-on: ubuntu-20.04-16core
23+
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- uses: dtolnay/rust-toolchain@stable
2727
with:
2828
components: clippy, rustfmt
2929
targets: wasm32-unknown-unknown
30+
- uses: Swatinem/rust-cache@v2
31+
with:
32+
cache-on-failure: "true"
3033

3134
- name: Install packages (Linux)
3235
if: runner.os == 'Linux'
@@ -41,21 +44,25 @@ jobs:
4144

4245
- run: cargo fetch
4346
- name: cargo clippy
44-
run: cargo clippy --all-targets -- -D warnings
47+
run: cargo clippy --locked --all-targets -- -D warnings
4548
- name: cargo clippy wasm32-unknown-unknown WITHOUT web feature
46-
run: cargo clippy -p puffin --target wasm32-unknown-unknown --no-default-features -- -D warnings
49+
run: cargo clippy --locked -p puffin --target wasm32-unknown-unknown --no-default-features -- -D warnings
4750
- name: cargo clippy wasm32
48-
run: cargo clippy -p puffin_viewer --target wasm32-unknown-unknown --all-features --lib
51+
run: cargo clippy --locked -p puffin_viewer --target wasm32-unknown-unknown --all-features --lib
4952

5053
test:
5154
name: Test
5255
strategy:
56+
fail-fast: true
5357
matrix:
54-
os: [ubuntu-20.04-16core, windows-2022-16core, macOS-latest-xl]
58+
os: [ubuntu-latest, windows-2022, macos-latest]
5559
runs-on: ${{ matrix.os }}
5660
steps:
57-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
5862
- uses: dtolnay/rust-toolchain@stable
63+
- uses: Swatinem/rust-cache@v2
64+
with:
65+
cache-on-failure: "true"
5966

6067
- run: cargo fetch
6168
- name: Install packages (Linux)
@@ -65,23 +72,23 @@ jobs:
6572
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies
6673
sudo apt-get install libgtk-3-dev # rfd dependencies
6774
- name: cargo test build default features
68-
run: cargo build --tests --release
75+
run: cargo build --locked --tests --release
6976
- name: cargo test build
70-
run: cargo build --tests --release --all-features
77+
run: cargo build --locked --tests --release --all-features
7178
- name: cargo test
72-
run: cargo test -p puffin -p puffin_egui -p puffin_http --release --all-features
79+
run: cargo test --locked -p puffin -p puffin_egui -p puffin_http --release --all-features
7380
- name: cargo test --doc
74-
run: cargo test --workspace --doc
81+
run: cargo test --locked --workspace --doc
7582
- name: cargo doc
76-
run: cargo doc -p puffin -p puffin_egui -p puffin_http -p --lib --no-deps --all-features
83+
run: cargo doc --locked -p puffin -p puffin_egui -p puffin_http -p --lib --no-deps --all-features
7784

7885
cargo-vet:
7986
name: Vet Dependencies
80-
runs-on: ubuntu-20.04-16core
87+
runs-on: ubuntu-latest
8188
env:
8289
CARGO_VET_VERSION: 0.9.1
8390
steps:
84-
- uses: actions/checkout@v3
91+
- uses: actions/checkout@v4
8592
- uses: dtolnay/rust-toolchain@stable
8693
- uses: actions/cache@v3
8794
with:

0 commit comments

Comments
 (0)