From 8a35b17ba605b5760d6eb2f184e165ad9e878b36 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 9 Nov 2023 14:42:19 +0100 Subject: [PATCH 1/3] GH: Update EM version and fix EM cache failures Adds "Init Emscripten" step to solve cache issues --- .github/workflows/web.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 829ef6f..55fae9c 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -27,32 +27,44 @@ env: SCONS_CACHE_LIMIT: 4096 # With `lto=full` VM seems to run out of ram and build fails SCONSFLAGS: use_static_cpp=yes debug_symbols=no lto=thin optimize=size verbose=yes warnings=extra werror=yes tests=no - EM_VERSION: 3.1.18 + EM_VERSION: 3.1.45 EM_CACHE_FOLDER: "emsdk-cache" jobs: + # Workaround for issue: https://github.com/mymindstorm/setup-emsdk/issues/20 + init-emscripten: + name: Init Emscripten + runs-on: "ubuntu-20.04" + steps: + - name: Set up Emscripten + uses: mymindstorm/setup-emsdk@v12 + with: + version: ${{env.EM_VERSION}} + actions-cache-folder: ${{env.EM_CACHE_FOLDER}} + web-builds: runs-on: "ubuntu-20.04" name: ${{ matrix.name }} + needs: init-emscripten strategy: fail-fast: false matrix: include: - name: Template (release) target: template_release - dlink_enabled: no + dlink_enabled: false - name: Template (release, dlink_enabled=true) target: template_release - dlink_enabled: yes + dlink_enabled: true - name: Template (debug) target: template_debug - dlink_enabled: no + dlink_enabled: false - name: Template (debug, dlink_enabled=true) target: template_debug - dlink_enabled: yes + dlink_enabled: true env: CACHE_NAME: godot.web.${{matrix.target}}${{ matrix.dlink_enabled == true && '.dlink' || '' }} @@ -73,7 +85,13 @@ jobs: # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. - uses: ./modules/limboai/.github/actions/init-version - - name: Set up Emscripten latest + - name: Set up Emscripten cache + uses: actions/cache@v3 + with: + path: ${{env.EM_CACHE_FOLDER}} + key: ${{env.EM_VERSION}}-${{runner.os}}-libs + + - name: Set up Emscripten uses: mymindstorm/setup-emsdk@v12 with: version: ${{env.EM_VERSION}} From 9548fb601c08dc08194c910000e703782119f822 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 9 Nov 2023 15:07:29 +0100 Subject: [PATCH 2/3] GH: Use checkout v4 --- .github/workflows/all_builds.yml | 4 ++-- .github/workflows/android.yml | 8 ++++---- .github/workflows/ios.yml | 8 ++++---- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 8 ++++---- .github/workflows/test_builds.yml | 4 ++-- .github/workflows/web.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/all_builds.yml b/.github/workflows/all_builds.yml index d7a0565..3f36296 100644 --- a/.github/workflows/all_builds.yml +++ b/.github/workflows/all_builds.yml @@ -20,13 +20,13 @@ jobs: limboai-sha: ${{ steps.cache-sha.outputs.limboai-sha }} steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index de18af1..653fcbd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -74,13 +74,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} @@ -132,13 +132,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 1adcc06..fdc68eb 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -78,13 +78,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} @@ -143,13 +143,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c346856..82fb24c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -102,13 +102,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index aacdd92..c743353 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -121,13 +121,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} @@ -203,13 +203,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/test_builds.yml b/.github/workflows/test_builds.yml index 19ce043..d7aa5c2 100644 --- a/.github/workflows/test_builds.yml +++ b/.github/workflows/test_builds.yml @@ -76,13 +76,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ env.GODOT_TREEISH }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 55fae9c..0527620 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -71,13 +71,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ec3112d..0e57143 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -103,13 +103,13 @@ jobs: steps: - name: Clone Godot - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: godotengine/godot ref: ${{ inputs.godot-treeish }} - name: Clone LimboAI module - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: modules/limboai ref: ${{ inputs.limboai-treeish }} From a7bd8b81ea6abd320e9b4b41745ae26198b929e3 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 9 Nov 2023 19:06:58 +0100 Subject: [PATCH 3/3] GH: Disable emscripten lib cache --- .github/workflows/web.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 0527620..39804d0 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -85,11 +85,11 @@ jobs: # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. - uses: ./modules/limboai/.github/actions/init-version - - name: Set up Emscripten cache - uses: actions/cache@v3 - with: - path: ${{env.EM_CACHE_FOLDER}} - key: ${{env.EM_VERSION}}-${{runner.os}}-libs + # - name: Set up Emscripten cache + # uses: actions/cache@v3 + # with: + # path: ${{env.EM_CACHE_FOLDER}} + # key: ${{env.EM_VERSION}}-${{runner.os}}-libs - name: Set up Emscripten uses: mymindstorm/setup-emsdk@v12