CI: Run Linux builds on Ubuntu 16.04 for better compatibility

This commit is contained in:
Ignacio Etcheverry 2020-05-22 23:14:56 +02:00
parent 42a0caae0f
commit d1f88c23fb

View File

@ -2,20 +2,32 @@ name: Build
on: on:
push: push:
branches:
- '**'
- '!release/**'
paths-ignore: paths-ignore:
- '.gitignore' - '.gitignore'
- 'LICENSE' - 'LICENSE'
- 'README.md' - 'README.md'
pull_request: pull_request:
branches:
- '**'
- '!release/**'
paths-ignore: paths-ignore:
- '.gitignore' - '.gitignore'
- 'LICENSE' - 'LICENSE'
- 'README.md' - 'README.md'
create:
branches:
- 'release/**'
# Use ubuntu-16.04 for the best compatibility.
# Use ubuntu-latest for the Windows builds because of outdated MinGW headers on ubuntu-16.04.
# Use ubuntu-latest for the WASM runtime ("machine `wasm32' not recognized" on ubuntu-16.04)
env: env:
# Use SHA instead of the branch for caching purposes # Use SHA instead of the branch for caching purposes
MONO_BRANCH: 2019-10 MONO_TAG: mono-6.8.0.123
MONO_SHA: 1d0d939dc30a5b56f478bc9f097cab146276b9af
PYTHON_VERSION: 3.8 PYTHON_VERSION: 3.8
EMSDK_VERSION: 1.38.47-upstream EMSDK_VERSION: 1.38.47-upstream
ANDROID_PLATFORM: android-29 ANDROID_PLATFORM: android-29
@ -26,7 +38,7 @@ env:
jobs: jobs:
linux: linux:
name: Linux name: Linux
runs-on: ubuntu-latest runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
target: [x86, x86_64] target: [x86, x86_64]
@ -51,15 +63,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -69,7 +83,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -87,6 +100,8 @@ jobs:
with: with:
name: linux-${{ matrix.target }} name: linux-${{ matrix.target }}
path: ~/mono-installs-artifacts/linux-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/linux-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -122,15 +137,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -140,7 +157,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -158,6 +174,8 @@ jobs:
with: with:
name: windows-${{ matrix.target }} name: windows-${{ matrix.target }}
path: ~/mono-installs-artifacts/windows-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/windows-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -183,15 +201,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -201,7 +221,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -219,6 +238,8 @@ jobs:
with: with:
name: osx-${{ matrix.target }} name: osx-${{ matrix.target }}
path: ~/mono-installs-artifacts/osx-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/osx-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -244,15 +265,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -262,7 +285,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -281,6 +303,8 @@ jobs:
with: with:
name: ios-${{ matrix.target }} name: ios-${{ matrix.target }}
path: ~/mono-installs-artifacts/ios-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/ios-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -311,15 +335,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -329,7 +355,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Download LLVM artifact - name: Download LLVM artifact
@ -365,6 +390,8 @@ jobs:
with: with:
name: ios-${{ matrix.target }} name: ios-${{ matrix.target }}
path: ~/mono-installs-artifacts/ios-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/ios-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload Runtime config.log After Error - name: Upload Runtime config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -380,7 +407,7 @@ jobs:
android: android:
name: Android name: Android
runs-on: ubuntu-latest runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
target: [armeabi-v7a, arm64-v8a, x86, x86_64] target: [armeabi-v7a, arm64-v8a, x86, x86_64]
@ -406,15 +433,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -424,7 +453,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -442,6 +470,8 @@ jobs:
with: with:
name: android-${{ matrix.target }} name: android-${{ matrix.target }}
path: ~/mono-installs-artifacts/android-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/android-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -452,35 +482,61 @@ jobs:
android-cross: android-cross:
needs: llvm needs: llvm
name: Android Cross-compiler name: Android Cross-compiler
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
target: [cross-arm, cross-arm64, cross-x86, cross-x86_64, cross-arm-win, cross-arm64-win, cross-x86-win, cross-x86_64-win] target: [cross-arm, cross-arm64, cross-x86, cross-x86_64, cross-arm-win, cross-arm64-win, cross-x86-win, cross-x86_64-win]
os: [ubuntu-16.04, ubuntu-latest]
exclude:
- target: cross-arm
os: ubuntu-latest
- target: cross-arm64
os: ubuntu-latest
- target: cross-x86
os: ubuntu-latest
- target: cross-x86_64
os: ubuntu-latest
- target: cross-arm-win
os: ubuntu-16.04
- target: cross-arm64-win
os: ubuntu-16.04
- target: cross-x86-win
os: ubuntu-16.04
- target: cross-x86_64-win
os: ubuntu-16.04
include: include:
- target: cross-arm - target: cross-arm
llvm: llvm64 llvm: llvm64
runtime_target: armeabi-v7a runtime_target: armeabi-v7a
os: ubuntu-16.04
- target: cross-arm64 - target: cross-arm64
llvm: llvm64 llvm: llvm64
runtime_target: arm64-v8a runtime_target: arm64-v8a
os: ubuntu-16.04
- target: cross-x86 - target: cross-x86
llvm: llvm64 llvm: llvm64
runtime_target: x86 runtime_target: x86
os: ubuntu-16.04
- target: cross-x86_64 - target: cross-x86_64
llvm: llvm64 llvm: llvm64
runtime_target: x86_64 runtime_target: x86_64
os: ubuntu-16.04
- target: cross-arm-win - target: cross-arm-win
llvm: llvmwin64 llvm: llvmwin64
runtime_target: armeabi-v7a runtime_target: armeabi-v7a
os: ubuntu-latest
- target: cross-arm64-win - target: cross-arm64-win
llvm: llvmwin64 llvm: llvmwin64
runtime_target: arm64-v8a runtime_target: arm64-v8a
os: ubuntu-latest
- target: cross-x86-win - target: cross-x86-win
llvm: llvmwin64 llvm: llvmwin64
runtime_target: x86 runtime_target: x86
os: ubuntu-latest
- target: cross-x86_64-win - target: cross-x86_64-win
llvm: llvmwin64 llvm: llvmwin64
runtime_target: x86_64 runtime_target: x86_64
os: ubuntu-latest
steps: steps:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
@ -507,15 +563,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -527,7 +585,7 @@ jobs:
- name: Download LLVM artifact - name: Download LLVM artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: llvm-${{ matrix.llvm }}-ubuntu-latest name: llvm-${{ matrix.llvm }}-${{ matrix.os }}
# Tilde ~/ not supported when downloading yet: https://github.com/actions/download-artifact/issues/37 # Tilde ~/ not supported when downloading yet: https://github.com/actions/download-artifact/issues/37
# File permissions are also messed up: https://github.com/actions/upload-artifact/issues/38 # File permissions are also messed up: https://github.com/actions/upload-artifact/issues/38
# We have to manually move the folder and restore the file permissions in the next step. # We have to manually move the folder and restore the file permissions in the next step.
@ -538,7 +596,6 @@ jobs:
chmod 755 $HOME/mono-installs/llvm-${{ matrix.llvm }}/bin/* chmod 755 $HOME/mono-installs/llvm-${{ matrix.llvm }}/bin/*
mkdir -p $HOME/mono-configs/ && touch $HOME/mono-configs/.stamp-${{ matrix.llvm }}-make mkdir -p $HOME/mono-configs/ && touch $HOME/mono-configs/.stamp-${{ matrix.llvm }}-make
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure Runtime - name: Configure Runtime
@ -559,6 +616,8 @@ jobs:
with: with:
name: android-${{ matrix.target }} name: android-${{ matrix.target }}
path: ~/mono-installs-artifacts/android-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/android-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload Runtime config.log After Error - name: Upload Runtime config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -591,15 +650,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -613,7 +674,6 @@ jobs:
with: with:
version: ${{ env.EMSDK_VERSION }} version: ${{ env.EMSDK_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
@ -631,6 +691,8 @@ jobs:
with: with:
name: wasm-${{ matrix.target }} name: wasm-${{ matrix.target }}
path: ~/mono-installs-artifacts/wasm-${{ matrix.target }}.zip path: ~/mono-installs-artifacts/wasm-${{ matrix.target }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -643,9 +705,16 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-16.04, ubuntu-latest, macos-latest]
target: [llvm64, llvmwin64] target: [llvm64, llvmwin64]
exclude: exclude:
# Ubuntu 16.04 is only needed for the Linux build
- os: ubuntu-16.04
target: llvmwin64
# Ubuntu latest is only needed for the Windows build
- os: ubuntu-latest
target: llvm64
# We already build for Windows on ubuntu-latest
- os: macos-latest - os: macos-latest
target: llvmwin64 target: llvmwin64
steps: steps:
@ -654,17 +723,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/mono-installs/llvm-${{ matrix.target }} path: ~/mono-installs/llvm-${{ matrix.target }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-llvm-${{ matrix.target }} key: ${{ runner.os }}-${{ env.MONO_TAG }}-llvm-${{ matrix.target }}
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "::set-env name=MONO_SOURCE_ROOT::$GITHUB_WORKSPACE/mono_sources" echo "::set-env name=MONO_SOURCE_ROOT::$GITHUB_WORKSPACE/mono_sources"
- name: Install Dependencies (Linux) - name: Install Dependencies (Linux)
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'ubuntu-latest' if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: | run: |
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Install Dependencies (Linux Targeting Windows) - name: Install Dependencies (Linux Targeting Windows)
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'ubuntu-latest' && matrix.target == 'llvmwin64' if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.target == 'llvmwin64'
run: | run: |
sudo apt-get -y install mingw-w64 libz-mingw-w64-dev sudo apt-get -y install mingw-w64 libz-mingw-w64-dev
- name: Install Dependencies (macOS) - name: Install Dependencies (macOS)
@ -677,15 +746,18 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' && steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true' && steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
if: steps.cache_llvm.outputs.cache-hit != 'true'
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
if: steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -697,7 +769,7 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true' && steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_llvm.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Make - name: Make
@ -709,6 +781,9 @@ jobs:
with: with:
name: llvm-${{ matrix.target }}-${{ matrix.os }} name: llvm-${{ matrix.target }}-${{ matrix.os }}
path: ~/mono-installs/llvm-${{ matrix.target }} path: ~/mono-installs/llvm-${{ matrix.target }}
- name: Clean Mono
if: steps.cache_llvm.outputs.cache-hit != 'true'
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -718,7 +793,7 @@ jobs:
bcl: bcl:
name: BCL name: BCL
runs-on: ubuntu-latest runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
product: [desktop, desktop-win32, android, ios, wasm] product: [desktop, desktop-win32, android, ios, wasm]
@ -735,15 +810,17 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_SHA }}-mono-sources key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources - name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_SHA }} ref: ${{ env.MONO_TAG }}
submodules: true submodules: true
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -753,7 +830,6 @@ jobs:
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Make Desktop BCL for this Build Platform - name: Make Desktop BCL for this Build Platform
@ -772,6 +848,8 @@ jobs:
with: with:
name: bcl-${{ matrix.product }} name: bcl-${{ matrix.product }}
path: ~/mono-installs-artifacts/bcl-${{ matrix.product }}.zip path: ~/mono-installs-artifacts/bcl-${{ matrix.product }}.zip
- name: Clean Mono
run: pushd ${{ env.MONO_SOURCE_ROOT }} && git reset --hard && git clean -xffd && git submodule foreach --recursive git reset --hard && git submodule foreach --recursive git clean -xffd && git submodule update --init --recursive && popd
- name: Upload config.log After Error - name: Upload config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -780,10 +858,10 @@ jobs:
path: ~/mono-configs/bcl/config.log path: ~/mono-configs/bcl/config.log
create-release: create-release:
if: success() && github.ref == 'refs/heads/release' && github.event_name == 'push' if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/')
needs: [linux, windows, osx, ios, ios-cross, android, android-cross, wasm, bcl] needs: [linux, windows, osx, ios, ios-cross, android, android-cross, wasm, bcl]
name: Create Release name: Create Release
runs-on: ubuntu-latest runs-on: ubuntu-16.04
outputs: outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }} release_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps: steps:
@ -797,11 +875,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: release-${{ steps.short-sha.outputs.sha7 }} tag_name: release-${{ steps.short-sha.outputs.sha7 }}
release_name: Release ${{ steps.short-sha.outputs.sha7 }} release_name: Release ${{ steps.short-sha.outputs.sha7 }} with ${{ env.MONO_TAG }}
body: | body: |
Mono: Mono Version: ${{ env.MONO_TAG }}
- Branch: ${{ env.MONO_BRANCH }}
- Commit: ${{ env.MONO_SHA }}
EMSDK Version: ${{ env.EMSDK_VERSION }} EMSDK Version: ${{ env.EMSDK_VERSION }}
Android Platform: ${{ env.ANDROID_PLATFORM }} Android Platform: ${{ env.ANDROID_PLATFORM }}
@ -811,10 +887,10 @@ jobs:
prerelease: false prerelease: false
upload-release-artifacts: upload-release-artifacts:
if: success() && github.ref == 'refs/heads/release' && github.event_name == 'push' if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/')
needs: create-release needs: create-release
name: Upload Release Artifacts name: Upload Release Artifacts
runs-on: ubuntu-latest runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
artifact_name: [linux-x86, linux-x86_64, windows-x86, windows-x86_64, osx-x86_64, artifact_name: [linux-x86, linux-x86_64, windows-x86, windows-x86_64, osx-x86_64,