Skip to content

Commit

Permalink
Improve build performance with caching
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Dec 14, 2024
1 parent a8690f0 commit 2946900
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,33 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Install Rust (Stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# Add Rust cargo cache
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
# Add npm cache
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
Expand Down Expand Up @@ -80,12 +107,6 @@ jobs:
name: angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip
path: angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip

- name: Install Rust (Stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down

0 comments on commit 2946900

Please sign in to comment.