Compare commits

...

3 Commits

Author SHA1 Message Date
Rémi Verschelde
9fb4d32e35 Merge pull request #92 from godotengine/update-ci
CI: Bump actions, various fixes, update to Mono 6.12.0.206
2025-10-12 13:03:45 +02:00
Rémi Verschelde
945d2619f8 CI: Bump actions, various fixes, update to Mono 6.12.0.206
- Update TuxFamily links for Linux SDKs.
- Downgrade CMake to v3 on macOS, it breaks building old LLVM.
- Fix conflict between LLVM `regex_impl.h` header guard and Xcode SDK.
- Pin `macos-13` as newer ones are arm64-based and our scripts don't seem
  to infer this properly.
- Patch Mono `offsets-tool.py` to support newer Clang (dotnet patches).
2025-10-12 12:14:33 +02:00
Rémi Verschelde
4912f62a8f Revert "Add patch to fix Linux kernel regression with mmap and MAP_32BIT"
This reverts commit d496154ab1.

The Linux kernel regression has been patched in 6.1.30 and 6.3.4.
2023-06-02 15:55:02 +02:00
11 changed files with 406 additions and 173 deletions

View File

@@ -23,17 +23,19 @@ on:
env: env:
# Use SHA or tag instead of the branch for caching purposes. # Use SHA or tag instead of the branch for caching purposes.
MONO_TAG: mono-6.12.0.198 MONO_TAG: mono-6.12.0.206
PYTHON_VERSION: '3.11' PYTHON_VERSION: '3.11'
# Should match the version that Mono supports. # Should match the version that Mono supports.
EMSDK_VERSION: 1.39.9 EMSDK_VERSION: 1.39.9
# platform/iphone/detect.py # platform/iphone/detect.py
IOS_VERSION_MIN: 10.0 IOS_VERSION_MIN: 12.0
# Supporting Xcode 15+ requires backporting a bunch of stuff.
XCODE_VERSION: 14.3.1
jobs: jobs:
linux: linux:
name: Linux name: Linux
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: [x86, x86_64] target: [x86, x86_64]
@@ -49,37 +51,37 @@ jobs:
if: matrix.target == 'x86_64' if: matrix.target == 'x86_64'
run: | run: |
cd /home/runner cd /home/runner
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 curl -LO https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-4/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
cd x86_64-godot-linux-gnu_sdk-buildroot cd x86_64-godot-linux-gnu_sdk-buildroot
./relocate-sdk.sh ./relocate-sdk.sh
cd bin cd bin
rm -f {aclocal*,auto*,libtool*,m4}
for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done
echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/x86_64-godot-linux-gnu/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: Install Linux SDK (x86) - name: Install Linux SDK (x86)
if: matrix.target == 'x86' if: matrix.target == 'x86'
run: | run: |
cd /home/runner cd /home/runner
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 curl -LO https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-4/i686-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf i686-godot-linux-gnu_sdk-buildroot.tar.bz2 tar xf i686-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f i686-godot-linux-gnu_sdk-buildroot.tar.bz2 rm -f i686-godot-linux-gnu_sdk-buildroot.tar.bz2
cd i686-godot-linux-gnu_sdk-buildroot cd i686-godot-linux-gnu_sdk-buildroot
./relocate-sdk.sh ./relocate-sdk.sh
cd bin cd bin
rm -f {aclocal*,auto*,libtool*,m4}
for file in i686-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done for file in i686-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done
echo "PATH=/home/runner/i686-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV echo "PATH=/home/runner/i686-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/i686-godot-linux-gnu_sdk-buildroot/i686-godot-linux-gnu/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -88,11 +90,11 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
@@ -109,7 +111,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts 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) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/linux-${{ matrix.target }}.zip desktop-linux-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -117,14 +119,14 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: linux-${{ matrix.target }}-config.log name: linux-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-linux-${{ matrix.target }}-release/config.log path: ~/mono-configs/desktop-linux-${{ matrix.target }}-release/config.log
windows: windows:
name: Windows name: Windows
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: [x86, x86_64] target: [x86, x86_64]
@@ -147,13 +149,13 @@ jobs:
sudo apt-get -y install mingw-w64 libz-mingw-w64-dev sudo apt-get -y install mingw-w64 libz-mingw-w64-dev
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -162,11 +164,11 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
@@ -183,7 +185,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts 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) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/windows-${{ matrix.target }}.zip desktop-windows-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -191,14 +193,14 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: windows-${{ matrix.target }}-config.log name: windows-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-windows-${{ matrix.target }}-release/config.log path: ~/mono-configs/desktop-windows-${{ matrix.target }}-release/config.log
osx: osx:
name: macOS name: macOS
runs-on: macos-latest runs-on: macos-13
strategy: strategy:
matrix: matrix:
target: [arm64, x86_64] target: [arm64, x86_64]
@@ -206,18 +208,26 @@ jobs:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Setup compatible Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install Dependencies - name: Install Dependencies
run: | run: |
brew install autoconf automake libtool pkg-config cmake python3 brew install automake
- name: Install cmake 3
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.7'
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -226,15 +236,15 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
run: run: |
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
run: run:
@@ -247,7 +257,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts 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) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/osx-${{ matrix.target }}.zip desktop-osx-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -255,14 +265,14 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: osx-${{ matrix.target }}-config.log name: osx-${{ matrix.target }}-config.log
path: ~/mono-configs/desktop-osx-${{ matrix.target }}-release/config.log path: ~/mono-configs/desktop-osx-${{ matrix.target }}-release/config.log
ios: ios:
name: iOS name: iOS
runs-on: macos-latest runs-on: macos-13
strategy: strategy:
matrix: matrix:
target: [arm64, x86_64, arm64-sim] target: [arm64, x86_64, arm64-sim]
@@ -270,18 +280,26 @@ jobs:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Setup compatible Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install Dependencies - name: Install Dependencies
run: | run: |
brew install autoconf automake libtool pkg-config cmake python3 brew install automake
- name: Install cmake 3
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.7'
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -290,15 +308,15 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
run: run: |
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Configure - name: Configure
run: | run: |
@@ -312,7 +330,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -320,15 +338,16 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: ios-${{ matrix.target }}-config.log name: ios-${{ matrix.target }}-config.log
path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log
ios-cross: ios-cross:
# Disable for now as it doesn't build.
needs: llvm needs: llvm
name: iOS Cross-compiler name: iOS Cross-compiler
runs-on: macos-latest runs-on: macos-13
strategy: strategy:
matrix: matrix:
target: [cross-arm64] target: [cross-arm64]
@@ -340,18 +359,26 @@ jobs:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Setup compatible Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install Dependencies - name: Install Dependencies
run: | run: |
brew install autoconf automake libtool pkg-config cmake python3 brew install automake
- name: Install cmake 3
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.7'
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -360,20 +387,20 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
run: run: |
python3 godot-mono-builds/patch_mono.py python3 godot-mono-builds/patch_mono.py
- name: Download LLVM artifact - name: Download LLVM artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v5
with: with:
name: llvm-${{ matrix.llvm }}-macos-latest name: llvm-${{ matrix.llvm }}-macos-13
# 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.
@@ -399,7 +426,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/ios-${{ matrix.target }}.zip ios-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -407,27 +434,26 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: ios-${{ matrix.target }}-runtime-config.log name: ios-${{ matrix.target }}-runtime-config.log
path: ~/mono-configs/ios-${{ matrix.runtime_target }}-release/config.log path: ~/mono-configs/ios-${{ matrix.runtime_target }}-release/config.log
- name: Upload Cross config.log After Error - name: Upload Cross config.log After Error
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: ios-${{ matrix.target }}-config.log name: ios-${{ matrix.target }}-config.log
path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log path: ~/mono-configs/ios-${{ matrix.target }}-release/config.log
android: android:
name: Android name: Android
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: [armv7, arm64v8, x86, x86_64] target: [armv7, arm64v8, x86, x86_64]
steps: steps:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
env
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Install Dependencies - name: Install Dependencies
run: | run: |
@@ -435,13 +461,13 @@ jobs:
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: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -450,11 +476,11 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
@@ -471,7 +497,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/android-${{ matrix.target }}.zip android-${{ matrix.target }}-release) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/android-${{ matrix.target }}.zip android-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -479,14 +505,14 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: android-${{ matrix.target }}-config.log name: android-${{ matrix.target }}-config.log
path: ~/mono-configs/android-${{ matrix.target }}-release/config.log path: ~/mono-configs/android-${{ matrix.target }}-release/config.log
wasm: wasm:
name: WebAssembly name: WebAssembly
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: [runtime, runtime-threads] target: [runtime, runtime-threads]
@@ -500,13 +526,13 @@ jobs:
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: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -515,15 +541,15 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Emscripten SDK - name: Setup Emscripten SDK
uses: mymindstorm/setup-emsdk@v12 uses: mymindstorm/setup-emsdk@v14
with: with:
version: ${{ env.EMSDK_VERSION }} version: ${{ env.EMSDK_VERSION }}
- name: Patch Mono - name: Patch Mono
@@ -540,7 +566,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/wasm-${{ matrix.target }}.zip wasm-${{ matrix.target }}-release) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/wasm-${{ matrix.target }}.zip wasm-${{ matrix.target }}-release)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -548,7 +574,7 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: wasm-${{ matrix.target }}-config.log name: wasm-${{ matrix.target }}-config.log
path: ~/mono-configs/wasm-${{ matrix.target }}-release/config.log path: ~/mono-configs/wasm-${{ matrix.target }}-release/config.log
@@ -558,22 +584,27 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-22.04, macos-13]
target: [llvm64, llvmwin64] target: [llvm64, llvmwin64]
exclude: exclude:
# We already build for Windows on ubuntu-latest # We already build for Windows on ubuntu-22.04
- os: macos-latest - os: macos-13
target: llvmwin64 target: llvmwin64
steps: steps:
- name: Cache LLVM - name: Cache LLVM
id: cache_llvm id: cache_llvm
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ~/mono-installs/llvm-${{ matrix.target }} path: ~/mono-installs/llvm-${{ matrix.target }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-llvm-${{ matrix.target }} key: ${{ runner.os }}-${{ env.MONO_TAG }}-llvm-${{ matrix.target }}
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV echo "MONO_SOURCE_ROOT=$GITHUB_WORKSPACE/mono_sources" >> $GITHUB_ENV
- name: Setup compatible Xcode version
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-13'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Install Dependencies (Linux) - name: Install Dependencies (Linux)
if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux' if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: | run: |
@@ -583,33 +614,38 @@ jobs:
if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux' if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: | run: |
cd /home/runner cd /home/runner
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 curl -LO https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-4/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
cd x86_64-godot-linux-gnu_sdk-buildroot cd x86_64-godot-linux-gnu_sdk-buildroot
./relocate-sdk.sh ./relocate-sdk.sh
cd bin cd bin
rm -f {aclocal*,auto*,libtool*,m4}
for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done
echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/x86_64-godot-linux-gnu/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: Install Dependencies (Linux Targeting Windows) - name: Install Dependencies (Linux Targeting Windows)
if: steps.cache_llvm.outputs.cache-hit != 'true' && runner.os == 'Linux' && 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)
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-latest' if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-13'
run: | run: |
brew install autoconf automake libtool pkg-config cmake python3 brew install automake
- name: Install cmake 3 (macOS)
if: steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-13'
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.7'
- name: Cache Mono Sources - name: Cache Mono Sources
if: steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_llvm.outputs.cache-hit != 'true'
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -620,24 +656,24 @@ jobs:
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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
if: steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_llvm.outputs.cache-hit != 'true'
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
if: 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
if: steps.cache_llvm.outputs.cache-hit != 'true' if: steps.cache_llvm.outputs.cache-hit != 'true'
run: run:
python3 godot-mono-builds/llvm.py make --target=${{ matrix.target }} -j 2 python3 godot-mono-builds/llvm.py make --target=${{ matrix.target }} -j 2
- name: Upload LLVM Artifact - name: Upload LLVM Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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 }}
@@ -646,14 +682,14 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: llvm-${{ matrix.target }}-${{ matrix.os }}-config.log name: llvm-${{ matrix.target }}-${{ matrix.os }}-config.log
path: ~/mono-configs/llvm-${{ matrix.target }}/config.log path: ~/mono-configs/llvm-${{ matrix.target }}/config.log
bcl: bcl:
name: BCL name: BCL
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
product: [desktop, desktop-win32, android, ios, wasm] product: [desktop, desktop-win32, android, ios, wasm]
@@ -668,24 +704,24 @@ jobs:
- name: Install Linux SDK (x86_64) - name: Install Linux SDK (x86_64)
run: | run: |
cd /home/runner cd /home/runner
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 curl -LO https://github.com/godotengine/buildroot/releases/download/godot-2023.08.x-4/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2
cd x86_64-godot-linux-gnu_sdk-buildroot cd x86_64-godot-linux-gnu_sdk-buildroot
./relocate-sdk.sh ./relocate-sdk.sh
cd bin cd bin
rm -f {aclocal*,auto*,libtool*,m4}
for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done for file in x86_64-godot-*; do alias=$(echo $file | sed "s/godot-//"); ln -s $file $alias; done
echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV echo "PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/bin:${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/x86_64-godot-linux-gnu_sdk-buildroot/x86_64-godot-linux-gnu/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: Cache Mono Sources - name: Cache Mono Sources
id: cache_mono_sources id: cache_mono_sources
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.MONO_SOURCE_ROOT }} path: ${{ env.MONO_SOURCE_ROOT }}
key: ${{ runner.os }}-${{ env.MONO_TAG }}-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@v3 uses: actions/checkout@v5
with: with:
repository: mono/mono repository: mono/mono
ref: ${{ env.MONO_TAG }} ref: ${{ env.MONO_TAG }}
@@ -694,11 +730,11 @@ jobs:
- name: Clean Mono - 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 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@v3 uses: actions/checkout@v5
with: with:
path: godot-mono-builds path: godot-mono-builds
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
- name: Patch Mono - name: Patch Mono
@@ -716,7 +752,7 @@ jobs:
mkdir -p $HOME/mono-installs-artifacts mkdir -p $HOME/mono-installs-artifacts
(cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/bcl-${{ matrix.product }}.zip ${{ matrix.product }}-bcl) (cd $HOME/mono-installs && zip -ry $HOME/mono-installs-artifacts/bcl-${{ matrix.product }}.zip ${{ matrix.product }}-bcl)
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
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
@@ -724,7 +760,7 @@ jobs:
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 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@v3 uses: actions/upload-artifact@v4
with: with:
name: bcl-${{ matrix.product }}-config.log name: bcl-${{ matrix.product }}-config.log
path: ~/mono-configs/bcl/config.log path: ~/mono-configs/bcl/config.log
@@ -733,7 +769,7 @@ jobs:
if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/') if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/')
needs: [linux, windows, osx, ios, ios-cross, android, wasm, bcl] needs: [linux, windows, osx, ios, ios-cross, android, wasm, bcl]
name: Create Release name: Create Release
runs-on: ubuntu-latest runs-on: ubuntu-22.04
outputs: outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }} release_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps: steps:
@@ -760,7 +796,7 @@ jobs:
if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/heads/release/') 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-22.04
strategy: strategy:
matrix: matrix:
artifact_name: [linux-x86, linux-x86_64, windows-x86, windows-x86_64, osx-arm64, osx-x86_64, artifact_name: [linux-x86, linux-x86_64, windows-x86, windows-x86_64, osx-arm64, osx-x86_64,
@@ -770,7 +806,7 @@ jobs:
bcl-desktop, bcl-desktop-win32, bcl-android, bcl-ios, bcl-wasm] bcl-desktop, bcl-desktop-win32, bcl-android, bcl-ios, bcl-wasm]
steps: steps:
- name: Download Artifact - name: Download Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v5
with: with:
name: ${{ matrix.artifact_name }} name: ${{ matrix.artifact_name }}
path: ./ path: ./

