Skip to content

Fix iOS CI (#53)

Fix iOS CI (#53) #1180

Workflow file for this run

name: CI
on:
push:
branches: [ main, hd, dev ]
pull_request:
branches: [ main, hd, dev ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-switch:
name: 'Nintendo Switch'
runs-on: ubuntu-latest
container: devkitpro/devkita64:20230507
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build
run: |
cd ./cpymo-backends/sdl2
make -j -f Makefile.Switch
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Nintendo Switch
path: ./cpymo-backends/sdl2/cpymo.nro
build-3ds:
name: 'Nintendo 3DS'
runs-on: ubuntu-latest
container: devkitpro/devkitarm:latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Makerom
run: |
cd ./cpymo-backends/3ds
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.17/makerom-v0.17-ubuntu_x86_64.zip
unzip makerom-v0.17-ubuntu_x86_64.zip -d .
chmod +x makerom
- name: Build FFmpeg
run: |
cd ./cpymo-backends/3ds
chmod +x ./build-3ds-ffmpeg.sh
./build-3ds-ffmpeg.sh
- name: Build
run: |
cd ./cpymo-backends/3ds
make -j
$DEVKITARM/bin/arm-none-eabi-strip ./build/cpymo.elf
./makerom -f cia -o cpymo.cia -elf ./build/cpymo.elf -rsf cpymo.rsf -exefslogo -target t -icon icon -banner banner
- name: Upload cia
uses: actions/[email protected]
with:
name: CPyMO for Nintendo 3DS (cia)
path: ./cpymo-backends/3ds/cpymo.cia
- name: Upload 3dsx
uses: actions/[email protected]
with:
name: CPyMO for Nintendo 3DS (3dsx)
path: ./cpymo-backends/3ds/cpymo.3dsx
build-wii:
name: 'Nintendo Wii'
runs-on: ubuntu-latest
container: devkitpro/devkitppc:20230110
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: 'Build'
run: |
cd cpymo-backends/sdl1
make -f Makefile.Wii -j
mv wii-meta.xml meta.xml
mv wii-icon.png icon.png
- name: 'Upload'
uses: actions/[email protected]
with:
name: CPyMO for Nintendo Wii
path: |
./cpymo-backends/sdl1/boot.dol
./cpymo-backends/sdl1/icon.png
./cpymo-backends/sdl1/meta.xml
build-psv:
name: 'Sony PSV'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Dependents
run: |
git clone https://github.com/vitasdk/vdpm.git --depth 1
cd vdpm
export VITASDK=~/vitasdk
export PATH=$VITASDK/bin:$PATH
./bootstrap-vitasdk.sh
./vdpm sdl2
./vdpm sdl2_mixer
./vdpm flac
./vdpm libmodplug
./vdpm mpg123
./vdpm libogg
./vdpm libvorbis
./vdpm libmikmod
./vdpm opus
./vdpm opusfile
./vdpm libxmp
# cd ../cpymo-backends/sdl2
# chmod +x ./build-psv-ffmpeg.sh
# ./build-psv-ffmpeg.sh
# cd ../../
- name: Build
run: |
export VITASDK=~/vitasdk
export PATH=$VITASDK/bin:$PATH
cd cpymo-backends/sdl2
make -f Makefile.PSV -j
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Sony PSV
path: |
./cpymo-backends/sdl2/cpymo.vpk
build-psp:
name: 'Sony PSP'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Setup Ninja
uses: ashutoshvarma/[email protected]
- name: Install PSPDEV
run: |
git clone https://github.com/pspdev/pspdev.git --depth 1
cd pspdev
sudo ./prepare.sh
export PSPDEV=/usr/local/pspdev
sudo mkdir -p $PSPDEV
sudo chown -R $USER: $PSPDEV
export PATH=$PATH:$PSPDEV/bin
./build-all.sh
psp-pacman -Syu
- name: Build FFmpeg
run: |
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
cd ./cpymo-backends/sdl2
chmod +x ./build-psp-ffmpeg.sh
./build-psp-ffmpeg.sh
- name: Build
run: |
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
psp-pacman -S sdl2 sdl2-image freetype2 sdl2-ttf --noconfirm
cd ./cpymo-backends/sdl2
make -f Makefile.PSP -j
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Sony PSP
path: ./cpymo-backends/sdl2/EBOOT.PBP
build-wasm:
name: 'Emscripten'
runs-on: ubuntu-latest
container: emscripten/emsdk:latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build FFmpeg
run: |
cd cpymo-backends/sdl2
chmod +x ./build-emscripten-ffmpeg.sh
./build-emscripten-ffmpeg.sh
- name: Build
run: |
cd cpymo-backends/sdl2
export AUDIO_BACKEND=ffmpeg
make -f Makefile.Emscripten -j
build-ios:
name: 'iOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build FFmpeg
shell: bash
working-directory: ./cpymo-backends/ios/FFmpeg-iOS-build-script
run: |
chmod +x ./build-ffmpeg.sh
./build-ffmpeg.sh arm64
- name: Configure CMake
shell: bash
working-directory: ./cpymo-backends/ios
run: cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=./ios-cmake/ios.toolchain.cmake -DENABLE_BITCODE=0 -DPLATFORM=OS64
- name: Build IPA
shell: bash
working-directory: ./cpymo-backends/ios
run: |
cmake --build build -j $(sysctl -n hw.physicalcpu) --config Release
cd ./build
mkdir Payload
mv cpymo.app Payload/
zip -r cpymo.ipa Payload
mv ./cpymo.ipa ../../../cpymo.ipa
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for iOS
path: ./cpymo.ipa
build-android:
name: 'Android'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
- name: Build FFmpeg
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
export ANDROID_SDK_HOME=$ANDROID_HOME
cd cpymo-backends/android/
chmod +x ./build-android-ffmpeg.sh
./build-android-ffmpeg.sh
- name: Build APK
run: |
cd ./cpymo-backends/android
./gradlew assembleRelease --stacktrace
cp ./app/build/outputs/apk/release/app-release.apk ../../cpymo-signed.apk
- name: Build APK (Accessibility)
run: |
cd ./cpymo-backends/android
./gradlew assembleRelease --stacktrace
cp ./app/build/outputs/apk/release/app-release.apk ../../cpymo-accessibility-signed.apk
env:
ENABLE_TEXT_EXTRACT: 1
ENABLE_TEXT_EXTRACT_ANDROID_ACCESSIBILITY: 1
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Android
path: |
./cpymo-signed.apk
- name: Upload (Accessibility)
uses: actions/[email protected]
with:
name: CPyMO for Android (Accessibility)
path: |
./cpymo-accessibility-signed.apk
build-uwp:
name: 'Universal Windows Platform'
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Find Visual Studio
uses: ilammy/msvc-dev-cmd@v1
- name: Set up NASM
uses: ilammy/[email protected]
- name: Donwload vcpkg
run: git clone --depth 1 --branch master -- https://github.com/microsoft/vcpkg
- name: Bootstrap vcpkg
run: |
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg integrate install
- name: Install FFmpeg
run: |
./vcpkg/vcpkg install ffmpeg:x86-uwp ffmpeg:x64-uwp ffmpeg:arm-uwp ffmpeg:arm64-uwp
- name: Build
run: |
pushd cpymo-backends/uwp
msbuild -m -p:UapAppxPackageBuildMode=SideLoadOnly -p:AppxBundlePlatforms="x86|x64|arm|arm64" -p:AppxPackageSigningEnabled=true -p:Configuration=Release -p:PackageCertificateKeyFile=cert.pfx -p:PackageCertificatePassword="123456" CPyMO.vcxproj
popd
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Universal Windows Platform
path: ./cpymo-backends/uwp/AppPackages/CPyMO/
build-SDL1-windows:
name: 'Windows (SDL 1.2)'
runs-on: 'windows-latest'
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-toolchain unzip
- name: 'Build'
run: |
wget https://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.12-VC.zip
tar -xf SDL-devel-1.2.15-mingw32.tar.gz
unzip SDL_mixer-devel-1.2.12-VC.zip
cp SDL_mixer-1.2.12/include/SDL_mixer.h SDL-1.2.15/include/SDL/SDL_mixer.h
cp SDL_mixer-1.2.12/lib/x86/SDL_mixer.lib SDL-1.2.15/lib/SDL_mixer.lib
cp SDL-1.2.15/bin/SDL.dll cpymo-backends/sdl1/SDL.dll
cp SDL_mixer-1.2.12/lib/x86/*.dll cpymo-backends/sdl1
cp SDL_mixer-1.2.12/lib/x86/*.txt cpymo-backends/sdl1
cd ./cpymo-backends/sdl1
export SDL=../../SDL-1.2.15
export USE_SDL_MIXER=1
mingw32-make -j
strip cpymo.exe
wget https://raw.githubusercontent.com/libsdl-org/SDL_mixer/SDL-1.2/COPYING
mv COPYING COPYING.SDL_mixer.txt
wget https://raw.githubusercontent.com/libsdl-org/SDL-1.2/main/COPYING
mv COPYING COPYING.SDL.txt
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Windows (SDL 1.2)
path: |
./cpymo-backends/sdl1/*.exe
./cpymo-backends/sdl1/*.dll
./cpymo-backends/sdl1/*.txt
build-SDL1-linux:
name: 'Linux (SDL 1.2)'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install dependents
run: |
sudo apt-get update
sudo apt-get install libsdl1.2-dev libsdl-mixer1.2-dev # libavcodec-dev libswscale-dev libavformat-dev libswresample-dev libavutil-dev
- name: Build
run: |
cd cpymo-backends/sdl1
export USE_SDL_MIXER=1
make -j
strip ./cpymo
- name: Upload
uses: actions/[email protected]
with:
name: CPyMO for Linux (SDL 1.2)
path: ./cpymo-backends/sdl1/cpymo
build-desktop:
name: 'Desktop'
runs-on: ${{ matrix.os }}
strategy:
matrix:
tuple: [ mac-x64, mac-arm64, linux-x64, win-x86, win-x64, win-arm64 ] #, win-arm ]
include:
- tuple: win-x64
os: windows-latest
triplet: x64-windows-static
arch: x64
package-name: "Windows x64"
cmake-flags: "-A x64 -DCMAKE_GENERATOR_PLATFORM=x64"
vcpkg-path: "D:/a/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
- tuple: win-x86
os: windows-latest
triplet: x86-windows-static
arch: x86
package-name: "Windows x86"
cmake-flags: "-A Win32 -DCMAKE_GENERATOR_PLATFORM=Win32"
vcpkg-path: "D:/a/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
# - tuple: win-arm
# os: windows-latest
# triplet: arm-windows-static
# arch: amd64_arm
# package-name: "Windows ARM"
# cmake-flags: "-A arm -DCMAKE_GENERATOR_PLATFORM=arm"
# vcpkg-path: "D:/a/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
- tuple: win-arm64
os: windows-latest
triplet: arm64-windows-static
arch: amd64_arm64
package-name: "Windows ARM64"
cmake-flags: "-A arm64 -DCMAKE_GENERATOR_PLATFORM=arm64"
vcpkg-path: "D:/a/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
- tuple: linux-x64
os: ubuntu-latest
triplet: x64-linux
package-name: "Linux x64"
vcpkg-path: "/home/runner/work/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
- tuple: mac-x64
os: macos-latest
triplet: x64-osx
package-name: "macOS x64"
cmake-flags: "-DCMAKE_OSX_ARCHITECTURES=x86_64"
vcpkg-path: "/Users/runner/work/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
- tuple: mac-arm64
os: macos-latest
triplet: arm64-osx
package-name: "macOS Apple Silicon"
cmake-flags: "-DCMAKE_OSX_ARCHITECTURES=arm64"
vcpkg-path: "/Users/runner/work/CPyMO/CPyMO/vcpkg/scripts/buildsystems/vcpkg.cmake"
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' }}
with:
arch: ${{ matrix.arch }}
- name: Set up NASM
uses: ilammy/[email protected]
if: ${{ runner.os != 'Windows' }}
- name: Setup pkg-config
if: ${{ runner.os == 'macOS' }}
run: brew install pkg-config
- name: Donwload vcpkg
run: git clone --depth 1 --branch master -- https://github.com/microsoft/vcpkg
- name: Bootstrap vcpkg
run: |
mkdir -p ~/.vcpkg
touch ~/.vcpkg/vcpkg.path.txt
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg integrate install
if: ${{ runner.os != 'Windows' }}
- name: Bootstrap vcpkg (Windows)
run: |
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg integrate install
if: ${{ runner.os == 'Windows' }}
- name: Install SDL2
run: ./vcpkg/vcpkg install sdl2:${{ matrix.triplet }}
- name: Install FFMPEG
run: ./vcpkg/vcpkg install ffmpeg:${{ matrix.triplet }}
- name: Configure CMake
run: cmake "-DCMAKE_TOOLCHAIN_FILE=${{ matrix.vcpkg-path }}" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmake-flags }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Strip
if: ${{ runner.os != 'Windows' }}
run: |
strip ./build/build/cpymo
strip ./build/build/cpymo-tool
- name: Upload
uses: actions/[email protected]
if: ${{ runner.os != 'Windows' }}
with:
name: CPyMO for ${{ matrix.package-name }}
path: |
./build/build/cpymo
./build/build/cpymo-tool
./build/build/MinSizeRel/cpymo.exe
./build/build/MinSizeRel/cpymo-tool.exe
- name: Upload
uses: actions/[email protected]
if: ${{ runner.os == 'Windows' }}
with:
name: CPyMO for ${{ matrix.package-name }}
path: |
./build/build/Release/cpymo.exe
./build/build/Release/cpymo-tool.exe
build-ascii-art:
name: 'CPyMO ASCII Art'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' }}
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-toolchain make
- name: 'Build'
if: ${{ runner.os != 'Windows' }}
run: |
cd cpymo-backends/ascii-art/
make -j
strip ./cpymo-ascii-art
- name: 'Build (Windows)'
shell: msys2 {0}
if: ${{ runner.os == 'Windows' }}
run: |
cd cpymo-backends/ascii-art/
make -j
strip ./cpymo-ascii-art.exe
- name: 'Upload'
uses: actions/[email protected]
with:
name: CPyMO ASCII Art for ${{ runner.os }}
path: |
./cpymo-backends/ascii-art/cpymo-ascii-art
./cpymo-backends/ascii-art/cpymo-ascii-art.exe
build-text:
name: 'CPyMO Text'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' }}
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-toolchain make
- name: 'Build'
if: ${{ runner.os != 'Windows' }}
run: |
cd cpymo-backends/text/
make -j
strip cpymo-text
- name: 'Build (Windows)'
shell: msys2 {0}
if: ${{ runner.os == 'Windows' }}
run: |
cd cpymo-backends/text/
make -j
strip cpymo-text.exe
- name: 'Upload'
uses: actions/[email protected]
with:
name: CPyMO Text for ${{ runner.os }}
path: |
./cpymo-backends/text/cpymo-text
./cpymo-backends/text/cpymo-text.exe