Skip to content
Closed
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
53 changes: 20 additions & 33 deletions .github/workflows/build-natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
unzip -j -d artifacts/x64 openal-soft-${OPENALSOFT_VERSION}-bin.zip openal-soft-${OPENALSOFT_VERSION}-bin/bin/Win64/soft_oal.dll

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Natives-Windows
path: ./artifacts

macos:
name: macOS (x64 + arm64)
runs-on: macos-11
runs-on: macos-12
steps:
- name: Setup Dependencies
run: |
Expand All @@ -54,7 +54,7 @@ jobs:
lipo -thin arm64 build/libopenal.${OPENALSOFT_VERSION}.dylib -output ../artifacts/arm64/soft_oal.dylib

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Natives-MacOS
path: ./artifacts
Expand All @@ -64,12 +64,11 @@ jobs:
linux-x64:
name: Linux (x64)
runs-on: ubuntu-22.04
container: centos:centos7
container: rockylinux:8
steps:
- name: Setup Dependencies
run: |
mkdir -p artifacts/x64
yum -y install https://repo.ius.io/ius-release-el7.rpm centos-release-scl scl-utils
yum -y install devtoolset-8 cmake3 bzip2
yum -y install alsa-lib-devel portaudio-devel pulseaudio-libs-devel libsoundio-devel

Expand All @@ -84,42 +83,30 @@ jobs:
cp libopenal.so ../../artifacts/x64/soft_oal.so

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
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: self-hosted
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: |
OPENALSOFT_VERSION: ${{ env.OPENALSOFT_VERSION }}
install: |
apt-get update -q -y
apt-get install -y build-essential curl cmake libasound2-dev portaudio19-dev libpulse-dev
run: |
curl -s -L -O https://openal-soft.org/openal-releases/openal-soft-${OPENALSOFT_VERSION}.tar.bz2
tar xf openal-soft-${OPENALSOFT_VERSION}.tar.bz2
cd openal-soft-${OPENALSOFT_VERSION}/build
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
cmake --build .
cp libopenal.so /artifacts/arm64/soft_oal.so
- name: Clean workspace
run: |
rm -rf ${{ github.workspace }}/*

- name: Compile natives
run: |
curl -s -L -O https://openal-soft.org/openal-releases/openal-soft-${OPENALSOFT_VERSION}.tar.bz2
tar xf openal-soft-${OPENALSOFT_VERSION}.tar.bz2
cd openal-soft-${OPENALSOFT_VERSION}/build
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j$(nproc)
mkdir -p ../../artifacts/arm64/
cp libopenal.so ../../artifacts/arm64/soft_oal.so

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Natives-Linux(arm64)
path: ./artifacts