Skip to content

Commit

Permalink
CI: Add MacOS M1 builder, don't use brew
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
LekKit authored Nov 18, 2024
1 parent 3824e60 commit 7c00fe0
Showing 1 changed file with 48 additions and 21 deletions.
69 changes: 48 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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/[email protected]
Expand All @@ -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/[email protected]
- name: Install SDL
run: brew install sdl12-compat
- name: Build
run: make lib all
- name: Upload Artifacts
uses: actions/[email protected]
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/[email protected]
- 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/[email protected]
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/[email protected]
- 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/[email protected]
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

0 comments on commit 7c00fe0

Please sign in to comment.