mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-26 16:38:06 +03:00
42 lines
924 B
YAML
42 lines
924 B
YAML
name: Emscripten Build
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
EM_VERSION: 3.1.15
|
|
EM_CACHE_FOLDER: 'emsdk-cache'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- 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@v11
|
|
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=MinSizeRel ../../
|
|
make
|
|
mkdir xsystem35
|
|
mv src/xsystem35.* xsystem35/
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: xsystem35-wasm
|
|
path: out/wasm/xsystem35
|