Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache target/ folders in CI #2376

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push, pull_request]
on: [push]

env:
CARGO_INCREMENTAL: false
Expand Down Expand Up @@ -28,6 +28,8 @@ jobs:
# -Z avoid-dev-deps doesn't work
- run: cargo +nightly hack generate-lockfile --remove-dev-deps -Z minimal-versions --offline

- uses: Swatinem/rust-cache@v2

- name: Test all features
run: cargo +$MSRV clippy --all-features --workspace -- -D warnings

Expand All @@ -42,6 +44,10 @@ jobs:
with:
tool: cargo-nextest,cargo-llvm-cov

# TODO: These two separate tests might need their own cache.

- uses: Swatinem/rust-cache@v2

- name: Default test
# Our intention here is to test `naga` with no features enabled. But
# since `cli` is the default package, a plain `cargo test` will build
Expand All @@ -67,6 +73,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Check benchmarks
run: cargo check --benches

Expand All @@ -83,6 +91,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- run: cargo doc -p naga --all-features --document-private-items

fmt:
Expand All @@ -91,4 +101,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- run: cargo fmt -- --check
23 changes: 16 additions & 7 deletions .github/workflows/lazy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Lazy jobs running on master post merges.
name: lazy
on:
push:
branches: [master]
pull_request:
paths:
- '.github/workflows/lazy.yml'
on: [push, pull_request]

env:
CARGO_INCREMENTAL: false
Expand All @@ -24,6 +19,9 @@ jobs:
- name: Download shaders
run: curl https://user.fm/files/v2-5573e18b9f03f42c6ae53c392083da35/dota2-shaders.zip -o data/all.zip

- uses: Swatinem/rust-cache@v2
shared-key: lazy-bin

- name: Unpack shaders
run: cd data && unzip all.zip

Expand All @@ -42,6 +40,9 @@ jobs:
- name: Download shaders
run: git clone https://github.com/SaschaWillems/Vulkan.git

- uses: Swatinem/rust-cache@v2
shared-key: lazy-bin

- name: Build Naga
run: cargo build --release --bin naga

Expand Down Expand Up @@ -72,7 +73,13 @@ jobs:
- uses: actions/checkout@v3

- name: Download shaders
run: git clone https://github.com/dneto0/spirv-samples.git
uses: actions/checkout@v3
with:
repository: dneto0/spirv-samples.git
path: spirv-samples

- uses: Swatinem/rust-cache@v2
shared-key: lazy-bin

- name: Build Naga
run: cargo build --release --bin naga
Expand Down Expand Up @@ -152,6 +159,8 @@ jobs:
with:
tool: cargo-nextest

- uses: Swatinem/rust-cache@v2

- name: Test minimal (without span)
run: cargo nextest run --features validate -p naga

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/target
**/*.rs.bk
Cargo.lock
.DS_Store
.fuse_hidden*
.idea
Expand Down
Loading