Skip to content

Merge branch 'main' into 12.0-development #861

Merge branch 'main' into 12.0-development

Merge branch 'main' into 12.0-development #861

Workflow file for this run

name: continuous-integration
on: [push, pull_request]
jobs:
linux-os:
runs-on: ubuntu-20.04
steps:
- name: Update APT
run: sudo apt-get update
- name: Install Dependencies
run: |
sudo apt-get install --assume-yes build-essential git make cmake autoconf automake \
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev \
libjack-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxfixes-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev \
libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
- name: Checkout love-appimage-source
uses: actions/checkout@v3
with:
repository: love2d/love-appimage-source
ref: 12.x
- name: Checkout LÖVE
uses: actions/checkout@v3
with:
path: love2d-${{ github.sha }}
- name: Get Dependencies for AppImage
shell: python
env:
LOVE_BRANCH: ${{ github.sha }}
run: |
import os
for i in range(250):
if os.system(f"make getdeps LOVE_BRANCH={os.environ['LOVE_BRANCH']}") == 0:
raise SystemExit(0)
raise Exception("make getdeps failed")
- name: Build AppImage
run: make LOVE_BRANCH=${{ github.sha }}
- name: Print LuaJIT branch
run: git -C LuaJIT-v2.1 branch -v
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-linux-x86_64.AppImage
path: love-${{ github.sha }}.AppImage
- name: Artifact Debug Symbols
uses: actions/upload-artifact@v3
with:
name: love-x86_64-AppImage-debug
path: love-${{ github.sha }}.AppImage-debug.tar.gz
windows-os:
runs-on: windows-latest
strategy:
matrix:
platform: [Win32, x64, ARM64]
install: [compat, modern]
exclude:
- platform: ARM64
install: compat
defaults:
run:
shell: cmd
continue-on-error: ${{ matrix.platform == 'ARM64' }}
steps:
- name: Define Variables
id: vars
run: |
rem Compat/Modern switch
if "${{ matrix.install }}" == "compat" (
echo moredef=-DLOVE_INSTALL_UCRT=ON>> "%GITHUB_OUTPUT%"
echo compatname=-compat>> "%GITHUB_OUTPUT%"
) else (
echo moredef=>> "%GITHUB_OUTPUT%"
echo compatname=>> "%GITHUB_OUTPUT%"
)
rem JIT Modules
if "${{ matrix.platform }}-${{ matrix.install }}" == "x64-modern" (
(echo jitmodules=1)>> "%GITHUB_OUTPUT%"
) else (
(echo jitmodules=0)>> "%GITHUB_OUTPUT%"
)
rem Architecture-Specific Switch
goto ${{ matrix.platform }}
exit /b 1
:Win32
(echo arch=x86)>> "%GITHUB_OUTPUT%"
(echo angle=0)>> "%GITHUB_OUTPUT%"
echo nofiles=warn>> "%GITHUB_OUTPUT%"
exit /b 0
:x64
(echo arch=x64)>> "%GITHUB_OUTPUT%"
(echo angle=0)>> "%GITHUB_OUTPUT%"
echo nofiles=warn>> "%GITHUB_OUTPUT%"
exit /b 0
:ARM64
(echo arch=arm64)>> "%GITHUB_OUTPUT%"
(echo angle=1)>> "%GITHUB_OUTPUT%"
echo nofiles=ignore>> "%GITHUB_OUTPUT%"
echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll>> "%GITHUB_OUTPUT%"
exit /b 0
- name: Download Windows SDK Setup 10.0.20348
run: curl -Lo winsdksetup.exe https://go.microsoft.com/fwlink/?linkid=2164145
- name: Install Debugging Tools for Windows
id: windbg
run: |
setlocal enabledelayedexpansion
start /WAIT %CD%\winsdksetup.exe /features OptionId.WindowsDesktopDebuggers /q /log %CD%\log.txt
echo ERRORLEVEL=!ERRORLEVEL! >> %GITHUB_OUTPUT%
- name: Print Debugging Tools Install Log
if: always()
run: |
type log.txt
exit /b ${{ steps.windbg.outputs.ERRORLEVEL }}
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Download source_index.py
run: curl -Lo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py
- name: Clone Megasource
uses: actions/checkout@v3
with:
path: megasource
repository: love2d/megasource
ref: 12.x
- id: megasource
name: Get Megasource Commit SHA
shell: python
run: |
import os
import subprocess
result = subprocess.run("git -C megasource rev-parse HEAD".split(), check=True, capture_output=True, encoding="UTF-8")
commit = result.stdout.split()[0]
with open(os.environ["GITHUB_OUTPUT"], "w", encoding="UTF-8") as f: f.write(f"commit={commit}")
- name: Checkout
uses: actions/checkout@v3
with:
path: megasource/libs/love
- name: Download ANGLE
uses: robinraju/[email protected]
if: steps.vars.outputs.angle == '1'
with:
repository: MikuAuahDark/angle-winbuild
tag: cr_5249
fileName: angle-win-${{ steps.vars.outputs.arch }}.zip
tarBall: false
zipBall: false
out-file-path: angle
- name: Extract ANGLE
if: steps.vars.outputs.angle == '1'
working-directory: angle
run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip
- name: Delete Strawbery Perl
# https://github.com/actions/runner-images/issues/6627
# In particular, this is not pretty, but even CMAKE_IGNORE_PREFIX_PATH
# cannot help in this case. Delete the whole folder!
run: |
rmdir /s /q C:\Strawberry
exit /b 0
- name: Configure
env:
CFLAGS: /Zi
CXXFLAGS: /Zi
LDFLAGS: /DEBUG:FULL /OPT:REF /OPT:ICF
run: cmake -Bbuild -Smegasource -T v142 -A ${{ matrix.platform }} --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }}
- name: Install
run: cmake --build build --target PACKAGE --config Release -j2
- name: Copy LuaJIT lua51.pdb
run: |
copy /Y build\libs\LuaJIT\src\lua51.pdb pdb\Release\lua51.pdb
exit /b 0
- name: Add srcsrv to PATH
run: |
echo C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv>>%GITHUB_PATH%
- name: Embed Source Index into PDBs
run: |
python source_index.py ^
--source %CD%\megasource\libs\love https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }} ^
--source %CD%\megasource https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }} ^
--source %CD%\build\libs\LuaJIT https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }}/libs/LuaJIT ^
pdb\Release\*.pdb
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}
path: |
build/*.zip
build/*.exe
if-no-files-found: ${{ steps.vars.outputs.nofiles }}
- name: Artifact JIT Modules
if: steps.vars.outputs.jitmodules == '1'
uses: actions/upload-artifact@v3
with:
name: love-windows-jitmodules
path: build/libs/LuaJIT/src/jit/*.lua
- name: Artifact PDB
uses: actions/upload-artifact@v3
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
path: pdb/Release/*.pdb
macOS:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone Dependencies
uses: actions/checkout@v3
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: 12.x
- name: Move Dependencies
run:
mv apple-dependencies/macOS/Frameworks platform/xcode/macosx
- name: Build
run:
xcodebuild clean archive -project platform/xcode/love.xcodeproj -scheme love-macosx -configuration Release -archivePath love-macos.xcarchive
- name: Export Archive
run:
xcodebuild -exportArchive -archivePath love-macos.xcarchive -exportPath love-macos -exportOptionsPlist platform/xcode/macosx/macos-copy-app.plist
- name: Zip Archive
run:
ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: love-macos
path: love-macos.zip
iOS-Simulator:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone Dependencies
uses: actions/checkout@v3
with:
path: apple-dependencies
repository: love2d/love-apple-dependencies
ref: 12.x
- name: Move Dependencies
run: |
mv apple-dependencies/iOS/libraries platform/xcode/ios
- name: Build
run:
xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 11'