Adds check and build for MacOS #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check build viability | |
on: [pull_request] | |
jobs: | |
win32: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install build deps | |
run: choco install -y directx-sdk zip --no-progress --yes | |
shell: powershell | |
- name: Download and Extract VCE9 release | |
run: | | |
$url = "https://github.com/djdiskmachine/VCE9/releases/download/v1.0.0/Microsoft.Visual.Studio.9.0.zip" | |
$destination = "C:\Program Files (x86)\" | |
New-Item -ItemType Directory -Force -Path $destination | Out-Null | |
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\VCE9.zip" | |
Expand-Archive -Path "$env:TEMP\VCE9.zip" -DestinationPath $destination -Force | |
shell: pwsh | |
- name: Install Visual Studio 2008 Express | |
run: | | |
Invoke-WebRequest -Uri "http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso" -OutFile "$env:GITHUB_WORKSPACE\VS2008ExpressENUX1397868.iso" | |
$mountResult = Mount-DiskImage -ImagePath "$env:GITHUB_WORKSPACE\VS2008ExpressENUX1397868.iso" -PassThru | |
$driveLetter = ($mountResult | Get-Volume).DriveLetter | |
Write-Host "ISO mounted to drive letter $driveLetter" | |
$driveLetter = (Get-DiskImage -ImagePath "$env:GITHUB_WORKSPACE\VS2008ExpressENUX1397868.iso" | Get-Volume).DriveLetter | |
Start-Process -FilePath "${driveLetter}:\VCExpress\setup.exe" -ArgumentList '/q', '/norestart' -Wait | |
shell: pwsh | |
- name: Build Solution | |
working-directory: projects | |
run: | | |
& "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" | |
& "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe" "lgpt.sln" "Release|Win32" | |
shell: pwsh | |
miyoo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Miyoo Mini toolchain | |
run: | | |
wget -O /tmp/miyoomini-toolchain.tar.xz https://github.com/djdiskmachine/miyoomini-toolchain-buildroot/releases/download/1.0.0/miyoomini-toolchain.tar.xz | |
mkdir /opt/miyoomini-toolchain | |
tar -xvf /tmp/miyoomini-toolchain.tar.xz -C /opt/miyoomini-toolchain --strip-components=1 | |
python -m pip install --upgrade pip | |
pip install Pillow | |
- name: Build Miyoo Mini | |
working-directory: projects | |
run: | | |
make PLATFORM=MIYOO | |
x64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install required libraries | |
run: | | |
python -m pip install --upgrade pip | |
pip install Pillow | |
sudo apt update | |
sudo apt install -y make pkgconf libsdl2-dev libasound2-plugins libjack-dev | |
- name: Build X64 | |
working-directory: projects | |
run: | | |
make PLATFORM=X64 | |
macos: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install required libraries | |
run: | | |
brew install pillow | |
wget https://www.libsdl.org/release/SDL2-2.0.14.dmg | |
hdiutil attach SDL2-2.0.14.dmg | |
sudo cp -R /Volumes/SDL2/SDL2.framework /Library/Frameworks/ | |
- name: Build Xcode project | |
run: | | |
python3 sources/Resources/mkfont.py sources/Resources/original.bmp sources/Resources/font.h | |
xcodebuild -project projects/lgpt64.xcodeproj -scheme LittleGPTracker -configuration Release build | |
cp -R bin/LittleGPTracker.app ./resources/packaging/MACOS/ | |
- name: Package build | |
shell: bash | |
working-directory: projects | |
run: | | |
curl -L -o lgpt-resources.zip https://github.com/djdiskmachine/lgpt-resources/archive/refs/tags/1.0.zip | |
unzip lgpt-resources.zip | |
mv lgpt-resources-1.0/*/ ./resources/packaging | |
rm -rf lgpt-resources* | |
./resources/packaging/lgpt_package.sh |