Skip to content

Commit

Permalink
Merge pull request #36 from limbonaut/gha-web-gdextension
Browse files Browse the repository at this point in the history
GHA: Fix web gdextension build
  • Loading branch information
limbonaut authored Feb 15, 2024
2 parents 8a226a1 + b5247dd commit b024545
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/gdextension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ on:
env:
SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: dev_build=no debug_symbols=no
EM_VERSION: 3.1.45
EM_CACHE_FOLDER: "emsdk-cache"

jobs:
gdextension:
Expand Down Expand Up @@ -144,8 +146,27 @@ jobs:
python-version: "3.x"
architecture: "x64"

- name: Set up Emscripten cache
if: matrix.opts.platform == 'web'
uses: actions/cache@v3
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{runner.os}}-libs

- name: Set up Emscripten
if: matrix.opts.platform == 'web'
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

- name: Verify Emscripten setup
if: matrix.opts.platform == 'web'
run: |
emcc -v
- name: Set up scons
if: matrix.opts.platform == 'windows' || matrix.opts.platform == 'macos'
if: matrix.opts.platform == 'windows' || matrix.opts.platform == 'macos' || matrix.opts.platform == 'web'
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
Expand Down Expand Up @@ -195,7 +216,7 @@ jobs:
ls -R out/
- name: Strip lib
if: matrix.opts.platform != 'windows'
if: matrix.opts.platform != 'windows' && matrix.opts.platform != 'web'
run: |
ls -l -R out/addons/limboai/bin/
echo "---"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ on:
workflow_dispatch:

push:
branches: [ master ]
branches: [master]
paths-ignore:
- "README.md"
- "LICENSE"
- "LICENSE.md"
- "**/*.png"
- "demo/**"
- "doc/**"

pull_request:
branches: [ master ]
branches: [master]
paths-ignore:
- "README.md"
- "LICENSE"
- "LICENSE.md"
- "**/*.png"
- "demo/**"
- "doc/**"
Expand Down Expand Up @@ -77,8 +77,8 @@ jobs:
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
python-version: "3.x"
architecture: "x64"

- name: Set up scons
run: |
Expand Down

0 comments on commit b024545

Please sign in to comment.