diff --git a/.github/workflows/build-cli-release.reusable.yaml b/.github/workflows/build-cli-release.reusable.yaml index 0dd6e6e048..8e383d6f67 100644 --- a/.github/workflows/build-cli-release.reusable.yaml +++ b/.github/workflows/build-cli-release.reusable.yaml @@ -78,7 +78,10 @@ jobs: uses: ./.github/actions/setup-rust with: targets: ${{ matrix._.target }} - enable-cache: false + enable-cache: true + prefix-key: v2-rust-cli-${{ matrix._.target }} + cache-on-failure: true + workspace: engine - name: Setup Go uses: ./.github/actions/setup-go diff --git a/.github/workflows/build-python-release.reusable.yaml b/.github/workflows/build-python-release.reusable.yaml index f2eb08e2dc..84f02dfc13 100644 --- a/.github/workflows/build-python-release.reusable.yaml +++ b/.github/workflows/build-python-release.reusable.yaml @@ -95,6 +95,22 @@ jobs: - uses: actions/checkout@v4 + # Setup Rust with caching for faster builds + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.89.0" + targets: ${{ matrix._.target }} + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + with: + workspaces: engine + prefix-key: v1-python-${{ matrix._.target }} + cache-on-failure: true + # Cache the target directory for maturin builds + key: ${{ runner.os }}-rust-python-${{ matrix._.target }}-${{ hashFiles('**/Cargo.lock') }} + # Setup Python for non-ARM64 Windows targets and other OS - name: Setup Python (default) if: matrix._.target != 'aarch64-pc-windows-msvc' @@ -152,6 +168,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" - name: Test LICENSE packaging if: matrix._.license_test != 'skip' diff --git a/.github/workflows/build-typescript-release.reusable.yaml b/.github/workflows/build-typescript-release.reusable.yaml index ef891c62b9..a9d51b2694 100644 --- a/.github/workflows/build-typescript-release.reusable.yaml +++ b/.github/workflows/build-typescript-release.reusable.yaml @@ -107,8 +107,9 @@ jobs: uses: ./.github/actions/setup-rust with: targets: ${{ matrix._.target }} - prefix-key: v5-rust-${{ matrix._.target }} + prefix-key: v6-rust-ts-${{ matrix._.target }} cache-on-failure: true + workspace: engine - name: Setup Go uses: ./.github/actions/setup-go diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f46f378b57..65550004bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,11 +58,11 @@ jobs: then # Use sanitized tag name for version initially VERSION=$(echo "$REF_NAME" | sed 's|/|-|g') - # Check if it's a release tag matching vX.Y.Z - if [[ "$REF_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + # Check if it's a release tag matching X.Y.Z or vX.Y.Z + if [[ "$REF_NAME" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then IS_RELEASE="true" - # Use the exact tag name for releases - VERSION="$REF_NAME" + # Strip 'v' prefix if present for version string + VERSION="${REF_NAME#v}" fi fi