Skip to content

Commit 915ee80

Browse files
committed
Try to debug CI issue
1 parent 81a3dc6 commit 915ee80

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
# Stay on the oldest Ubuntu version that's still supported by Github Actions
2020
# to avoid glibc incompatibilities as far as possible.
21-
os: [macos-latest, ubuntu-20.04, windows-latest, macos-arm]
21+
os: [windows-latest]
2222
ocaml_compiler: [4.14.0]
2323

2424
runs-on: ${{matrix.os}}
@@ -49,16 +49,23 @@ jobs:
4949
- name: "Install OPAM dependencies"
5050
run: opam install . --deps-only
5151

52-
- name: "Build compiler"
53-
run: |
54-
opam exec -- dune build
55-
./scripts/copyExes.js
56-
5752
- name: Use Node.js
5853
uses: actions/setup-node@v3
5954
with:
6055
node-version: 16
6156

57+
- name: "Build compiler"
58+
run: |
59+
opam exec -- dune build
60+
node ./scripts/copyExes.js
61+
62+
- name: Debug
63+
shell: bash
64+
run: |
65+
ls -l
66+
ls -l "_build/install/default/bin"
67+
ls -l win32
68+
6269
- name: Install npm packages
6370
run: npm ci --ignore-scripts
6471

@@ -80,6 +87,10 @@ jobs:
8087
if: ${{ env.syntax_status == 'changed' && runner.os == 'Windows' }}
8188
run: opam exec -- make test-syntax
8289

90+
- name: Debug
91+
shell: bash
92+
run: ls -l win32
93+
8394
# Required for ninja build
8495
- name: "Windows: Use MSVC"
8596
if: runner.os == 'Windows'
@@ -99,6 +110,10 @@ jobs:
99110
- name: Check for changes in lib folder
100111
run: git diff --exit-code lib/js lib/es6
101112

113+
- name: Debug
114+
shell: bash
115+
run: ls -l win32
116+
102117
- name: Run tests
103118
if: runner.os != 'Windows'
104119
run: opam exec -- dune exec -- node scripts/ciTest.js -all
@@ -107,11 +122,19 @@ jobs:
107122
if: runner.os == 'Windows'
108123
run: opam exec -- dune exec -- node scripts/ciTest.js -mocha -theme -format
109124

125+
- name: Debug
126+
shell: bash
127+
run: ls -l win32
128+
110129
- name: Prepare artifact upload
111130
run: |
112131
./scripts/prebuilt.js
113132
node .github/workflows/get_artifact_info.js
114133
134+
- name: Debug
135+
shell: bash
136+
run: ls -l win32
137+
115138
- name: "Upload artifacts: binaries"
116139
uses: actions/upload-artifact@v3
117140
with:

scripts/copyExes.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const path = require("path");
55
const fs = require("fs");
66
const child_process = require("child_process");
77

8+
console.log("Test");
9+
810
const platformBinDir = require("./bin_path").absolutePath;
911
const duneBinDir = path.join(
1012
__dirname,
@@ -15,15 +17,22 @@ const duneBinDir = path.join(
1517
"bin"
1618
);
1719

20+
console.log("platformBinDir", platformBinDir);
21+
1822
if (!fs.existsSync(platformBinDir)) {
23+
console.log("mkdir");
1924
fs.mkdirSync(platformBinDir);
2025
}
2126

2227
function copyExe(exe) {
28+
const ext = process.platform === "win32" ? ".exe" : "";
29+
const src = path.join(duneBinDir, exe + ext);
2330
const dest = path.join(platformBinDir, exe + ".exe");
2431

25-
const ext = process.platform === "win32" ? ".exe" : "";
26-
fs.copyFileSync(path.join(duneBinDir, exe + ext), dest);
32+
console.log("src", src);
33+
console.log("dest", dest);
34+
35+
fs.copyFileSync(src, dest);
2736

2837
if (process.platform !== "win32") {
2938
child_process.execSync(`strip ${dest}`);

0 commit comments

Comments
 (0)