Skip to content

properly throws

properly throws #176

Workflow file for this run

name: 'Build and Test'
on: [push]
jobs:
Build-And-Test:
name: 'Build and Test'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Setup Emscripten'
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.47
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'Install Meson & Ninja'
uses: BSFishy/pip-action@v1
with:
packages: |
meson
ninja
- name: Write em.txt
uses: "DamianReeves/write-file-action@master"
with:
path: libultrahdr-wasm/em.txt
write-mode: overwrite
contents: |
[binaries]
c = 'emcc'
cpp = 'em++'
ar = 'emar'
nm = 'emnm'
[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'
- name: 'Build libultrahdr WASM'
run: |
cd libultrahdr-wasm
meson setup build --cross-file=em.txt
meson compile -C build
- name: 'Setup Nodejs'
uses: actions/setup-node@v3
with:
node-version: 18
- name: 'Install npm packages'
run: npm ci
- name: 'Build'
run: npm run build
- name: 'Produce Reports & Logs'
if: always()
run: npm run ci:check
#
# CHECKS
#
- name: 'Logscan TypeCheck Src'
if: always()
id: logscan_src
run: '.github/logscan.sh reports/typecheck.log'
- name: 'TypeCheck Src'
if: always()
uses: LouisBrunner/checks-action@v1.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Typecheck Src
conclusion: ${{steps.logscan_src.conclusion}}
output: |
{"summary":"${{ steps.logscan_src.outputs.summary }}"}
- name: 'Logscan TypeCheck Examples'
if: always()
id: logscan_examples
run: '.github/logscan.sh reports/typecheck-examples.log'
- name: 'TypeCheck Examples'
if: always()
uses: LouisBrunner/checks-action@v1.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Typecheck Examples
conclusion: ${{steps.logscan_examples.conclusion}}
output: |
{"summary":"${{ steps.logscan_examples.outputs.summary }}"}
- name: 'Logscan TypeCheck Tests'
if: always()
id: logscan_tests
run: '.github/logscan.sh reports/typecheck-tests.log'
- name: 'TypeCheck Tests'
if: always()
uses: LouisBrunner/checks-action@v1.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Typecheck Tests
conclusion: ${{steps.logscan_tests.conclusion}}
output: |
{"summary":"${{ steps.logscan_tests.outputs.summary }}"}
- name: 'Report Src Code Linting Results'
if: always()
uses: ldiego73/eslint-report-action@v1.1
with:
report: "reports/eslint-src.json"
title: 'Eslint Src'
- name: 'Report Examples Code Linting Results'
if: always()
uses: ldiego73/eslint-report-action@v1.1
with:
report: "reports/eslint-examples.json"
title: 'Eslint Examples'
- name: 'Report Tests Code Linting Results'
if: always()
uses: ldiego73/eslint-report-action@v1.1
with:
report: "reports/eslint-tests.json"
title: 'Eslint Tests'
#
# END CHECKS
#
- name: 'Run tests'
if: always()
run: npm run ci:test
- name: 'Upload Build artifacts'
if: always()
uses: actions/upload-artifact@v3
with:
name: build-artifact
if-no-files-found: error
path: |
libultrahdr-wasm/build/*.ts
libultrahdr-wasm/build/*.js
libultrahdr-wasm/build/*.map
libultrahdr-wasm/build/*.wasm
dist/
reports/