godot-mono-builds/.github/workflows/build.yml
Rémi Verschelde df330ce0be
CI: Build with Mono 6.12.0.122 (stable)
Upgrades us to the current stable release.
Further work is done in Preview on Apple Silicon support but we'll look into this
after the Godot 3.3 release.
2021-03-27 11:57:02 +01:00

923 lines
39 KiB
YAML

name: Build
on:
push:
branches:
- '**'
- '!release/**'
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
pull_request:
branches:
- '**'
- '!release/**'
paths-ignore:
- '.gitignore'
- 'LICENSE'
- '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:
# Use SHA or tag instead of the branch for caching purposes.
MONO_TAG: mono-6.12.0.122
PYTHON_VERSION: 3.8
# Should match the version that Mono supports.
EMSDK_VERSION: 1.39.9
ANDROID_CMAKE_VERSION: 3.10.2.4988404
# These should be synced with the Godot repo.
# platform/android/java/app/config.gradle
ANDROID_PLATFORM: android-29
ANDROID_API: 18
# platform/iphone/detect.py
IOS_VERSION_MIN: 10.0
jobs:
linux:
name: Linux
runs-on: ubuntu-16.04
strategy:
matrix:
target: [x86, x86_64]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies (x86)
if: matrix.target == 'x86'
run: |
sudo dpkg --add-architecture i386
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 gcc-multilib g++-multilib zlib1g-dev:i386
- name: Install Dependencies (x86_64)
if: matrix.target == 'x86_64'
run: |
sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run:
python3 godot-mono-builds/linux.py configure --target=${{ matrix.target }} -j 2
- name: Make
run:
python3 godot-mono-builds/linux.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/linux-${{ matrix.target }}.zip desktop-linux-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: linux-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: linux-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-linux-${{ matrix.target }}-release/config.log
windows:
name: Windows
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86, x86_64]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies (x86)
if: matrix.target == 'x86'
run: |
sudo dpkg --add-architecture i386
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 mingw-w64
- name: Install Dependencies (x86_64)
if: matrix.target == 'x86_64'
run: |
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 mingw-w64 libz-mingw-w64-dev
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run:
python3 godot-mono-builds/windows.py configure --target=${{ matrix.target }} -j 2
- name: Make
run:
python3 godot-mono-builds/windows.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/windows-${{ matrix.target }}.zip desktop-windows-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: windows-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: windows-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-windows-${{ matrix.target }}-release/config.log
osx:
name: macOS
runs-on: macos-latest
strategy:
matrix:
target: [x86_64]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
brew install autoconf automake libtool pkg-config cmake python3
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run:
python3 godot-mono-builds/osx.py configure --target=${{ matrix.target }} -j 2
- name: Make
run:
python3 godot-mono-builds/osx.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/osx-${{ matrix.target }}.zip desktop-osx-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: osx-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: osx-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-osx-${{ matrix.target }}-release/config.log
ios:
name: iOS
runs-on: macos-latest
strategy:
matrix:
target: [arm64, x86_64]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
brew install autoconf automake libtool pkg-config cmake python3
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run: |
export DISABLE_NO_WEAK_IMPORTS=1
python3 godot-mono-builds/ios.py configure --target=${{ matrix.target }} -j 2 --ios-version-min=${IOS_VERSION_MIN}
- name: Make
run:
python3 godot-mono-builds/ios.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ios-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: ios-${{ matrix.target }}-config.log
path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log
ios-cross:
needs: llvm
name: iOS Cross-compiler
runs-on: macos-latest
strategy:
matrix:
target: [cross-arm64]
include:
- target: cross-arm64
llvm: llvm64
runtime_target: arm64
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
brew install autoconf automake libtool pkg-config cmake python3
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Download LLVM artifact
uses: actions/download-artifact@v2
with:
name: llvm-${{ matrix.llvm }}-macos-latest
# 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
# We have to manually move the folder and restore the file permissions in the next step.
path: ./llvm-${{ matrix.llvm }}
- name: Stamp LLVM
run: |
mkdir -p $HOME/mono-installs/ && mv ./llvm-${{ matrix.llvm }} $HOME/mono-installs/
chmod 755 $HOME/mono-installs/llvm-${{ matrix.llvm }}/bin/*
mkdir -p $HOME/mono-configs/ && touch $HOME/mono-configs/.stamp-${{ matrix.llvm }}-make
- name: Configure Runtime
run: |
export DISABLE_NO_WEAK_IMPORTS=1
python3 godot-mono-builds/ios.py configure --target=${{ matrix.runtime_target }} -j 2
- name: Configure
run: |
export DISABLE_NO_WEAK_IMPORTS=1
python3 godot-mono-builds/ios.py configure --target=${{ matrix.target }} -j 2
- name: Make
run:
python3 godot-mono-builds/ios.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ios-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: ios-${{ matrix.target }}-runtime-config.log
path: ~/mono-configs/ios-${{ matrix.runtime_target }}-release/config.log
- name: Upload Cross config.log After Error
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: ios-${{ matrix.target }}-config.log
path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log
android:
name: Android
runs-on: ubuntu-16.04
strategy:
matrix:
target: [armeabi-v7a, arm64-v8a, x86, x86_64]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
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 snapd
- name: Install Android SDK Manager
run: |
sudo snap install androidsdk
androidsdk "platforms;${ANDROID_PLATFORM}"
androidsdk "ndk-bundle"
androidsdk "cmake;${ANDROID_CMAKE_VERSION}"
echo "ANDROID_SDK_ROOT=$HOME/snap/androidsdk/current/" >> $GITHUB_ENV
echo "ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk-bundle" >> $GITHUB_ENV
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run:
python3 godot-mono-builds/android.py configure --target=${{ matrix.target }} -j 2 --android-api-version=${ANDROID_API} --android-cmake-version=${ANDROID_CMAKE_VERSION}
- name: Make
run:
python3 godot-mono-builds/android.py make --target=${{ matrix.target }} -j 2 --android-api-version=${ANDROID_API} --android-cmake-version=${ANDROID_CMAKE_VERSION}
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/android-${{ matrix.target }}.zip android-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: android-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: android-${{ matrix.target }}-config.log
path: ~/mono-configs/android-${{ matrix.target }}-release/config.log
android-cross:
needs: llvm
name: Android Cross-compiler
runs-on: ${{ matrix.os }}
strategy:
matrix:
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:
- target: cross-arm
llvm: llvm64
runtime_target: armeabi-v7a
os: ubuntu-16.04
- target: cross-arm64
llvm: llvm64
runtime_target: arm64-v8a
os: ubuntu-16.04
- target: cross-x86
llvm: llvm64
runtime_target: x86
os: ubuntu-16.04
- target: cross-x86_64
llvm: llvm64
runtime_target: x86_64
os: ubuntu-16.04
- target: cross-arm-win
llvm: llvmwin64
runtime_target: armeabi-v7a
os: ubuntu-latest
- target: cross-arm64-win
llvm: llvmwin64
runtime_target: arm64-v8a
os: ubuntu-latest
- target: cross-x86-win
llvm: llvmwin64
runtime_target: x86
os: ubuntu-latest
- target: cross-x86_64-win
llvm: llvmwin64
runtime_target: x86_64
os: ubuntu-latest
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Install Dependencies (Targeting Windows)
if: matrix.llvm == 'llvmwin64'
run: |
sudo apt-get -y install mingw-w64 libz-mingw-w64-dev
- name: Install Android SDK Manager
run: |
sudo apt-get -y install snapd
sudo snap install androidsdk
androidsdk "platforms;${ANDROID_PLATFORM}"
androidsdk "ndk-bundle"
androidsdk "cmake;${ANDROID_CMAKE_VERSION}"
echo "ANDROID_SDK_ROOT=$HOME/snap/androidsdk/current/" >> $GITHUB_ENV
echo "ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk-bundle" >> $GITHUB_ENV
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Download LLVM artifact
uses: actions/download-artifact@v2
with:
name: llvm-${{ matrix.llvm }}-${{ matrix.os }}
# 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
# We have to manually move the folder and restore the file permissions in the next step.
path: ./llvm-${{ matrix.llvm }}
- name: Stamp LLVM
run: |
mkdir -p $HOME/mono-installs/ && mv ./llvm-${{ matrix.llvm }} $HOME/mono-installs/
chmod 755 $HOME/mono-installs/llvm-${{ matrix.llvm }}/bin/*
mkdir -p $HOME/mono-configs/ && touch $HOME/mono-configs/.stamp-${{ matrix.llvm }}-make
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure Runtime
run:
python3 godot-mono-builds/android.py configure --target=${{ matrix.runtime_target }} -j 2 --android-api-version=${ANDROID_API} --android-cmake-version=${ANDROID_CMAKE_VERSION}
- name: Configure
run:
python3 godot-mono-builds/android.py configure --target=${{ matrix.target }} -j 2 --android-api-version=${ANDROID_API} --android-cmake-version=${ANDROID_CMAKE_VERSION}
- name: Make
run:
python3 godot-mono-builds/android.py make --target=${{ matrix.target }} -j 2 --android-api-version=${ANDROID_API} --android-cmake-version=${ANDROID_CMAKE_VERSION}
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/android-${{ matrix.target }}.zip android-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: android-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: android-${{ matrix.target }}-runtime-config.log
path: ~/mono-configs/android-${{ matrix.runtime_target }}-release/config.log
- name: Upload Cross config.log After Error
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: android-${{ matrix.target }}-config.log
path: ~/mono-configs/android-${{ matrix.target }}-release/config.log
wasm:
name: WebAssembly
runs-on: ubuntu-latest
strategy:
matrix:
target: [runtime, runtime-threads]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Emscripten SDK
uses: mymindstorm/setup-emsdk@v8
with:
version: ${{ env.EMSDK_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Configure
run:
python3 godot-mono-builds/wasm.py configure --target=${{ matrix.target }} -j 2
- name: Make
run:
python3 godot-mono-builds/wasm.py make --target=${{ matrix.target }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/wasm-${{ matrix.target }}.zip wasm-${{ matrix.target }}-release)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: wasm-${{ matrix.target }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: wasm-${{ matrix.target }}-config.log
path: ~/mono-configs/wasm-${{ matrix.target }}-release/config.log
llvm:
name: LLVM
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-latest, macos-latest]
target: [llvm64, llvmwin64]
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
target: llvmwin64
steps:
- name: Cache LLVM
id: cache_llvm
uses: actions/cache@v2.1.4
with:
path: ~/mono-installs/llvm-${{ matrix.target }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-llvm-${{ matrix.target }}
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies (Linux)
if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: |
sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Install Dependencies (Linux Targeting Windows)
if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.target == 'llvmwin64'
run: |
sudo apt-get -y install mingw-w64 libz-mingw-w64-dev
- name: Install Dependencies (macOS)
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-latest'
run: |
brew install autoconf automake libtool pkg-config cmake python3
- name: Cache Mono Sources
if: steps.cache_llvm.outputs.cache-hit != 'true'
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true' && steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
if: steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
if: steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
if: steps.cache_llvm.outputs.cache-hit != 'true'
run:
python3 godot-mono-builds/patch_mono.py
- name: Make
if: steps.cache_llvm.outputs.cache-hit != 'true'
run:
python3 godot-mono-builds/llvm.py make --target=${{ matrix.target }} -j 2
- name: Upload LLVM Artifact
uses: actions/upload-artifact@v2
with:
name: llvm-${{ matrix.target }}-${{ matrix.os }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: llvm-${{ matrix.target }}-${{ matrix.os }}-config.log
path: ~/mono-configs/llvm-${{ matrix.target }}/config.log
bcl:
name: BCL
runs-on: ubuntu-16.04
strategy:
matrix:
product: [desktop, desktop-win32, android, ios, wasm]
steps:
- name: Set Environment Variables
run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install git autoconf libtool libtool-bin automake build-essential gettext cmake python3 curl
- name: Cache Mono Sources
id: cache_mono_sources
uses: actions/cache@v2.1.4
with:
path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-mono-sources
- name: Checkout Mono Sources
if: steps.cache_mono_sources.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: mono/mono
ref: ${{ env.MONO_TAG }}
submodules: true
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
uses: actions/checkout@v2
with:
path: godot-mono-builds
- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono
run:
python3 godot-mono-builds/patch_mono.py
- name: Make Desktop BCL for this Build Platform
if: matrix.product == 'desktop-win32'
run:
python3 godot-mono-builds/bcl.py make --product=desktop -j 2
- name: Make
run:
python3 godot-mono-builds/bcl.py make --product=${{ matrix.product }} -j 2
- name: Compress Output
run: |
mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/bcl-${{ matrix.product }}.zip ${{ matrix.product }}-bcl)
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: bcl-${{ matrix.product }}
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
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: bcl-${{ matrix.product }}-config.log
path: ~/mono-configs/bcl/config.log
create-release:
if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/')
needs: [linux, windows, osx, ios, ios-cross, android, android-cross, wasm, bcl]
name: Create Release
runs-on: ubuntu-16.04
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Short SHA
id: short-sha
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ steps.short-sha.outputs.sha7 }}
release_name: Release ${{ steps.short-sha.outputs.sha7 }} with ${{ env.MONO_TAG }}
body: |
Mono Version: ${{ env.MONO_TAG }}
EMSDK Version: ${{ env.EMSDK_VERSION }}
Android Platform: ${{ env.ANDROID_PLATFORM }}
Android API: ${{ env.ANDROID_API }}
iOS Min Version: ${{ env.IOS_VERSION_MIN }}
draft: false
prerelease: false
upload-release-artifacts:
if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/')
needs: create-release
name: Upload Release Artifacts
runs-on: ubuntu-16.04
strategy:
matrix:
artifact_name: [linux-x86, linux-x86_64, windows-x86, windows-x86_64, osx-x86_64,
ios-arm64, ios-x86_64, ios-cross-arm64,
android-armeabi-v7a, android-arm64-v8a, android-x86, android-x86_64,
android-cross-arm, android-cross-arm64, android-cross-x86, android-cross-x86_64,
android-cross-arm-win, android-cross-arm64-win, android-cross-x86-win, android-cross-x86_64-win,
wasm-runtime, wasm-runtime-threads,
bcl-desktop, bcl-desktop-win32, bcl-android, bcl-ios, bcl-wasm]
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: ${{ matrix.artifact_name }}
path: ./
- name: Upload linux-x86
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
asset_path: ./${{ matrix.artifact_name }}.zip
asset_name: ${{ matrix.artifact_name }}.zip
asset_content_type: application/zip