Improve workflow and builds #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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\** |