Skip to content

Commit 67e5a1b

Browse files
committed
Fix: do not rebuild ninja when building playground
1 parent b123655 commit 67e5a1b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
upload_binaries: true
5858
node-target: win32-x64
5959
rust-target: x86_64-pc-windows-gnu
60+
exe-suffix: ".exe"
6061

6162
# Verify that the compiler still builds with the oldest OCaml version we support.
6263
- os: ubuntu-24.04
@@ -137,9 +138,9 @@ jobs:
137138
138139
- name: Copy rewatch binary
139140
run: |
140-
cp rewatch/target/${{ matrix.rust-target }}/release/rescript${{ runner.os == 'Windows' && '.exe' || '' }} rescript
141+
cp rewatch/target/${{ matrix.rust-target }}/release/rescript${{ matrix.exe-suffix }} rescript
141142
mkdir -p rewatch/target/release
142-
cp rewatch/target/${{ matrix.rust-target }}/release/rescript${{ runner.os == 'Windows' && '.exe' || '' }} rewatch/target/release
143+
cp rewatch/target/${{ matrix.rust-target }}/release/rescript${{ matrix.exe-suffix }} rewatch/target/release
143144
./scripts/copyExes.js --rewatch
144145
shell: bash
145146

@@ -294,7 +295,7 @@ jobs:
294295
id: ninja-build-cache
295296
uses: actions/cache@v4
296297
with:
297-
path: ninja/ninja${{ runner.os == 'Windows' && '.exe' || '' }}
298+
path: ninja/ninja${{ matrix.exe-suffix }}
298299
key: ninja-build-v2-${{ matrix.os }}-${{ hashFiles('ninja/src/**') }}
299300

300301
- name: Setup Python for ninja build
@@ -319,6 +320,11 @@ jobs:
319320
LDFLAGS: -static
320321
run: node scripts/buildNinjaBinary.js
321322

323+
# Prevent ninja being rebuilt on playground build step later
324+
- name: Touch ninja/ninja
325+
if: ${{ matrix.build_playground && steps.ninja-build-cache.outputs.cache-hit == 'true' }}
326+
run: touch ninja/ninja${{ matrix.exe-suffix }}
327+
322328
- name: Copy ninja exe to platform bin dir
323329
run: node scripts/copyExes.js --ninja
324330

0 commit comments

Comments
 (0)