Skip to content

wasm

wasm #61

Workflow file for this run

name: run-tests

Check failure on line 1 in .github/workflows/run-tests.yml

View workflow run for this annotation

GitHub Actions / run-tests

Invalid workflow file

The workflow is not valid. .github/workflows/run-tests.yml: Anchors are not currently supported. Remove the anchor 'upload'
on: [push, pull_request]
jobs:
# Note: use a separate entry for each arch, instead of a matrix, cause there are several small differences between the archs
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: make run
run: |
make run CFLAGS=-fPIC
sudo apt install valgrind
make valgrind CFLAGS=-fPIC
- &upload
name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: .
build-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
- name: make run
run: make run WASM=1
- *upload
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: make run
run: make run CFLAGS=-fPIC
- *upload
build-macos-intel:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: make run
run: make run CFLAGS=-fPIC
- *upload
build-macos-arm64:
needs: build-macos-intel # to build multi-arch lib
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
name: build-macos-intel
- name: make run
run: |-
make run CFLAGS=-fPIC
# create muilti-arch lib
lipo -create ./build-macos-intel/lib/k08.a ./lib/k08.a -output lib/k08_macos.a
- *upload
collect-libs:
runs-on: ubuntu-latest
needs: [build-linux, build-wasm, build-win, build-macos-arm64]
steps:
- uses: actions/download-artifact@v4
- name: copy libs
run: |
mkdir lib
cp ./build-linux/lib/k08.a lib/k08_linux.a
cp ./build-wasm/lib/k08.a lib/k08_wasm.a
cp ./build-win/lib/k08.a lib/k08_win.a
cp ./build-macos-arm64/lib/k08_macos.a lib/k08_macos.a # multi-arch
- name: Upload
uses: actions/upload-artifact@v4
with:
name: all-libs
path: lib