Skip to content

Improve workflow and builds #59

Improve workflow and builds

Improve workflow and builds #59

Workflow file for this run

name: Windows WebAssembly build & test
on:
push:
branches: ["main"]
jobs:
build-and-tests:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install MinGW dependencies
run: |
C:/msys64/usr/bin/pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain --noconfirm
$env:Path += ";C:\msys64\ucrt64\bin"
- name: Install Emscripten SDK
uses: mymindstorm/setup-emsdk@v14
- name: Generate
run: emcmake.bat cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release -Btarget
- name: Build
run: cmake --build target -- -j 16
- name: Test
run: ctest --test-dir target -C Release -T test --output-on-failure -VV
- name: Release
run: |
xcopy target\test\test_core.js release\ /s /y
xcopy target\test\test_core.wasm release\ /s /y
xcopy target\src\libcore.a release\ /s /y
xcopy interface\core release\core\ /s /y
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows_webassembly
path: release\**