diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9abaef18d1..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 @@ -12,7 +13,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 }} diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 81% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index 0f3be6e910..459ba9dbf5 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,12 +35,12 @@ jobs: printf "\nOK: Distributions files have not been modified.\n"; fi test: - name: "Test compiler on node: ${{ matrix.node_version }}" + name: "Compiler (Linux, node ${{ matrix.node_version }})" runs-on: ubuntu-latest needs: check strategy: matrix: - node_version: ["lts/*", "node"] + node_version: ["current", "lts_latest"] steps: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master @@ -57,18 +57,33 @@ jobs: - name: Test distribution run: npm test test-windows: - name: "Test compiler on Windows with node: node" + name: "Compiler (Windows, node current)" runs-on: windows-latest 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 + 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-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 @@ -79,8 +94,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: @@ -99,15 +114,15 @@ 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: - 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 @@ -125,14 +140,14 @@ jobs: cd .. npm test rt-stub test-loader: - name: "Test loader on node: node" + name: "Loader" runs-on: ubuntu-latest needs: check steps: - 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 @@ -143,14 +158,14 @@ 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: - 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/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.