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

CI: Enable rust caching for Windows, if vcpkg dependencies unchanged. #155

Merged
merged 2 commits into from
Jul 31, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ jobs:
mv /home/runner/.nvm $HOME
mv /home/runner/.rustup $HOME

- uses: Swatinem/rust-cache@v2

- name: Install toolchain
run: |
rustup toolchain install stable
rustup default stable

- uses: Swatinem/rust-cache@v2

- name: Build packetry binary
run: |
cargo build --release
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
packages: libgtk-4-dev build-essential
version: 2

- uses: Swatinem/rust-cache@v2

- name: Install toolchain
run: |
rustup toolchain install stable
rustup default stable

- uses: Swatinem/rust-cache@v2

- name: Run clippy
run: cargo clippy -- --deny warnings

Expand All @@ -44,6 +44,7 @@ jobs:
runs-on: ${{ matrix.os }}

env:
VCPKG_COMMIT: 01f602195983451bc83e72f4214af2cbc495aa94 # 2024.05.24 release
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg/installed

steps:
Expand All @@ -54,6 +55,11 @@ jobs:
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}

- uses: Swatinem/rust-cache@v2
with:
env-vars: VCPKG_COMMIT
if: runner.os == 'Windows'

- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-4-dev build-essential
Expand All @@ -79,7 +85,7 @@ jobs:
- name: Install dependencies (Windows)
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 01f602195983451bc83e72f4214af2cbc495aa94 # 2024.05.24 release
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
runVcpkgInstall: true
doNotCache: false
if: matrix.os == 'windows-latest'
Expand Down
Loading