diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 6c07838..6e2d317 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -88,6 +88,20 @@ jobs: - uses: Swatinem/rust-cache@v2 with: prefix-key: codspeed-aot + - name: Get Zig version + id: zig-version + run: | + VERSION=$(grep -o 'const ZIG_VERSION: &str = "[^"]*"' ryo-backend/src/toolchain.rs | cut -d'"' -f2) + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Cache Zig toolchain + id: zig-cache + uses: actions/cache@v6 + with: + path: ~/.ryo/toolchain + key: zig-${{ steps.zig-version.outputs.version }}-${{ runner.os }}-${{ runner.arch }} + - name: Install Zig toolchain + if: steps.zig-cache.outputs.cache-hit != 'true' + run: cargo run -- toolchain install - name: Build Ryo compiler run: cargo build --release - name: Compile Ryo AOT binaries @@ -124,6 +138,20 @@ jobs: - uses: Swatinem/rust-cache@v2 with: prefix-key: codspeed-aot-memory + - name: Get Zig version + id: zig-version + run: | + VERSION=$(grep -o 'const ZIG_VERSION: &str = "[^"]*"' ryo-backend/src/toolchain.rs | cut -d'"' -f2) + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Cache Zig toolchain + id: zig-cache + uses: actions/cache@v6 + with: + path: ~/.ryo/toolchain + key: zig-${{ steps.zig-version.outputs.version }}-${{ runner.os }}-${{ runner.arch }} + - name: Install Zig toolchain + if: steps.zig-cache.outputs.cache-hit != 'true' + run: cargo run -- toolchain install - name: Build Ryo compiler run: cargo build --release - name: Compile Ryo AOT binaries