mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-26 08:38:04 +03:00
44 lines
948 B
YAML
44 lines
948 B
YAML
name: Emscripten Build
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
EM_VERSION: 3.1.44
|
|
EM_CACHE_FOLDER: 'emsdk-cache'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup cache
|
|
id: cache-system-libraries
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{env.EM_CACHE_FOLDER}}
|
|
key: ${{env.EM_VERSION}}-${{ runner.os }}
|
|
|
|
- name: Setup Emscripten toolchain
|
|
uses: mymindstorm/setup-emsdk@v12
|
|
with:
|
|
version: ${{ env.EM_VERSION }}
|
|
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
|
|
|
- name: Build
|
|
run: |
|
|
mkdir -p out/wasm
|
|
cd out/wasm
|
|
emcmake cmake -DCMAKE_BUILD_TYPE=Release ../../src/
|
|
make
|
|
mkdir system3
|
|
mv system3.* system3/
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: system3-wasm
|
|
path: out/wasm/system3
|