update #1199
This file contains hidden or 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 Builds | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - staging | |
| - staging/* | |
| - v[0-9].[0-9]** | |
| paths: | |
| - "**.c" | |
| - "**.h" | |
| - "**.m" | |
| - "**.yml" | |
| - "**.yaml" | |
| - "**.build" | |
| - "**.ini" | |
| - "**.wrap" | |
| pull_request: | |
| paths: | |
| - "**.c" | |
| - "**.h" | |
| - "**.m" | |
| - "**.yml" | |
| - "**.yaml" | |
| - "**.build" | |
| - "**.ini" | |
| - "**.wrap" | |
| workflow_dispatch: | |
| inputs: | |
| publish-emscripten-build: | |
| type: boolean | |
| default: false | |
| description: "Publish emscripten test build" | |
| env: | |
| MESON_VERSION: '1.7.0' | |
| EM_VERSION: '3.1.68' | |
| PYTHON_VERSION: '3.13' | |
| EM_CACHE_FOLDER: 'emsdk' | |
| TAISEI_NOPRELOAD: 0 | |
| TAISEI_PRELOAD_REQUIRED: 1 | |
| jobs: | |
| linux-test-build: | |
| name: Linux (x64) | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ubuntu-latest | |
| container: taiseiproject/linux-toolkit:20250616 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Mark Git Safe Directory | |
| run: | | |
| git config --global --add safe.directory $(pwd) | |
| - name: Configure | |
| run: > | |
| meson setup build/ | |
| --native-file misc/ci/common-options.ini | |
| --native-file misc/ci/nofallback.ini | |
| --native-file misc/ci/linux-x86_64-build-test-ci.ini | |
| --prefix=$(pwd)/build-test | |
| - name: Build | |
| run: | | |
| meson compile -C build/ --verbose | |
| meson install -C build/ | |
| - name: Run Test | |
| run: $(pwd)/build-test/bin/taisei -R $(pwd)/misc/ci/tests/test-replay.tsr | |
| env: | |
| TAISEI_NOPRELOAD: ${{ env.TAISEI_NOPRELOAD }} | |
| TAISEI_PRELOAD_REQUIRED: ${{ env.TAISEI_PRELOAD_REQUIRED }} | |
| - name: Upload Log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taisei_linux_fail_log | |
| path: build/meson-logs/meson-log.txt | |
| if-no-files-found: warn | |
| macos-test-build: | |
| name: macOS (ARM64) | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Mark Git Safe Directory | |
| run: | | |
| git config --global --add safe.directory $(pwd) | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install Tools | |
| run: > | |
| brew install | |
| docutils | |
| pygments | |
| libzip | |
| opusfile | |
| libvorbis | |
| webp | |
| sdl3 | |
| ninja | |
| pip install | |
| meson==${{ env.MESON_VERSION }} | |
| ninja | |
| setuptools | |
| zstandard | |
| --break-system-packages | |
| - name: Configure | |
| run: > | |
| meson setup build/ | |
| --native-file misc/ci/common-options.ini | |
| --native-file misc/ci/nofallback.ini | |
| --native-file misc/ci/macos-aarch64-build-test-ci.ini | |
| --prefix=$(pwd)/build-test | |
| - name: Build | |
| run: | | |
| meson compile -C build/ --verbose | |
| meson install -C build/ | |
| - name: Run Test | |
| run: $(pwd)/build-test/Taisei.app/Contents/MacOS/Taisei -R $(pwd)/misc/ci/tests/test-replay.tsr | |
| env: | |
| TAISEI_NOPRELOAD: ${{ env.TAISEI_NOPRELOAD }} | |
| TAISEI_PRELOAD_REQUIRED: ${{ env.TAISEI_PRELOAD_REQUIRED }} | |
| - name: Upload Log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taisei_macos_fail_log | |
| path: build/meson-logs/meson-log.txt | |
| if-no-files-found: warn | |
| windows-test-build: | |
| name: Windows (x64) | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ubuntu-latest | |
| container: taiseiproject/linux-toolkit:20250616 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Mark Git Safe Directory | |
| run: | | |
| git config --global --add safe.directory $(pwd) | |
| - name: Configure Taisei (Meson) | |
| run: > | |
| meson setup build/ | |
| --cross-file misc/ci/common-options.ini | |
| --cross-file misc/ci/forcefallback.ini | |
| --cross-file misc/ci/windows-llvm_mingw-x86_64-build-test-ci.ini | |
| --prefix=$(pwd)/build-test | |
| - name: Build | |
| run: | | |
| meson compile -C build/ --verbose | |
| meson install -C build/ | |
| - name: Upload Log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taisei_windows_fail_log | |
| path: build/meson-logs/meson-log.txt | |
| if-no-files-found: warn | |
| emscripten-test-build: | |
| name: "Emscripten" | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ubuntu-latest | |
| container: taiseiproject/linux-toolkit:20250616 | |
| steps: | |
| - name: Set up variables | |
| id: set-vars | |
| run: | | |
| PUBLISH_INPUT="${{ github.event.inputs.publish-emscripten-build || 'auto' }}" | |
| if [[ "$PUBLISH_INPUT" == "true" || ( "$PUBLISH_INPUT" == "auto" && "${{ github.ref }}" == "refs/heads/master" ) ]]; then | |
| echo "publish=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "publish=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: 0 | |
| - name: Mark Git Safe Directory | |
| run: | | |
| git config --global --add safe.directory $(pwd) | |
| - name: Fetch Cached Emscripten SDK | |
| id: emsdk-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.EM_CACHE_FOLDER }} | |
| key: ${{ env.EM_VERSION }}-${{ runner.os }} | |
| - name: Install Emscripten SDK | |
| if: steps.emsdk-cache.outputs.cache-hit != 'true' | |
| run: | | |
| rm -rf ./${{ env.EM_CACHE_FOLDER }}/ | |
| git clone https://github.com/emscripten-core/emsdk.git ${{ env.EM_CACHE_FOLDER }} | |
| ${{ env.EM_CACHE_FOLDER }}/emsdk install ${{ env.EM_VERSION }} | |
| ${{ 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 Standard Version | |
| run: > | |
| scripts/version.py > .VERSION.tmp | |
| mv .VERSION.tmp .VERSION | |
| 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)/taisei-web-test | |
| -Dbuild.cpp_std=gnu++14 | |
| - name: Build Standard Version | |
| run: | | |
| source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
| meson compile tar -C build/ --verbose | |
| - name: Checkout taisei-web-test | |
| uses: actions/checkout@v4 | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| with: | |
| repository: taisei-project/taisei-web-test | |
| ssh-key: ${{ secrets.WEB_SSH_DEPLOY_KEY }} | |
| path: taisei-web-test | |
| clean: false | |
| - name: Prepare taisei-web-test | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| rm -v taisei-web-test/data/* | |
| - name: Install Standard Version to taisei-web-test | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| meson install -C build --no-rebuild | |
| - name: Configure Developer Version | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
| sed -i "s/^\(taisei_basename = \).*/\1'taisei-dev'/" src/meson.build # I'm sorry | |
| meson setup --reconfigure $(pwd) build/ -Ddeveloper=true | |
| - name: Build Developer Version | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh | |
| meson compile -C build/ --verbose | |
| - name: Install Developer Version to taisei-web-test | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| meson install -C build --no-rebuild | |
| - name: Deploy to taisei-web-test | |
| if: ${{ steps.set-vars.outputs.publish == 'true' }} | |
| run: | | |
| TAISEI_VERSION=$(scripts/version.py) | |
| cd taisei-web-test | |
| git config user.name 'Nitori Kawashiro [bot]' | |
| git config user.email '[email protected]' | |
| git add . | |
| git commit -m "Taisei $TAISEI_VERSION" | |
| git push | |
| - name: Upload Log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taisei_emscripten_stable_build_log | |
| path: build/meson-logs/meson-log.txt | |
| if-no-files-found: warn | |
| switch-test-build: | |
| name: Switch (ARM64) | |
| if: false | |
| runs-on: ubuntu-latest | |
| container: taiseiproject/switch-toolkit:20240305 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Configure | |
| run: > | |
| switch/crossfile.sh > misc/ci/switch-crossfile-ci.ini | |
| meson setup build/ | |
| --cross-file misc/ci/common-options.ini | |
| --cross-file misc/ci/switch-options.ini | |
| --cross-file misc/ci/switch-crossfile-ci.ini | |
| --prefix=$(pwd)/build-test | |
| - name: Build | |
| run: meson compile -C build/ --verbose | |
| - name: Upload Log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taisei_switch_build_log | |
| path: build/meson-logs/meson-log.txt | |
| if-no-files-found: warn |