Skip to content

Add CI/CD for iOS, tvOS, and their simulators #34

Add CI/CD for iOS, tvOS, and their simulators

Add CI/CD for iOS, tvOS, and their simulators #34

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: make
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build Intel
run: |
CC="cc -arch x86_64" make
mv libtheorafile.dylib libtheorafile_x64.dylib
- name: Build ARM
run: |
CC="cc -arch arm64" make
mv libtheorafile.dylib libtheorafile_arm64.dylib
- name: Lipo universal
run: lipo -create -output libtheorafile.dylib libtheorafile_x64.dylib libtheorafile_arm64.dylib
- name: Archive build result
uses: actions/upload-artifact@v4
with:
name: Theorafile-osx
path: libtheorafile.dylib
windows-mingw:
name: Windows (MinGW)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: mingw32
install: >-
mingw-w64-i686-cc
mingw-w64-i686-make
- name: Build
run: mingw32-make
freebsd:
runs-on: ubuntu-latest
name: FreeBSD
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '13.3'
run: |
sudo pkg update
sudo pkg install -y gmake
gmake
ios-tvos:
name: iOS/tvOS
runs-on: macos-latest
strategy:
matrix:
include:
- platform: iOS
sdk: iphoneos
- platform: iOS
sdk: iphonesimulator
- platform: tvOS
sdk: appletvos
- platform: tvOS
sdk: appletvsimulator
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: xcodebuild -project Xcode/theorafile.xcodeproj -target theorafile-${{ matrix.platform }} -config Release -sdk ${{ matrix.sdk }}
- name: Archive build result
uses: actions/upload-artifact@v4
with:
name: Theorafile-${{ matrix.sdk }}
path: Xcode/build/Release-${{ matrix.sdk }}/libtheorafile.a