Skip to content

Commit 0205653

Browse files
committed
Stop wasted preview package runs
1 parent 51cfd6c commit 0205653

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/pkg-pr-new.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
permissions:
77
contents: read
88

9+
concurrency:
10+
group: pkg-pr-new-${{ github.event.pull_request.number }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
# Per-platform matrix: build the executor binary, tar it, upload to R2.
1115
# The wrapper npm package is built later by the `publish` job which just
@@ -20,7 +24,7 @@ jobs:
2024
fail-fast: false
2125
matrix:
2226
include:
23-
- runner: ubuntu-latest
27+
- runner: blacksmith-4vcpu-ubuntu-2404
2428
target: executor-linux-x64
2529
- runner: macos-14
2630
target: executor-darwin-arm64
@@ -34,6 +38,24 @@ jobs:
3438
with:
3539
bun-version: 1.3.11
3640

41+
- name: Cache Bun package cache
42+
if: runner.os == 'Linux'
43+
uses: useblacksmith/cache@v5
44+
with:
45+
path: ~/.bun/install/cache
46+
key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
47+
restore-keys: |
48+
${{ runner.os }}-bun-1.3.11-
49+
50+
- name: Cache Bun package cache
51+
if: runner.os == 'macOS'
52+
uses: actions/cache@v4
53+
with:
54+
path: ~/.bun/install/cache
55+
key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
56+
restore-keys: |
57+
${{ runner.os }}-bun-1.3.11-
58+
3759
- run: bun install --frozen-lockfile
3860

3961
- name: Build executor preview tarball
@@ -77,6 +99,14 @@ jobs:
7799
with:
78100
bun-version: 1.3.11
79101

102+
- name: Cache Bun package cache
103+
uses: useblacksmith/cache@v5
104+
with:
105+
path: ~/.bun/install/cache
106+
key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
107+
restore-keys: |
108+
${{ runner.os }}-bun-1.3.11-
109+
80110
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
81111
# builds it from source via node-gyp, whose undici needs Node 22.10+
82112
# (webidl.markAsUncloneable). Pin the same runtime the CI jobs use.

.github/workflows/preview.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
with:
3636
bun-version: 1.3.11
3737

38+
- name: Cache Bun package cache
39+
uses: useblacksmith/cache@v5
40+
with:
41+
path: ~/.bun/install/cache
42+
key: ${{ runner.os }}-bun-1.3.11-${{ hashFiles('bun.lock') }}
43+
restore-keys: |
44+
${{ runner.os }}-bun-1.3.11-
45+
3846
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
3947
# builds it from source via node-gyp, whose undici needs Node 22.10+
4048
# (webidl.markAsUncloneable). Pin the same runtime the CI jobs use.

0 commit comments

Comments
 (0)