Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ARM runner #22

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 18 additions & 30 deletions .github/workflows/build-natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

# Download an official precompiled release version of SDL because compiling for Windows on Linux is hard.
# Download also a precompiled version of Chromium in order to extract libEGL.dll and libGLESv2.dll, which the Windows SDL DLL depends on.
- name: Download natives
- name: Download Natives
run: |
curl -s -L -O https://www.libsdl.org/release/SDL2-${SDL2_VERSION}-win32-x86.zip
unzip SDL2-${SDL2_VERSION}-win32-x86.zip SDL2.dll -d artifacts/x86
Expand All @@ -48,14 +48,14 @@ jobs:

macos:
name: macOS (x64 + arm64)
runs-on: macos-12
runs-on: macos-13
steps:
- name: Setup Dependencies
run: |
mkdir -p artifacts/x86_64
mkdir artifacts/arm64

- name: Compile natives
- name: Compile Natives
run: |
curl -s -L -O https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
tar xf SDL2-${SDL2_VERSION}.tar.gz
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
dnf -y update
dnf install -y libXext-devel libX11-devel mesa-libGL-devel mesa-libGLU-devel libXrender-devel libXrandr-devel libXcursor-devel libXinerama-devel libXi-devel wayland-devel wayland-protocols-devel libxkbcommon-x11-devel

- name: Compile natives
- name: Compile Natives
run: |
curl -s -L -O https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
tar xf SDL2-${SDL2_VERSION}.tar.gz
Expand All @@ -107,35 +107,23 @@ jobs:
name: Natives-Linux(x64)
path: ./artifacts

# Note: Using the run-on-arch action is *very* slow, but is the only way to simulate arm64 architecture.
linux-arm64:
name: Linux (arm64)
runs-on: ubuntu-22.04
runs-on: ubuntu-22.04-arm
steps:
- name: Setup dependencies and compile natives
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu22.04
shell: /bin/sh
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/artifacts/arm64"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
env: |
SDL2_VERSION: ${{ env.SDL2_VERSION }}
install: |
apt-get update -q -y
apt-get install -y build-essential pkgconf curl libxext-dev libx11-dev libwayland-dev libgl1-mesa-dev libglu1-mesa-dev libxrender-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxkbcommon-dev
run: |
curl -s -L -O https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
tar xf SDL2-${SDL2_VERSION}.tar.gz
cd SDL2-${SDL2_VERSION}
./configure --disable-rpath --enable-loadso --disable-audio --disable-sensor --enable-x11-shared --enable-video-wayland --enable-wayland-shared --disable-video-directfb --disable-video-vulkan --disable-video-dummy --disable-power --disable-joystick --disable-haptic --disable-filesystem --disable-file --disable-cpuinfo --prefix "${PWD}"
make
make install
cp lib/libSDL2.so /artifacts/arm64/SDL2.so
- name: Setup Dependencies
run: |
mkdir -p artifacts/arm64
sudo apt-get install -y build-essential pkgconf curl libxext-dev libx11-dev libwayland-dev libgl1-mesa-dev libglu1-mesa-dev libxrender-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxkbcommon-dev
- name: Compile Natives
run: |
curl -s -L -O https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
tar xf SDL2-${SDL2_VERSION}.tar.gz
cd SDL2-${SDL2_VERSION}
./configure --disable-rpath --enable-loadso --disable-audio --disable-sensor --enable-x11-shared --enable-video-wayland --enable-wayland-shared --disable-video-directfb --disable-video-vulkan --disable-video-dummy --disable-power --disable-joystick --disable-haptic --disable-filesystem --disable-file --disable-cpuinfo --prefix "${PWD}"
make
make install
cp lib/libSDL2.so ../artifacts/arm64/SDL2.so

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down