Skip to content

Commit

Permalink
Merge pull request #754 from AmbientRun/update_cache
Browse files Browse the repository at this point in the history
Change CI cache to cargo-cache
  • Loading branch information
Pombal authored Aug 27, 2023
2 parents 750cfd2 + 2cadfb8 commit 553ac3a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ jobs:
libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev clang nodejs
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: main
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Build
run: cargo build --workspace --release
env:
Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
sudo apt-get install --no-install-recommends -y tree libasound2-dev libglib2.0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: clippy
uses: Leafwing-Studios/[email protected]
- name: Run clippy
uses: actions-rs/cargo@v1
with:
Expand All @@ -44,13 +42,6 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: clippy-web
workspaces: |
.
web
- name: Run clippy
working-directory: web
run: cargo clippy --workspace
Expand All @@ -76,9 +67,8 @@ jobs:
sudo apt-get update
sudo apt install -y libxcb-xfixes0-dev vulkan-validationlayers-dev mesa-vulkan-drivers libasound2-dev
- uses: Swatinem/rust-cache@v2
with:
key: main
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- uses: taiki-e/install-action@cargo-nextest
- name: Run tests
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -111,6 +101,10 @@ jobs:
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Rust cache
uses: Leafwing-Studios/[email protected]
with:
cargo-target-dir: "web"

- name: "Build campfire"
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -155,9 +149,8 @@ jobs:
libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev clang nodejs
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: main
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Build
run: cargo build --workspace --release
env:
Expand All @@ -183,10 +176,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Rust cache
uses: Leafwing-Studios/[email protected]
with:
key: guest-rust
workspaces: guest/rust
cargo-target-dir: "guest/rust"
- name: Build guest/rust
run: cd guest/rust && cargo build --workspace

Expand All @@ -199,6 +192,8 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: rustup target add --toolchain stable wasm32-wasi
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Download ambient executable
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -234,6 +229,8 @@ jobs:
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v3
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Download ambient executable
uses: actions/download-artifact@v3
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:
libcairo-dev libgtk2.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev xorg-dev ninja-build libxcb-render0-dev
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: main
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Build
run: cargo build --workspace --release
env:
Expand Down Expand Up @@ -73,6 +72,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown,wasm32-wasi
- name: Rust cache
uses: Leafwing-Studios/[email protected]
- name: Fetch ambient executable artifact from cache
uses: actions/cache/restore@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
toolchain: stable
target: wasm32-unknown-unknown

- name: Rust cache
uses: Leafwing-Studios/[email protected]

- name: "Build campfire"
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 553ac3a

Please sign in to comment.