* chore: update dependencies, Node.js, pnpm, and GitHub Actions * chore: hold typescript on 6.x for typescript-eslint compatibility The update-lockfile job bumped the `typescript` catalog entry to 7.0.2, which typescript-eslint refuses to load against — it hard-errors at load with "typescript-eslint does not support TS 7.0" — failing the Compile & Lint job. The 7.x compiler is already used for the build via `@typescript/native-preview` (tsgo); the `typescript` npm package only serves the JS-API tooling (eslint, jest), which needs 6.x until typescript-eslint adds TS >=7.1 support (https://github.com/typescript-eslint/typescript-eslint/issues/10940). Revert the catalog entry to 6.0.3 and add `typescript` to `update.ignoreDeps` so the update-lockfile workflow stops re-bumping it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: drop the stray typescript@7.0.2 from the lockfile openpgp declares an optional `typescript` peer (>=4.7). After the catalog was reverted to 6.0.3, pnpm's incremental resolution kept openpgp latched onto the leftover typescript@7.0.2 node, leaving it (and its native platform packages) in the lockfile and tripping peer-mismatch review bots. Re-point openpgp's optional peer to 6.0.3 so typescript@7.0.2 is gone entirely; the openpgp subtree is now identical to the base branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
81 lines
3.2 KiB
YAML
81 lines
3.2 KiB
YAML
name: Build pnpr (reusable)
|
|
|
|
# Build the pnpr server and registry fixture preparer once for the given OS,
|
|
# then share the binaries with every test job/shard as an artifact. Building
|
|
# inside each test job instead rebuilt pnpr once per shard, because the
|
|
# parallel shards all miss the build cache at job start.
|
|
#
|
|
# This is a per-OS reusable workflow rather than a single matrix job so each
|
|
# platform's test jobs can gate on their own build. `needs` can only target a
|
|
# whole job, never an individual matrix leg, so a matrix build would force the
|
|
# ubuntu tests to wait for the (slower) windows build and vice versa.
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
os:
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-pnpr:
|
|
name: ${{ inputs.os }}
|
|
runs-on: ${{ inputs.os }}
|
|
steps:
|
|
- name: Free up runner disk space
|
|
if: ${{ runner.os == 'Linux' }}
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
|
df -h /
|
|
- name: Checkout Commit
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
# The binaries are cached and keyed on the Rust sources that produce them,
|
|
# so a run that only touches TypeScript restores them in seconds instead of
|
|
# recompiling. They are copied out of `target/` into a stable dir so
|
|
# `Swatinem/rust-cache`'s `target/` cleanup can't strip them before the
|
|
# cache saves.
|
|
- name: Restore prebuilt pnpr binaries
|
|
id: pnpr-bins
|
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .pnpr-bin
|
|
key: pnpr-bins-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml', '**/Cargo.lock', '**/Cargo.toml', 'pnpr/**/*.rs', 'pnpm/**/*.rs') }}
|
|
- name: Install Rust
|
|
if: steps.pnpr-bins.outputs.cache-hit != 'true'
|
|
uses: ./.github/actions/rustup
|
|
with:
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
shared-key: registry-prepare
|
|
- name: Build the pnpr server and registry fixture preparer
|
|
if: steps.pnpr-bins.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: |
|
|
cargo build --locked --release -p pnpr --bin pnpr -p pnpr-fixtures --bin pnpr-prepare
|
|
mkdir -p .pnpr-bin
|
|
ext=""
|
|
[ -f target/release/pnpr.exe ] && ext=".exe"
|
|
cp "target/release/pnpr$ext" "target/release/pnpr-prepare$ext" .pnpr-bin/
|
|
# Save the binaries to the cache right after they build, not in a post-job
|
|
# step: a later step failing would otherwise skip the save and force a full
|
|
# Rust rebuild on the next run.
|
|
- name: Save prebuilt pnpr binaries
|
|
if: steps.pnpr-bins.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .pnpr-bin
|
|
key: ${{ steps.pnpr-bins.outputs.cache-primary-key }}
|
|
- name: Upload pnpr binaries
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: pnpr-bins-${{ runner.os }}
|
|
path: .pnpr-bin
|
|
# `.pnpr-bin` is a dotfile dir, which upload-artifact skips by default.
|
|
include-hidden-files: true
|
|
if-no-files-found: error
|
|
retention-days: 1
|