From 7adfbcb12bf6576f8fbd5d6598f21f7c88d161f5 Mon Sep 17 00:00:00 2001 From: Viet Dinh <54ckb0y789@gmail.com> Date: Sat, 30 May 2026 20:15:50 -0700 Subject: [PATCH] CI: migrate to docker --- .github/workflows/compile-test.yml | 56 ++++++++---------------------- 1 file changed, 14 insertions(+), 42 deletions(-) diff --git a/.github/workflows/compile-test.yml b/.github/workflows/compile-test.yml index 38a260f52..52d1cf406 100644 --- a/.github/workflows/compile-test.yml +++ b/.github/workflows/compile-test.yml @@ -21,62 +21,34 @@ jobs: name: check if: github.repository == 'ynoproject/ynoengine' runs-on: ubuntu-latest + container: + image: ghcr.io/ynoproject/buildscripts:master + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -yqq --no-install-recommends --no-install-suggests \ - build-essential cmake ninja-build git ca-certificates ccache - sudo pip3 install meson - - uses: actions/checkout@v6 - - name: Checkout buildscripts - uses: actions/checkout@v6 - with: - repository: EasyRPG/buildscripts - path: buildscripts - - - name: Get buildscripts commit hash - id: buildscripts-hash - working-directory: buildscripts - run: | - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - - name: Cache Emscripten toolchain and libraries - id: cache - uses: actions/cache@v5 with: - path: | - buildscripts/emscripten/emsdk-portable - buildscripts/emscripten/bin - buildscripts/emscripten/lib - buildscripts/emscripten/include - key: easyrpg-emscripten-${{ steps.buildscripts-hash.outputs.hash }}-${{ runner.os }} - restore-keys: | - easyrpg-emscripten-${{ steps.buildscripts-hash.outputs.hash }}- - easyrpg-emscripten- - - - name: Install Player dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: bash 0_build_everything.sh - working-directory: buildscripts/emscripten - env: - BUILD_LIBLCF: "1" + path: ynoengine - run: cmake --preset yno-simd-release + working-directory: ynoengine env: - EASYRPG_BUILDSCRIPTS: "${{ github.workspace }}/buildscripts" + EASYRPG_BUILDSCRIPTS: "/root/workdir/buildscripts" - run: cmake --build --preset yno-simd-release + working-directory: ynoengine - run: cmake --preset yno-release + working-directory: ynoengine env: - EASYRPG_BUILDSCRIPTS: "${{ github.workspace }}/buildscripts" + EASYRPG_BUILDSCRIPTS: "/root/workdir/buildscripts" - run: cmake --build --preset yno-release + working-directory: ynoengine - uses: actions/upload-artifact@v4 with: name: ynoengine-wasm path: | - build/yno-simd-release/ynoengine-simd.* - build/yno-release/ynoengine.* + ynoengine/build/yno-simd-release/ynoengine-simd.* + ynoengine/build/yno-release/ynoengine.* if-no-files-found: warn