Skip to content

Add WASM support.

Add WASM support. #177

Workflow file for this run

name: Dart CI

Check failure on line 1 in .github/workflows/dart.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dart.yml

Invalid workflow file

(Line: 50, Col: 13): Unrecognized named-value: 'vm'. Located at position 20 within expression: matrix.compiler != vm
env:
PANA_SCORE_THRESHOLD: 20
on:
push:
branches:
- master
pull_request:
jobs:
format:
name: Formatting
runs-on: ubuntu-slim
strategy:
fail-fast: false
matrix:
package:
- cryptography
- cryptography_test
- jwk
steps:
- uses: dart-lang/setup-dart@v1
- uses: actions/checkout@v3
- name: Verify that code is formatted
run: dart format --set-exit-if-changed .
working-directory: "./${{ matrix.package }}"
test:
name: Test
needs: format
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- cryptography
- jwk
compiler:
- vm
- dart2js
- dart2wasm
sdk:
# The oldest supported Dart SDK at the moment.
# Feel free to bump it up whenever needed.
- 3.6.0
- beta
steps:
- uses: browser-actions/setup-chrome@v2
if: ${{ matrix.compiler != vm }}
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
- name: Get dependencies
run: dart --version && dart pub get
working-directory: ./${{ matrix.package }}
- name: Analyze
run: dart analyze
working-directory: ./${{ matrix.package }}
- name: "Test: VM build"
if: ${{ matrix.compiler == 'vm' }}
run: dart test --platform vm
working-directory: ./${{ matrix.package }}
- name: "Test: JS build"
if: ${{ matrix.compiler == 'dart2js' }}
run: dart test --platform chrome --compiler dart2js
working-directory: ./${{ matrix.package }}
- name: "Test: WASM build"
if: ${{ matrix.compiler == 'dart2wasm' }}
run: dart test --platform chrome --compiler dart2wasm
working-directory: ./${{ matrix.package }}
package_health:
name: Analyze package health
needs: analyze
runs-on: ubuntu-slim
strategy:
fail-fast: false
matrix:
package:
- cryptography
- jwk
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart --version && dart pub get && dart pub global activate pana
- name: Run package analyzer
run: dart pub global run pana --exit-code-threshold $PANA_SCORE_THRESHOLD
working-directory: ./${{ matrix.package }}