diff --git a/.github/workflows/jtreg.yml b/.github/workflows/jtreg.yml index 1d29176..0739e31 100644 --- a/.github/workflows/jtreg.yml +++ b/.github/workflows/jtreg.yml @@ -57,10 +57,15 @@ jobs: cache: pnpm - uses: actions/cache@v6 with: - path: ~/.cache/java-web + # the downloads build-jdk.sh keeps; boot snapshots there stay out + path: | + ~/.cache/java-web/jdk-* + ~/.cache/java-web/dejavu-* key: jdk-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-jdk.sh') }} - run: pnpm install --frozen-lockfile - run: pnpm jdk + # each test VM starts from the bundle, which loads faster than src/ + - run: pnpm build - name: OpenJDK regression tests env: FILTERS: ${{ needs.plan.outputs.filters }} @@ -70,7 +75,7 @@ jobs: dirs=$(grep -v '^#' test/jtreg/passing.txt | cut -d/ -f1-2 | sort -u | sed 's|^|test/jdk/|') git -C build/ref/jdk25u sparse-checkout set test/lib test/jdk/lib test/jdk/tools/lib $dirs read -ra filters <<< "$FILTERS" - node scripts/jtreg/run.ts build/ref/jdk25u --only-passing --jobs 4 --timeout 600 \ + node scripts/jtreg/run.ts build/ref/jdk25u --only-passing --jobs 4 --timeout 600 --vm dist/node.js \ --shard ${{ matrix.shard }}/${{ strategy.job-total }} "${filters[@]}" # one check for branch protection, whatever the number of shards diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e65d71..6451dc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,10 @@ jobs: cache: pnpm - uses: actions/cache@v6 with: - path: ~/.cache/java-web + # the downloads build-jdk.sh keeps; boot snapshots there stay out + path: | + ~/.cache/java-web/jdk-* + ~/.cache/java-web/dejavu-* key: jdk-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-jdk.sh') }} - run: pnpm install --frozen-lockfile - run: pnpm jdk diff --git a/scripts/jtreg/select.ts b/scripts/jtreg/select.ts index 5d3fdd5..e2837ae 100644 --- a/scripts/jtreg/select.ts +++ b/scripts/jtreg/select.ts @@ -15,8 +15,9 @@ const root = join(import.meta.dirname, "..", ".."); const passingFile = "test/jtreg/passing.txt"; // TypeScript the tests load: everything src/node.ts (the VM each test runs on), -// the runner and this selection import, followed through their imports. Other .ts files under -// src/ and scripts/ (the page API, the web build) cannot change a test's result. +// the web build that bundles it into dist/node.js, the runner and this +// selection import, followed through their imports. Other .ts files under +// src/ and scripts/ (the page API) cannot change a test's result. function loaded(): Set { const seen = new Set(); const visit = (file: string) => { @@ -26,6 +27,7 @@ function loaded(): Set { for (const m of text.matchAll(/(?:from|import)\s*\(?\s*["'](\.{1,2}\/[^"']+\.ts)["']/g)) visit(join(dirname(file), m[1])); }; visit("src/node.ts"); + visit("scripts/build-web.ts"); visit("scripts/jtreg/run.ts"); visit("scripts/jtreg/select.ts"); return seen;