From 8daf3db8cd10b99226f1d5c140b52d9f6ed3eae7 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 19:37:52 +0200 Subject: [PATCH 1/6] Fix CI once again --- .github/workflows/ci.yml | 11 +++++------ .github/workflows/publish.yml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f3be6e910..8d4823a24a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: needs: check strategy: matrix: - node_version: ["lts/*", "node"] + node_version: ["lts_latest", "current"] steps: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master @@ -88,8 +88,7 @@ jobs: - uses: dcodeIO/setup-node-nvm@master with: node-mirror: https://nodejs.org/download/v8-canary/ - # FIXME: newer node-v8 builds are currently broken - node-version: "14.0.0-v8-canary201911242015a12d82" + node-version: latest - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files @@ -107,7 +106,7 @@ jobs: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master with: - node-version: node + node-version: current - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files @@ -132,7 +131,7 @@ jobs: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master with: - node-version: node + node-version: current - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files @@ -150,7 +149,7 @@ jobs: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master with: - node-version: node + node-version: current - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9abaef18d1..837e77c7ef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: ref: release - uses: dcodeIO/setup-node-nvm@master with: - node-version: node + node-version: current - name: Merge master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1549777bd7fd53f376ad22e12ce45848503cacf8 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 19:39:23 +0200 Subject: [PATCH 2/6] use action on Windows --- .github/workflows/ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d4823a24a..17f57c203d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,13 +62,9 @@ jobs: needs: check steps: - uses: actions/checkout@v1.0.0 - - name: Install node via nvm-windows - run: | - Invoke-WebRequest -Uri https://github.com/coreybutler/nvm-windows/releases/download/1.1.7/nvm-noinstall.zip -OutFile nvm.zip - Expand-Archive nvm.zip -DestinationPath nvm - nvm/nvm install node - nvm/nvm use node - npm -g install npm@latest + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: current - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files From cc18842cacfc8e409bf36b3ce1ec582ba9e3bb08 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 19:44:27 +0200 Subject: [PATCH 3/6] still some issues with node-v8 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17f57c203d..be25180a72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,8 @@ jobs: - uses: dcodeIO/setup-node-nvm@master with: node-mirror: https://nodejs.org/download/v8-canary/ - node-version: latest + # FIXME: newer node-v8 builds are currently broken + node-version: "14.0.0-v8-canary201911242015a12d82" - name: Install dependencies run: npm ci --no-audit - name: Clean distribution files From 158bc45f7a9600b5e5f9f0ae8be84ed51baab75f Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 20:26:26 +0200 Subject: [PATCH 4/6] tidy up --- .github/workflows/publish.yml | 3 ++- .github/workflows/{ci.yml => test.yml} | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) rename .github/workflows/{ci.yml => test.yml} (92%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 837e77c7ef..434f1d9aa3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,8 @@ on: - cron: '0 0 * * *' jobs: publish: - name: "Publish packages" + name: "Packages" + if: github.repository == 'AssemblyScript/assemblyscript' runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 92% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index be25180a72..a82744a01a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI +name: Test on: push: branches: @@ -6,7 +6,7 @@ on: pull_request: jobs: check: - name: "Check preconditions" + name: "Check" runs-on: ubuntu-latest steps: - uses: actions/checkout@v1.0.0 @@ -35,7 +35,7 @@ jobs: printf "\nOK: Distributions files have not been modified.\n"; fi test: - name: "Test compiler on node: ${{ matrix.node_version }}" + name: "Compiler (node ${{ matrix.node_version }})" runs-on: ubuntu-latest needs: check strategy: @@ -57,7 +57,7 @@ jobs: - name: Test distribution run: npm test test-windows: - name: "Test compiler on Windows with node: node" + name: "Compiler (Windows)" runs-on: windows-latest needs: check steps: @@ -75,8 +75,8 @@ jobs: run: npm run build - name: Test distribution run: npm test - test-canary: - name: "Test features on node: v8-canary" + test-features: + name: "Features" runs-on: ubuntu-latest needs: check steps: @@ -95,8 +95,8 @@ jobs: ASC_FEATURES: mutable-globals,threads,reference-types,bigint-integration run: | npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads - test-runtime: - name: "Test runtimes on node: node" + test-runtimes: + name: "Runtimes" runs-on: ubuntu-latest needs: check steps: @@ -121,7 +121,7 @@ jobs: cd .. npm test rt-stub test-loader: - name: "Test loader on node: node" + name: "Loader" runs-on: ubuntu-latest needs: check steps: @@ -139,7 +139,7 @@ jobs: npm run asbuild npm run test test-bootstrap: - name: "Test self-compilation on node: node" + name: "Bootstrap" runs-on: ubuntu-latest needs: check steps: From d146009826d56d81193cfd8c3d525965910f1dd5 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 20:30:18 +0200 Subject: [PATCH 5/6] update badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 961876f170..d33f0b2a4d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![](https://avatars1.githubusercontent.com/u/28916798?s=64) AssemblyScript ================= -[![Actions Status](https://github.com/AssemblyScript/assemblyscript/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/AssemblyScript/assemblyscript/actions) [![npm](https://img.shields.io/npm/v/assemblyscript.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript) [![npm@nightly](https://img.shields.io/npm/v/assemblyscript/nightly.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript) +[![Actions Status](https://github.com/AssemblyScript/assemblyscript/workflows/Test/badge.svg?branch=master&event=push)](https://github.com/AssemblyScript/assemblyscript/actions) [![npm](https://img.shields.io/npm/v/assemblyscript.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript) [![npm@nightly](https://img.shields.io/npm/v/assemblyscript/nightly.svg?color=0074C1)](https://www.npmjs.com/package/assemblyscript) **AssemblyScript** compiles a strict subset of [TypeScript](http://www.typescriptlang.org) (basically JavaScript with types) to [WebAssembly](http://webassembly.org) using [Binaryen](https://github.com/WebAssembly/binaryen). It generates lean and mean WebAssembly modules while being just an `npm install` away. From 803389a939a1d6f76eda1a4f442c00fba65c4a51 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 10 Apr 2020 20:34:01 +0200 Subject: [PATCH 6/6] add macos test --- .github/workflows/test.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a82744a01a..459ba9dbf5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,12 +35,12 @@ jobs: printf "\nOK: Distributions files have not been modified.\n"; fi test: - name: "Compiler (node ${{ matrix.node_version }})" + name: "Compiler (Linux, node ${{ matrix.node_version }})" runs-on: ubuntu-latest needs: check strategy: matrix: - node_version: ["lts_latest", "current"] + node_version: ["current", "lts_latest"] steps: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master @@ -57,7 +57,7 @@ jobs: - name: Test distribution run: npm test test-windows: - name: "Compiler (Windows)" + name: "Compiler (Windows, node current)" runs-on: windows-latest needs: check steps: @@ -75,6 +75,25 @@ jobs: run: npm run build - name: Test distribution run: npm test + test-macos: + name: "Compiler (MacOS, node current)" + runs-on: macos-latest + needs: check + steps: + - uses: actions/checkout@v1.0.0 + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: current + - name: Install dependencies + run: npm ci --no-audit + - name: Clean distribution files + run: npm run clean + - name: Test sources + run: npm test + - name: Build distribution files + run: npm run build + - name: Test distribution + run: npm test test-features: name: "Features" runs-on: ubuntu-latest