CI: Move to Rocky Linux, upload artifacts #35
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: CI | |
on: [push, pull_request] | |
jobs: | |
linux: | |
name: Rocky Linux | |
runs-on: ubuntu-latest | |
container: | |
image: rockylinux/rockylinux:8 | |
steps: | |
- name: Are we really on Rocky Linux? | |
run: cat /etc/os-release | |
- name: Install dependencies | |
run: | | |
dnf update -y | |
dnf install -y chrpath gcc git make | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build | |
run: | | |
make | |
strip -S libtheorafile.so | |
- name: Archive build result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Theorafile-lib64 | |
path: libtheorafile.so | |
linux-mingw: | |
name: Rocky Linux (MinGW) | |
runs-on: ubuntu-latest | |
container: | |
image: rockylinux/rockylinux:9 | |
steps: | |
- name: Are we really on Rocky Linux? | |
run: cat /etc/os-release | |
- name: Install dependencies | |
run: | | |
dnf update -y | |
dnf install -y epel-release | |
crb enable | |
dnf install -y git make mingw32-gcc mingw64-gcc | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build | |
run: | | |
mingw32-make | |
mkdir x86 | |
mv libtheorafile.dll x86/ | |
mingw64-make | |
mkdir x64 | |
mv libtheorafile.dll x64/ | |
- name: Archive x86 build result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Theorafile-x86 | |
path: x86/libtheorafile.dll | |
- name: Archive x64 build result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Theorafile-x64 | |
path: x64/libtheorafile.dll | |
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 | |
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 | |
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 |