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

Always install Rust and use Leafwing-Studios/cargo-cache #1405

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
57 changes: 41 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
# Full git history is needed to get a proper list of changed files within `mega-linter`
fetch-depth: 0

- name: Run Mega Linter
uses: oxsecurity/megalinter/flavors/javascript@v7
env:
Expand All @@ -36,6 +37,11 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev

Expand All @@ -49,6 +55,11 @@ jobs:

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Check hide-lines
run: cd write-rustdoc-hide-lines && cargo run --release -- check ../content
Expand All @@ -61,6 +72,11 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev

Expand Down Expand Up @@ -92,6 +108,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -127,15 +151,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
generate-errors/target/
key: ${{ runner.os }}-generate-errors-${{ hashFiles('generate-errors/Cargo.toml') }}
sweep-cache: true

- name: "Build Bevy Error Codes"
run: >
Expand All @@ -158,6 +180,11 @@ jobs:
with:
target: wasm32-unknown-unknown

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true

- name: "Build Bevy Examples"
run: |
cd generate-wasm-examples &&
Expand All @@ -181,15 +208,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo files
uses: Leafwing-Studios/cargo-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
generate-community/target/
key: ${{ runner.os }}-generate-community-${{ hashFiles('generate-community/Cargo.toml') }}
sweep-cache: true

- name: "Build Bevy Community"
run: >
Expand Down