Test Build (Emscripten Experimental) #390
This file contains 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: 'Test Build (Emscripten Experimental)' | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Test Builds"] | |
branches: [master] | |
types: | |
- completed | |
schedule: | |
# run every thursday at 10:00 | |
- cron: '0 10 * * 4' | |
env: | |
MESON_VERSION: '0.63.3' | |
EM_VERSION: 'tot' | |
EM_CACHE_FOLDER: 'emsdk' | |
jobs: | |
emscripten-weekly-latest: | |
name: 'Emscripten' | |
if: "!contains(github.event.head_commit.message, '[skip ci]') && ${{ github.event.workflow_run.conclusion == 'success' }}" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install Tools | |
run: > | |
sudo apt update || true | |
sudo apt install -y -qq | |
python3-docutils | |
python3-pip | |
git | |
pip install | |
meson==${{ env.MESON_VERSION }} | |
ninja | |
python-gnupg | |
zstandard | |
- name: Install Emscripten SDK | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git ${{ env.EM_CACHE_FOLDER }} | |
${{ env.EM_CACHE_FOLDER }}/emsdk install ${{ env.EM_VERSION }} || true | |
${{ env.EM_CACHE_FOLDER }}/emsdk activate ${{ env.EM_VERSION }} | |
- name: Verify Emscripten SDK | |
run: | | |
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
emcc -v | |
tee misc/ci/emscripten-ephemeral-ci.ini <<EOF >/dev/null | |
[constants] | |
toolchain = '$(pwd)/${{ env.EM_CACHE_FOLDER }}/upstream/emscripten/' | |
EOF | |
- name: Configure | |
run: > | |
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
meson setup build/ | |
--cross-file misc/ci/common-options.ini | |
--cross-file misc/ci/forcefallback.ini | |
--cross-file misc/ci/emscripten-ephemeral-ci.ini | |
--cross-file misc/ci/emscripten-build.ini | |
--prefix=$(pwd)/build-test | |
meson configure | |
-Dbuild.cpp_std=gnu++14 | |
build/ | |
- name: Build | |
run: | | |
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
meson compile tar -C build/ --verbose | |
ninja zip -C build/ | |
- name: Upload Log | |
uses: actions/upload-artifact@v4 | |
with: | |
name: taisei_emscripten_latest_build_log | |
path: build/meson-logs/meson-log.txt |