Skip to content

Commit 39c24e5

Browse files
author
BSKY
committed
Migrate to GitHub Actions
1 parent 0858113 commit 39c24e5

File tree

4 files changed

+50
-54
lines changed

4 files changed

+50
-54
lines changed

.circleci/config.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/workflow.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Main workflow
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
if: github.repository == 'BuckleScript/bucklescript'
10+
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macOS-latest]
14+
node-version: [8.x, 10.x, 12.x]
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
env:
19+
BS_CI: true
20+
OCAMLRUNPARAM: b
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v1
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Restore npm cache
32+
uses: actions/cache@v1
33+
with:
34+
path: ~/.npm
35+
key: ${{ runner.os }}-npm-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
36+
37+
- name: Pull submodules
38+
run: |
39+
git submodule init
40+
git submodule update
41+
42+
- name: Install packages
43+
run: npm ci
44+
45+
- name: Run tests
46+
run: npm test

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

scripts/install.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function install(stdlib) {
204204
*/
205205
function copyPrebuiltCompilersForUnix(sys_extension) {
206206
var output = `
207-
rule cp
207+
rule cp
208208
command = cp $in $out
209209
`;
210210
output += preBuiltCompilerArtifacts
@@ -251,7 +251,7 @@ function copyPrebuiltCompilers() {
251251
* @returns {string|undefined}
252252
*/
253253
function checkPrebuiltBscCompiler() {
254-
if(process.env.BS_TRAVIS_CI){
254+
if(process.env.BS_CI){
255255
return ;
256256
}
257257
try {
@@ -290,7 +290,7 @@ stdlib = ${stdlib}
290290
subninja runtime/release.ninja
291291
subninja others/release.ninja
292292
subninja $stdlib/release.ninja
293-
${process.env.BS_TRAVIS_CI ? "subninja test/build.ninja\n" : "\n"}
293+
${process.env.BS_CI ? "subninja test/build.ninja\n" : "\n"}
294294
build all: phony runtime others $stdlib
295295
`;
296296
var filePath = path.join(jscomp_dir, "release.ninja");
@@ -302,7 +302,7 @@ build all: phony runtime others $stdlib
302302
shell: false
303303
});
304304
var buildArgs = ["-f", "release.ninja"];
305-
if (process.env.BS_TRAVIS_CI) {
305+
if (process.env.BS_CI) {
306306
buildArgs.push("--verbose");
307307
}
308308
cp.execFileSync(ninja_bin_output, buildArgs, {

0 commit comments

Comments
 (0)