View File

@@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v5
- name: Lint repo - name: Lint repo
run: | run: |

View File

@@ -9,7 +9,7 @@ This repository contains scripts for building the Mono runtime to use with Godot
The scripts are tested against specific versions of the toolchains used by Godot. The scripts are tested against specific versions of the toolchains used by Godot.
While they may work with other versions, you might have issues applying patches or compiling, so we recommend using the versions below. While they may work with other versions, you might have issues applying patches or compiling, so we recommend using the versions below.
- Mono: 6.12.0.198. - Mono: 6.12.0.206.
- Emscripten: 1.39.9. - Emscripten: 1.39.9.
- Android NDK: 23.2.8568313 - Android NDK: 23.2.8568313

6
bcl.py
View File

@@ -195,16 +195,16 @@ def make_product(opts: BclOpts, product: str):
mkdir_p(monotouch_profile_dir) mkdir_p(monotouch_profile_dir)
android_env_csc_args = [ ios_env_csc_args = [
path_join(this_script_dir, 'files', 'xi.cs'), path_join(this_script_dir, 'files', 'xi.cs'),
'-keyfile:' + path_join(this_script_dir, 'files', 'xi.snk'), '-keyfile:' + path_join(this_script_dir, 'files', 'xi.snk'),
'-out:%s' % path_join(monotouch_profile_dir, 'Xamarin.iOS.dll'), '-out:%s' % path_join(monotouch_profile_dir, 'Xamarin.iOS.dll'),
'-optimize', '-deterministic', '-publicsign', '-target:library', '-optimize', '-deterministic', '-publicsign', '-target:library',
'-nostdlib', '-noconfig', '-langversion:latest' '-nostdlib', '-noconfig', '-langversion:latest'
] ]
android_env_csc_args += ['-r:%s' % path_join(monotouch_profile_dir, r) for r in refs] ios_env_csc_args += ['-r:%s' % path_join(monotouch_profile_dir, r) for r in refs]
run_command('csc', android_env_csc_args) run_command('csc', ios_env_csc_args)
def clean_product(opts: BclOpts, product: str): def clean_product(opts: BclOpts, product: str):

