Skip to content

Use C++23 (latest C++2b) #101

Use C++23 (latest C++2b)

Use C++23 (latest C++2b) #101

name: "Build on Emscripten"
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: mogemimi/gamedev-emscripten
strategy:
matrix:
build_config: [Debug, Release]
defaults:
run:
shell: bash
env:
EMSDK: /emsdk
steps:
- name: Check out repositry
uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 50
- name: Show Emscripten Compiler version
run: |
source $EMSDK/emsdk_env.sh
$EMSDK/upstream/emscripten/em++ --version
- name: Generate Ninja files
run: |
source $EMSDK/emsdk_env.sh
cmake -Bbuild/emscripten -H. -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_config }} \
-DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
- name: Build
run: ninja -C build/emscripten
- name: Run test
run: |
source $EMSDK/emsdk_env.sh
node \
--experimental-modules \
--experimental-wasm-modules \
--experimental-wasm-threads \
./build/emscripten/test/pomdog_test.js