iterating on mingw

This commit is contained in:
Serhii Snitsaruk 2024-11-16 22:09:12 +01:00
parent 1ba5a405e7
commit 494f7f1e99
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
2 changed files with 47 additions and 13 deletions

View File

@ -0,0 +1,33 @@
name: Setup MinGW on Ubuntu
inputs:
arch:
required: true
runs:
using: "composite"
steps:
- name: Set up MinGW for x86_64
if: inputs.arch == 'x86_64'
shell: bash
run: |
sudo apt-get install gcc-mingw-w64 g++-mingw-w64-x86-64
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Set up MinGW for x86_32
if: inputs.arch == 'x86_32'
shell: bash
run: |
sudo apt-get install gcc-mingw-w64 g++-mingw-w64-i686
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
- name: Set up LLVM MinGW for arm64
if: inputs.arch == 'arm64'
shell: bash
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240619/llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
tar xf llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
rm -f llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz
mv -f llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64 llvm-mingw

View File

@ -34,13 +34,13 @@ on:
env: env:
SCONS_CACHE_MSVC_CONFIG: true SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: production=yes use_mingw=yes d3d12=yes tests=no verbose=yes warnings=extra werror=yes SCONSFLAGS: production=yes use_mingw=yes verbose=yes warnings=no progress=no
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs: jobs:
windows-builds: windows-builds:
runs-on: "ubuntu-latest" runs-on: "ubuntu-20.04"
name: ${{ matrix.opts.name }} name: ${{ matrix.opts.name }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -188,32 +188,33 @@ jobs:
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. # Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version - uses: ./modules/limboai/.github/actions/init-version
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.x"
architecture: "x64"
- name: Set up Linux toolchain - name: Set up Linux toolchain
uses: ./modules/limboai/.github/actions/setup-linux-toolchain uses: ./modules/limboai/.github/actions/setup-linux-toolchain
with: with:
arch: ${{matrix.opts.arch}} arch: ${{matrix.opts.arch}}
- name: Set up MinGW
uses: ./modules/limboai/.github/actions/setup-mingw-ubuntu
with:
arch: ${{matrix.opts.arch}}
- name: Set up scons cache - name: Set up scons cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
restore-keys: | # restore-keys: |
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
${{env.BIN}}-${{inputs.godot-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}
- name: Compilation - name: Compilation
env: env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ SCONS_CACHE: ${{github.workspace}}/.scons_cache/
SCONSFLAGS_ARM: ${{matrix.opts.arch == 'arm64' && 'use_llvm=yes mingw_prefix=llvm-mingw' || ''}}
run: | run: |
scons -j2 platform=windows target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
scons platform=windows target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} ${{env.SCONSFLAGS_ARM}}
- name: Build .NET assemblies - name: Build .NET assemblies
if: matrix.opts.dotnet && matrix.opts.target == 'editor' if: matrix.opts.dotnet && matrix.opts.target == 'editor'