View File

@@ -0,0 +1,21 @@
diff --git a/external/llvm-project/llvm/lib/Support/regex_impl.h b/external/llvm-project/llvm/lib/Support/regex_impl.h
index f8296c9ff75e..45bdb469a0b3 100644
--- a/external/llvm-project/llvm/lib/Support/regex_impl.h
+++ b/external/llvm-project/llvm/lib/Support/regex_impl.h
@@ -35,8 +35,8 @@
* @(#)regex.h 8.1 (Berkeley) 6/2/93
*/
-#ifndef _REGEX_H_
-#define _REGEX_H_
+#ifndef _REGEX_IMPL_H_
+#define _REGEX_IMPL_H_
#include <sys/types.h>
typedef off_t llvm_regoff_t;
@@ -105,4 +105,4 @@ size_t llvm_strlcpy(char *dst, const char *src, size_t siz);
}
#endif
-#endif /* !_REGEX_H_ */
+#endif /* !_REGEX_IMPL_H_ */

View File

@@ -1,47 +0,0 @@
From e019d4ac4735e774d0a3c15bb36d5eb3ebfa3053 Mon Sep 17 00:00:00 2001
From: Raphael Robatsch <raphael-git@tapesoftware.net>
Date: Tue, 9 May 2023 11:55:02 +0200
Subject: [PATCH] Disable mmap(MAP_32BIT) support
mmap(2) with flag MAP_32BIT can erroneously return ENOMEM on recent
kernels. Disable MAP_32BIT support for now.
Reference: https://lore.kernel.org/linux-mm/cb8dc31a-fef2-1d09-f133-e9f7b9f9e77a@sony.com/
Reference: https://lore.kernel.org/all/20230414185919.4175572-1-Liam.Howlett@oracle.com/T/#m00a0ac8a72bf2f26711b7f8cc56612a8ef62c3d0
---
mono/mini/mini-amd64.h | 2 --
mono/utils/mono-codeman.c | 4 ----
2 files changed, 6 deletions(-)
diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h
index a5c03c4877c..536a79ef59d 100644
--- a/mono/mini/mini-amd64.h
+++ b/mono/mini/mini-amd64.h
@@ -390,9 +390,7 @@ typedef struct {
#endif /* !HOST_WIN32 */
-#if !defined(__linux__)
#define MONO_ARCH_NOMAP32BIT 1
-#endif
#ifdef TARGET_WIN32
#define MONO_AMD64_ARG_REG1 AMD64_RCX
diff --git a/mono/utils/mono-codeman.c b/mono/utils/mono-codeman.c
index 234aac4b0ca..5eccda92bd0 100644
--- a/mono/utils/mono-codeman.c
+++ b/mono/utils/mono-codeman.c
@@ -68,11 +68,7 @@ static const MonoCodeManagerCallbacks *code_manager_callbacks;
#define MAX_WASTAGE 32
#define MIN_BSIZE 32
-#ifdef __x86_64__
-#define ARCH_MAP_FLAGS MONO_MMAP_32BIT
-#else
#define ARCH_MAP_FLAGS 0
-#endif
#define MONO_PROT_RWX (MONO_MMAP_READ|MONO_MMAP_WRITE|MONO_MMAP_EXEC|MONO_MMAP_JIT)
--
2.40.1

View File

@@ -0,0 +1,32 @@
Extracted from https://github.com/dotnet/runtime/commit/087651ee0c2e315f7fe1cbecab5f507af364ab5c
--
diff --git a/mono/tools/offsets-tool/offsets-tool.py b/mono/tools/offsets-tool/offsets-tool.py
index adf7eb4b..46214429 100644
--- a/mono/tools/offsets-tool/offsets-tool.py
+++ b/mono/tools/offsets-tool/offsets-tool.py
@@ -303,8 +303,11 @@ class OffsetsTool:
if type.size == -1:
continue
f.write ("DECL_SIZE2(%s,%s)\n" % (type.name, type.size))
+ done_fields = {}
for field in type.fields:
- f.write ("DECL_OFFSET2(%s,%s,%s)\n" % (type.name, field.name, field.offset))
+ if field.name not in done_fields:
+ f.write ("DECL_OFFSET2(%s,%s,%s)\n" % (type.name, field.name, field.offset))
+ done_fields [field.name] = field.name
f.write ("#endif //disable metadata check\n")
f.write ("#ifndef DISABLE_JIT_OFFSETS\n")
@@ -314,8 +317,11 @@ class OffsetsTool:
if type.size == -1:
continue
f.write ("DECL_SIZE2(%s,%s)\n" % (type.name, type.size))
+ done_fields = {}
for field in type.fields:
- f.write ("DECL_OFFSET2(%s,%s,%s)\n" % (type.name, field.name, field.offset))
+ if field.name not in done_fields:
+ f.write ("DECL_OFFSET2(%s,%s,%s)\n" % (type.name, field.name, field.offset))
+ done_fields [field.name] = field.name
f.write ("#endif //disable jit check\n")
f.write ("#endif //cross compiler checks\n")

View File

@@ -1,22 +0,0 @@
diff --git a/tools/offsets-tool-py/offsets-tool.py b/tools/offsets-tool-py/offsets-tool.py
index 536206aa5c9..04e515f13f2 100644
--- a/tools/offsets-tool-py/offsets-tool.py
+++ b/tools/offsets-tool-py/offsets-tool.py
@@ -61,6 +61,7 @@ class OffsetsTool:
parser.add_argument ('--targetdir', dest='target_path', help='path to mono tree configured for target', required=True)
parser.add_argument ('--abi=', dest='abi', help='ABI triple to generate', required=True)
parser.add_argument ('--sysroot=', dest='sysroot', help='path to sysroot headers of target')
+ parser.add_argument ('--extra-cflag=', dest='extra_cflags', action='append', help='extra flags for clang')
args = parser.parse_args ()
if not args.libclang or not os.path.isfile (args.libclang):
@@ -78,6 +79,9 @@ class OffsetsTool:
self.target_args = []
android_api_level = "-D__ANDROID_API=21"
+ if args.extra_cflags:
+ self.target_args += args.extra_cflags
+
if "wasm" in args.abi:
require_emscipten_path (args)
self.sys_includes = [args.emscripten_path + "/system/include/libc"]

View File

@@ -0,0 +1,215 @@
From 63e677701d35c7e2dad4fe74a84eb935cd396155 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= <alex.koeplinger@outlook.com>
Date: Mon, 15 May 2023 20:46:12 +0200
Subject: [PATCH] [mono] Update offsets-tool python clang binding so it works
with newer clang (#86256)
They introduced a breaking change to CursorKind.TRANSLATION_UNIT in https://github.com/llvm/llvm-project/commit/bb83f8e70bd1d56152f02307adacd718cd67e312, which means we hit an issue when using the binding against a newer clang. Update the binding to the latest upstream and add a tweak so it still works with older clang versions.
---
mono/tools/offsets-tool/clang/cindex.py | 137 +++++++++++++++++-
1 file changed, 135 insertions(+), 2 deletions(-)
diff --git a/mono/tools/offsets-tool/clang/cindex.py b/mono/tools/offsets-tool/clang/cindex.py
index 44c6f49096f495..0ed1c199ba44dd 100644
--- a/mono/tools/offsets-tool/clang/cindex.py
+++ b/mono/tools/offsets-tool/clang/cindex.py
@@ -286,6 +286,11 @@ def offset(self):
"""Get the file offset represented by this source location."""
return self._get_instantiation()[3]
+ #@property
+ #def is_in_system_header(self):
+ # """Returns true if the given source location is in a system header."""
+ # return conf.lib.clang_Location_isInSystemHeader(self)
+
def __eq__(self, other):
return conf.lib.clang_equalLocations(self, other)
@@ -646,6 +651,11 @@ def name(self):
@classmethod
def from_id(cls, id):
+ if cls == CursorKind and id == 300:
+ # --- DOTNET change ---
+ # The id of CursorKind.TRANSLATION_UNIT changed in https://github.com/llvm/llvm-project/commit/bb83f8e70bd1d56152f02307adacd718cd67e312,
+ # add mapping from the old to the new value so using the binding with an older clang still works.
+ return cls._kinds[350]
if id >= len(cls._kinds) or cls._kinds[id] is None:
raise ValueError('Unknown template argument kind %d' % id)
return cls._kinds[id]
@@ -1152,7 +1162,7 @@ def __repr__(self):
# Objective-C's @synchronized statement.
CursorKind.OBJC_AT_SYNCHRONIZED_STMT = CursorKind(220)
-# Objective-C's autorealease pool statement.
+# Objective-C's autorelease pool statement.
CursorKind.OBJC_AUTORELEASE_POOL_STMT = CursorKind(221)
# Objective-C's for collection statement.
@@ -1312,7 +1322,7 @@ def __repr__(self):
#
# The translation unit cursor exists primarily to act as the root cursor for
# traversing the contents of a translation unit.
-CursorKind.TRANSLATION_UNIT = CursorKind(300)
+CursorKind.TRANSLATION_UNIT = CursorKind(350)
###
# Attributes
@@ -1473,6 +1483,107 @@ def is_default_method(self):
"""
return conf.lib.clang_CXXMethod_isDefaulted(self)
+ #def is_deleted_method(self):
+ # """Returns True if the cursor refers to a C++ member function or member
+ # function template that is declared '= delete'.
+ # """
+ # return conf.lib.clang_CXXMethod_isDeleted(self)
+
+ #def is_copy_assignment_operator_method(self):
+ # """Returnrs True if the cursor refers to a copy-assignment operator.
+
+ # A copy-assignment operator `X::operator=` is a non-static,
+ # non-template member function of _class_ `X` with exactly one
+ # parameter of type `X`, `X&`, `const X&`, `volatile X&` or `const
+ # volatile X&`.
+
+
+ # That is, for example, the `operator=` in:
+
+ # class Foo {
+ # bool operator=(const volatile Foo&);
+ # };
+
+ # Is a copy-assignment operator, while the `operator=` in:
+
+ # class Bar {
+ # bool operator=(const int&);
+ # };
+
+ # Is not.
+ # """
+ # return conf.lib.clang_CXXMethod_isCopyAssignmentOperator(self)
+
+ #def is_move_assignment_operator_method(self):
+ # """Returnrs True if the cursor refers to a move-assignment operator.
+
+ # A move-assignment operator `X::operator=` is a non-static,
+ # non-template member function of _class_ `X` with exactly one
+ # parameter of type `X&&`, `const X&&`, `volatile X&&` or `const
+ # volatile X&&`.
+
+
+ # That is, for example, the `operator=` in:
+
+ # class Foo {
+ # bool operator=(const volatile Foo&&);
+ # };
+
+ # Is a move-assignment operator, while the `operator=` in:
+
+ # class Bar {
+ # bool operator=(const int&&);
+ # };
+
+ # Is not.
+ # """
+ # return conf.lib.clang_CXXMethod_isMoveAssignmentOperator(self)
+
+ #def is_explicit_method(self):
+ # """Determines if a C++ constructor or conversion function is
+ # explicit, returning 1 if such is the case and 0 otherwise.
+
+ # Constructors or conversion functions are declared explicit through
+ # the use of the explicit specifier.
+
+ # For example, the following constructor and conversion function are
+ # not explicit as they lack the explicit specifier:
+
+ # class Foo {
+ # Foo();
+ # operator int();
+ # };
+
+ # While the following constructor and conversion function are
+ # explicit as they are declared with the explicit specifier.
+
+ # class Foo {
+ # explicit Foo();
+ # explicit operator int();
+ # };
+
+ # This method will return 0 when given a cursor pointing to one of
+ # the former declarations and it will return 1 for a cursor pointing
+ # to the latter declarations.
+
+ # The explicit specifier allows the user to specify a
+ # conditional compile-time expression whose value decides
+ # whether the marked element is explicit or not.
+
+ # For example:
+
+ # constexpr bool foo(int i) { return i % 2 == 0; }
+
+ # class Foo {
+ # explicit(foo(1)) Foo();
+ # explicit(foo(2)) operator int();
+ # }
+
+ # This method will return 0 for the constructor and 1 for
+ # the conversion function.
+ # """
+ # return conf.lib.clang_CXXMethod_isExplicit(self)
+
def is_mutable_field(self):
"""Returns True if the cursor refers to a C++ field that is declared
'mutable'.
@@ -2059,6 +2170,7 @@ def __repr__(self):
TypeKind.OBJCSEL = TypeKind(29)
TypeKind.FLOAT128 = TypeKind(30)
TypeKind.HALF = TypeKind(31)
+TypeKind.IBM128 = TypeKind(40)
TypeKind.COMPLEX = TypeKind(100)
TypeKind.POINTER = TypeKind(101)
TypeKind.BLOCKPOINTER = TypeKind(102)
@@ -2122,6 +2234,7 @@ def __repr__(self):
TypeKind.OCLRESERVEID = TypeKind(160)
TypeKind.EXTVECTOR = TypeKind(176)
+TypeKind.ATOMIC = TypeKind(177)
class RefQualifierKind(BaseEnumeration):
"""Describes a specific ref-qualifier of a type."""
@@ -3424,6 +3537,22 @@ def cursor(self):
[Cursor],
bool),
+ #("clang_CXXMethod_isDeleted",
+ # [Cursor],
+ # bool),
+
+ #("clang_CXXMethod_isCopyAssignmentOperator",
+ # [Cursor],
+ # bool),
+
+ #("clang_CXXMethod_isMoveAssignmentOperator",
+ # [Cursor],
+ # bool),
+
+ #("clang_CXXMethod_isExplicit",
+ # [Cursor],
+ # bool),
+
("clang_CXXMethod_isPureVirtual",
[Cursor],
bool),
@@ -4012,6 +4141,10 @@ def cursor(self):
[Cursor],
c_longlong),
+ #("clang_Location_isInSystemHeader",
+ # [SourceLocation],
+ # bool),
+
("clang_Type_getAlignOf",
[Type],
c_longlong),

View File

@@ -34,14 +34,12 @@ def main(raw_args):
'wasm_m2n_trampolines_hook.diff', 'wasm_m2n_trampolines_hook.diff',
'btls-cmake-args-linux-mingw.diff', 'btls-cmake-args-linux-mingw.diff',
'btls-cmake-arm64.diff', 'btls-cmake-arm64.diff',
'mono-linux-disable-mmap-MAP_32BIT.diff', 'llvm-osx-regex-conflict.diff',
'offsets-tool-extra-cflags.diff',
'offsets-tool-newer-clang.diff',
'offsets-tool-duplicate-fields.diff',
] ]
if os.path.isfile(os.path.join(mono_source_root, 'mono/tools/offsets-tool/offsets-tool.py')):
patches += ['offsets-tool-extra-cflags_new.diff']
else:
patches += ['offsets-tool-extra-cflags_old.diff']
from subprocess import Popen from subprocess import Popen
from sys import exit from sys import exit
for patch in patches: for patch in patches: