Skip to content

Commit

Permalink
Enhance GitHub Actions workflow by adding caching for dependencies an…
Browse files Browse the repository at this point in the history
…d updating artifact upload paths
  • Loading branch information
playday3008 committed Jan 8, 2025
1 parent 853981b commit 22b5e3e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/zig-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,24 @@ jobs:
version: ${{ matrix.zig }}

- name: Cache Toolchains
id: cache-primes
id: cache-toolchains
uses: actions/cache@v4
with:
path: ./build/${{ matrix.board }}/${{ matrix.optimize }}/toolchain
key: ${{ matrix.board }}-${{ matrix.optimize }}-toolchain

- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ./build/${{ matrix.board }}/${{ matrix.optimize }}/_deps
key: ${{ matrix.board }}-${{ matrix.optimize }}-deps

- name: Build
run: zig build -Dboard=${{ matrix.board }} -Doptimize=${{ matrix.optimize }} -Dbuild_dir=./build/${{ matrix.board }}/${{ matrix.optimize }}

- name: Upload Build
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.board }}-${{ matrix.optimize }}
path: "./build/${{ matrix.board }}/${{ matrix.optimize }}\n!./build/${{ matrix.board }}/${{ matrix.optimize }}/toolchain"
path: "./build/${{ matrix.board }}/${{ matrix.optimize }}\n!./build/${{ matrix.board }}/${{ matrix.optimize }}/_deps\n!./build/${{ matrix.board }}/${{ matrix.optimize }}/toolchain"

0 comments on commit 22b5e3e

Please sign in to comment.