From 8beca3e4a0748d37daea2d23222a3e289e476afb Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 28 Oct 2024 12:24:07 -0400 Subject: [PATCH] CI: Move to Rocky Linux, upload artifacts --- .github/workflows/ci.yml | 117 ++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04d3aeb..aa9ac9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,64 +4,74 @@ on: [push, pull_request] jobs: linux: - name: Linux + name: Rocky Linux runs-on: ubuntu-latest + container: + image: rockylinux/rockylinux:8 steps: - - uses: actions/checkout@v3 - with: - submodules: true + - name: Are we really on Rocky Linux? + run: cat /etc/os-release - - name: Build - run: make + - name: Install dependencies + run: | + dnf update -y + dnf install -y chrpath gcc git make - macos: - name: macOS - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - name: Build Intel - run: | - CC="cc -arch x86_64" make - mv libtheorafile.dylib libtheorafile_x64.dylib - - - name: Build ARM + - name: Build 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 + make + strip -S libtheorafile.so - name: Archive build result uses: actions/upload-artifact@v4 with: - name: Theorafile-osx - path: libtheorafile.dylib + name: Theorafile-lib64 + path: libtheorafile.so - windows-mingw: - name: Windows (MinGW) - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} + linux-mingw: + name: Rocky Linux (MinGW) + runs-on: ubuntu-latest + container: + image: rockylinux/rockylinux:9 steps: - - uses: actions/checkout@v3 + - 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: Set up MSYS2 - uses: msys2/setup-msys2@v2 + - 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: - msystem: mingw32 - install: >- - mingw-w64-i686-cc - mingw-w64-i686-make + name: Theorafile-x86 + path: x86/libtheorafile.dll - - name: Build - run: mingw32-make + - name: Archive x64 build result + uses: actions/upload-artifact@v4 + with: + name: Theorafile-x64 + path: x64/libtheorafile.dll freebsd: runs-on: ubuntu-latest @@ -80,6 +90,33 @@ jobs: 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 @@ -106,4 +143,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: Theorafile-${{ matrix.sdk }} - path: Xcode/build/Release-${{ matrix.sdk }}/libtheorafile.a \ No newline at end of file + path: Xcode/build/Release-${{ matrix.sdk }}/libtheorafile.a