From 7c00fe0cca820e33537e933541bff20f1dfdfa6e Mon Sep 17 00:00:00 2001 From: LekKit <50500857+LekKit@users.noreply.github.com> Date: Tue, 19 Nov 2024 01:15:55 +0200 Subject: [PATCH] CI: Add MacOS M1 builder, don't use brew - Rename runners to signify the architecture - Add macos-arm64-build runner - Download upstream SDL2 headers, lib is not needed since we're dynamically linking at runtime - Bump all runners to latest --- .github/workflows/build.yml | 69 ++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e04f5d5b..9c68f4b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,8 +13,8 @@ env: CFLAGS: -Werror jobs: - linux-build: - runs-on: ubuntu-24.04 + linux-x86_64-build: + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -34,8 +34,8 @@ jobs: release.linux.x86_64/librvvm.so release.linux.x86_64/librvvm_static.a - win32-build: - runs-on: ubuntu-24.04 + win32-x86_64-build: + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -53,21 +53,48 @@ jobs: release.windows.x86_64/librvvm.dll release.windows.x86_64/librvvm_static.a - macos-build: - runs-on: macos-12 + macos-arm64-build: + runs-on: macos-latest + env: + SDL2_TAR_LINK: https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz + SDL2_NAME: SDL2-2.30.9 + CFLAGS: -target arm64-apple-macos11 -Werror -ISDL2-2.30.9/include steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Install SDL - run: brew install sdl12-compat - - name: Build - run: make lib all - - name: Upload Artifacts - uses: actions/upload-artifact@v4.3.1 - with: - retention-days: 5 - name: rvvm_macos_x86_64 - path: | - release.darwin.x86_64/rvvm_x86_64 - release.darwin.x86_64/librvvm.dylib - release.darwin.x86_64/librvvm_static.a + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Download SDL2 headers + run: wget ${{env.SDL2_TAR_LINK}} -O - | tar -xzf - && mv ${{env.SDL2_NAME}}/include src/SDL2 + - name: Build + run: make lib all + - name: Upload Artifacts + uses: actions/upload-artifact@v4.3.1 + with: + retention-days: 5 + name: rvvm_macos_arm64 + path: | + release.darwin.arm64/rvvm_arm64 + release.darwin.arm64/librvvm.dylib + release.darwin.arm64/librvvm_static.a + + macos-x86_64-build: + runs-on: macos-latest + env: + SDL2_TAR_LINK: https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz + SDL2_NAME: SDL2-2.30.9 + CFLAGS: -target x86_64-apple-macos10.12 -Werror -ISDL2-2.30.9/include + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Download SDL2 headers + run: wget ${{env.SDL2_TAR_LINK}} -O - | tar -xzf - && mv ${{env.SDL2_NAME}}/include src/SDL2 + - name: Build + run: make lib all + - name: Upload Artifacts + uses: actions/upload-artifact@v4.3.1 + with: + retention-days: 5 + name: rvvm_macos_x86_64 + path: | + release.darwin.x86_64/rvvm_x86_64 + release.darwin.x86_64/librvvm.dylib + release.darwin.x86_64/librvvm_static.a