From 9f79116c06c433e864273eb0ce6a415105162121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Sat, 16 May 2020 16:27:45 +0200 Subject: [PATCH 1/6] first version of workflow --- .github/workflows/workflow.yml | 49 ++++++++++++++++++++++++++++++++++ bundle/.gitkeep | 0 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/workflow.yml create mode 100644 bundle/.gitkeep diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..8bb6fac --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,49 @@ +name: Build bs-platform-js +on: + push: + tags: + - '*' +jobs: + run: + name: Build + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + ocaml-version: ["4.06.1"] + node-version: [12.x] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + path: main + + - name: Checkout BuckleScript repo + uses: actions/checkout@v2 + with: + repository: BuckleScript/bucklescript + path: bucklescript + + - run: git submodule update --init && ./scripts/buildocaml.js + working-directory: bucklescript + + - run: ./scripts/ninja.js config && ./scripts/ninja.js build + working-directory: bucklescript + + - run: mkdir playground && mkdir playground/stdlib + working-directory: bucklescript + + - run: BS_PLAYGROUND=../../main/bundle ./scripts/repl.js -prepublish + working-directory: bucklescript + + - name: Test — print Sys.ocaml_version + run: node -e "require('./exports.js'); eval(ocaml.compile('Js.log Sys.ocaml_version').js_code)" + working-directory: main/bundle + + - name: Archive npm artifacts + uses: actions/upload-artifact@v1 + with: + name: bs-platform-js + path: main + diff --git a/bundle/.gitkeep b/bundle/.gitkeep new file mode 100644 index 0000000..e69de29 From 81c35f398a195ce4a15640e00c0f2b0241aeec20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Sat, 16 May 2020 16:32:52 +0200 Subject: [PATCH 2/6] change trigger --- .github/workflows/workflow.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8bb6fac..e308024 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,8 +1,5 @@ name: Build bs-platform-js -on: - push: - tags: - - '*' +on: [push] jobs: run: name: Build From 7167b94c44c240e90481b74e74f620f78baca6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Sat, 16 May 2020 16:40:14 +0200 Subject: [PATCH 3/6] remove unneeded step --- .github/workflows/workflow.yml | 3 --- bundle/{ => stdlib}/.gitkeep | 0 2 files changed, 3 deletions(-) rename bundle/{ => stdlib}/.gitkeep (100%) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e308024..43fc1cf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -28,9 +28,6 @@ jobs: - run: ./scripts/ninja.js config && ./scripts/ninja.js build working-directory: bucklescript - - run: mkdir playground && mkdir playground/stdlib - working-directory: bucklescript - - run: BS_PLAYGROUND=../../main/bundle ./scripts/repl.js -prepublish working-directory: bucklescript diff --git a/bundle/.gitkeep b/bundle/stdlib/.gitkeep similarity index 100% rename from bundle/.gitkeep rename to bundle/stdlib/.gitkeep From df1faec7b70e50393788aafdf5fcef92df3231fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Sat, 16 May 2020 17:02:50 +0200 Subject: [PATCH 4/6] checkout fix-jsoo-remt branch --- .github/workflows/workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 43fc1cf..253e2ab 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,8 +19,9 @@ jobs: - name: Checkout BuckleScript repo uses: actions/checkout@v2 with: - repository: BuckleScript/bucklescript + repository: jchavarri/bucklescript # temporary, until https://github.com/BuckleScript/bucklescript/pull/4395 is merged path: bucklescript + ref: 'fix-jsoo-remt' # temporary, until https://github.com/BuckleScript/bucklescript/pull/4395 is merged - run: git submodule update --init && ./scripts/buildocaml.js working-directory: bucklescript From 6840711b6412178ac57d3dded64866438c32e247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Mon, 18 May 2020 20:50:05 +0200 Subject: [PATCH 5/6] remove tmp branch --- .github/workflows/workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 253e2ab..eafac15 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,9 +19,8 @@ jobs: - name: Checkout BuckleScript repo uses: actions/checkout@v2 with: - repository: jchavarri/bucklescript # temporary, until https://github.com/BuckleScript/bucklescript/pull/4395 is merged + repository: bucklescript/bucklescript path: bucklescript - ref: 'fix-jsoo-remt' # temporary, until https://github.com/BuckleScript/bucklescript/pull/4395 is merged - run: git submodule update --init && ./scripts/buildocaml.js working-directory: bucklescript From ecaa3c9c5c72061299645ad024e94c7f97453203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cha=CC=81varri?= Date: Mon, 18 May 2020 21:03:32 +0200 Subject: [PATCH 6/6] add cron schedule --- .github/workflows/workflow.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index eafac15..958d639 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,5 +1,11 @@ name: Build bs-platform-js -on: [push] +on: + push: + branches: + - '*' + schedule: + - cron: '* 0 * * *' # every day at midnight utc + jobs: run: name: Build