Skip to content

Commit de2d534

Browse files
cknittaspeddro
authored andcommitted
Remove two stale CI and test steps (#9147)
Signed-off-by: Pedro Castro <aspeddro@gmail.com>
1 parent 2c99ce8 commit de2d534

3 files changed

Lines changed: 39 additions & 81 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ jobs:
4747
- os: ubuntu-26.04-arm # ARM
4848
ocaml_compiler: ocaml-variants.5.5.2+options,ocaml-option-static
4949
upload_binaries: true
50-
# Build the playground compiler and run the benchmarks on the fastest runner
50+
# Build the playground compiler on the fastest runner
5151
build_playground: true
5252
generate_api_docs: true
53-
benchmarks: true
5453
test_commit_records: true
5554
node-target: linux-arm64
5655
rust-target: aarch64-unknown-linux-musl
@@ -352,42 +351,6 @@ jobs:
352351
run: ./rewatch/tests/suite.sh packages/@rescript/${{ matrix.node-target }}/bin/rescript-rust.exe
353352
shell: bash
354353

355-
- name: Run syntax benchmarks
356-
if: matrix.benchmarks
357-
run: |
358-
set -o pipefail
359-
./_build/install/default/bin/syntax_benchmarks | tee tests/benchmark-output.json
360-
361-
# Benchmarking is disabled for now because of inconsistent run times on different runners
362-
#
363-
# - name: Restore previous benchmark data
364-
# if: matrix.benchmarks
365-
# uses: actions/cache/restore@v6
366-
# with:
367-
# path: ./tests/benchmark-cache
368-
# key: syntax-benchmark-v1
369-
370-
# - name: Create new benchmark data and comment on alert
371-
# # Do not run for PRs created from other repos as those won't be able to write to the pull request
372-
# if: ${{ matrix.benchmarks && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name) }}
373-
# uses: benchmark-action/github-action-benchmark@v1
374-
# with:
375-
# name: Syntax Benchmarks
376-
# tool: customSmallerIsBetter
377-
# output-file-path: tests/benchmark-output.json
378-
# external-data-json-path: ./tests/benchmark-cache/benchmark-data.json
379-
# github-token: ${{ secrets.GITHUB_TOKEN }}
380-
# alert-threshold: "105%"
381-
# comment-always: false
382-
# comment-on-alert: true
383-
384-
# - name: Save benchmark data as new baseline
385-
# if: matrix.benchmarks && github.ref == 'refs/heads/master'
386-
# uses: actions/cache/save@v6
387-
# with:
388-
# path: ./tests/benchmark-cache
389-
# key: syntax-benchmark-v1
390-
391354
- name: Build playground compiler
392355
if: matrix.build_playground
393356
run: opam exec -- make playground

‎changes/ci-stale-steps.internal.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Remove the unused syntax benchmark CI step and the macOS 13 docstring test workaround.

‎scripts/test.js‎

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22

33
import * as fs from "node:fs";
4-
import * as os from "node:os";
54
import * as path from "node:path";
65
import {
76
buildTestDir,
@@ -184,54 +183,49 @@ if (buildTest) {
184183
}
185184

186185
if (runtimeDocstrings) {
187-
if (process.platform === "darwin" && os.release().startsWith("22")) {
188-
// Workaround for intermittent hangs in CI
189-
console.log("Skipping docstrings tests on macOS 13");
190-
} else {
191-
console.log("Running runtime docstrings tests");
186+
console.log("Running runtime docstrings tests");
192187

193-
const generated_mocha_test_res = path.join(
194-
docstringTestDir,
195-
"generated_mocha_test.res",
196-
);
188+
const generated_mocha_test_res = path.join(
189+
docstringTestDir,
190+
"generated_mocha_test.res",
191+
);
197192

198-
// This generated source file is checked during the initial build below, so
199-
// a stale copy from an earlier run can fail before we regenerate it.
200-
await fs.promises.rm(generated_mocha_test_res, { force: true });
193+
// This generated source file is checked during the initial build below, so
194+
// a stale copy from an earlier run can fail before we regenerate it.
195+
await fs.promises.rm(generated_mocha_test_res, { force: true });
201196

202-
await execClean([], {
203-
cwd: docstringTestDir,
204-
stdio: "inherit",
205-
});
197+
await execClean([], {
198+
cwd: docstringTestDir,
199+
stdio: "inherit",
200+
});
206201

207-
await execBuild([], {
208-
cwd: docstringTestDir,
209-
stdio: "inherit",
210-
});
202+
await execBuild([], {
203+
cwd: docstringTestDir,
204+
stdio: "inherit",
205+
});
211206

212-
// Generate rescript file with all tests `generated_mocha_test.res`
213-
await node(path.join(docstringTestDir, "DocTest.res.js"), [], {
214-
cwd: projectDir,
215-
stdio: "inherit",
216-
});
207+
// Generate rescript file with all tests `generated_mocha_test.res`
208+
await node(path.join(docstringTestDir, "DocTest.res.js"), [], {
209+
cwd: projectDir,
210+
stdio: "inherit",
211+
});
217212

218-
// Build again to check if generated_mocha_test.res has syntax or type erros
219-
await execBuild([], {
220-
cwd: docstringTestDir,
221-
stdio: "inherit",
222-
});
213+
// Build again to check if generated_mocha_test.res has syntax or type erros
214+
await execBuild([], {
215+
cwd: docstringTestDir,
216+
stdio: "inherit",
217+
});
223218

224-
// Format generated_mocha_test.res
225-
console.log("Formatting generated_mocha_test.res");
226-
await rescript("format", [generated_mocha_test_res], {
227-
cwd: projectDir,
228-
stdio: "inherit",
229-
});
219+
// Format generated_mocha_test.res
220+
console.log("Formatting generated_mocha_test.res");
221+
await rescript("format", [generated_mocha_test_res], {
222+
cwd: projectDir,
223+
stdio: "inherit",
224+
});
230225

231-
console.log("Run mocha test");
232-
await mocha([path.join(docstringTestDir, "generated_mocha_test.res.js")], {
233-
cwd: projectDir,
234-
stdio: "inherit",
235-
});
236-
}
226+
console.log("Run mocha test");
227+
await mocha([path.join(docstringTestDir, "generated_mocha_test.res.js")], {
228+
cwd: projectDir,
229+
stdio: "inherit",
230+
});
237231
}

0 commit comments

Comments
 (0)