mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-01 19:28:00 +03:00
Document the supported SDL configurations and build dependencies for each platform. Keep Android on SDL3 only and identify every packaged artifact by its SDL version.
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Emscripten Build
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
EM_VERSION: latest
|
|
EM_CACHE_FOLDER: 'emsdk-cache'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
sdl-version: [2, 3]
|
|
name: Emscripten SDL${{ matrix.sdl-version }}
|
|
steps:
|
|
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup cache
|
|
id: cache-system-libraries
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ${{env.EM_CACHE_FOLDER}}
|
|
key: ${{env.EM_VERSION}}-${{ runner.os }}-sdl${{ matrix.sdl-version }}
|
|
|
|
- name: Setup Emscripten toolchain
|
|
uses: emscripten-core/setup-emsdk@v16
|
|
with:
|
|
version: ${{ env.EM_VERSION }}
|
|
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
|
|
|
- name: Work around emscripten-core/emscripten#26534
|
|
run: npm install -g typescript@5
|
|
|
|
- name: Build
|
|
run: |
|
|
emcmake cmake -S . -B out/wasm \
|
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
|
-DCMAKE_COMPILE_WARNING_AS_ERROR=YES \
|
|
-DXSYSTEM35_SDL_VERSION=${{ matrix.sdl-version }}
|
|
cmake --build out/wasm -j4
|
|
mkdir out/wasm/xsystem35
|
|
mv out/wasm/src/xsystem35.* out/wasm/xsystem35/
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: xsystem35-wasm-sdl${{ matrix.sdl-version }}
|
|
path: out/wasm/xsystem35
|