Add option to build inside docker container

This allows us to target older versions of GLIBC.
This commit is contained in:
Leroy Hopson 2022-05-03 12:44:40 +07:00
parent ded2ced89b
commit 6b512bd525
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
7 changed files with 100 additions and 15 deletions

View file

@ -19,8 +19,56 @@ env:
LIBUV_CACHE_VERSION: 1
jobs:
build:
name: 'Build'
build_docker:
name: 'Build Docker'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [ release, debug ]
bits: [ 64, 32 ]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get godot-cpp submodule commit hash
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: |
echo ::set-env name=GODOT_CPP_COMMIT_HASH::$(git ls-tree HEAD addons/godot_xterm/native/thirdparty/godot-cpp -l | cut -d\ -f3)
- name: Cache godot-cpp bindings
uses: actions/cache@v2
id: cache
env:
cache-name: cache-godot-cpp
with:
path: addons/godot_xterm/native/thirdparty/godot-cpp
key: godot-cpp-${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.bits }}-${{ env.GODOT_CPP_COMMIT_HASH }}-v${{ env.GODOT_CPP_CACHE_VERSION }}
- name: Get libuv submodule commit hash
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: |
echo ::set-env name=LIBUV_COMMIT_HASH::$(git ls-tree HEAD addons/godot_xterm/native/thirdparty/libuv -l | cut -d\ -f3)
# Build inside docker container in order to target older GLIBC versions.
- name: Run build script
run: |
cd addons/godot_xterm/native
/bin/bash ./build.sh --target ${{ matrix.target }} --bits ${{ matrix.bits }} --docker
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: libgodot-xterm-${{ matrix.target }}
path: |
addons/godot_xterm/native/bin/*.so
build_native:
name: 'Build Native'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@ -154,10 +202,10 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v2
if: ${{ matrix.platform != 'linux' }}
with:
name: libgodot-xterm-${{ matrix.target }}
path: |
addons/godot_xterm/native/bin/*.so
addons/godot_xterm/native/bin/*.wasm
addons/godot_xterm/native/bin/*.dylib
addons/godot_xterm/native/bin/*.dll
@ -219,7 +267,7 @@ jobs:
html5_export:
name: 'HTML5 Export'
needs: [ build, export_template ]
needs: [ build_docker, build_native, export_template ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -254,7 +302,7 @@ jobs:
test:
name: 'Test'
needs: [ install_plugins, build ]
needs: [ install_plugins, build_docker, build_native ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false