Skip to content
Merged
Show file tree
Hide file tree
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
63 changes: 25 additions & 38 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-13
steps:
- name: Setup Dependencies
run: |
Expand All @@ -54,72 +54,59 @@ 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

# Note: Running inside a CentOS container because we want to compile using a version of glibc
# Note: Running inside a Rocky Linux container because we want to compile using a version of glibc
# that is as old as reasonably possible to ensure backwards compatibility of the compiled binaries.
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
dnf -y install epel-release
yum -y install gcc-c++ gcc cmake bzip2
yum -y install alsa-lib-devel portaudio-devel pulseaudio-libs-devel pipewire-devel

- name: Compile natives
run: |
source /opt/rh/devtoolset-8/enable
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
cmake3 .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
cmake3 --build .
cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
cmake --build .
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: 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: |
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: Setup Dependencies
run: |
mkdir -p artifacts/arm64
sudo apt-get install -y build-essential curl cmake libasound2-dev portaudio19-dev libpulse-dev libpipewire-0.3-dev
- 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 .
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
14 changes: 7 additions & 7 deletions .github/workflows/build-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
needs: [compile-openal, compile-natives]
steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare environment variables
run: |
Expand All @@ -46,31 +46,31 @@ jobs:
fi

- name: Download artifacts - OpenAL-CS.dll
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: OpenAL-CS
path: ./bin

- name: Download artifacts - native - Windows
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Natives-Windows
path: ./native/win

- name: Download artifacts - native - MacOS
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Natives-MacOS
path: ./native/osx

- name: Download artifacts - native - Linux (x64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Natives-Linux(x64)
path: ./native/linux

- name: Download artifacts - native - Linux (arm64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Natives-Linux(arm64)
path: ./native/linux
Expand All @@ -83,7 +83,7 @@ jobs:
nuget pack OpenRA-OpenAL-CS.nuspec -OutputDirectory ./nuget -version ${{ env.PACKAGE_VERSION }}

- name: Upload NuGet package to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: NuGet Package ${{ env.PACKAGE_VERSION }}
path: ./nuget
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-openal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Since OpenAL-CS.csproj targets netstandard2.0 we don't need .NET 6, but let's not risk having outdated support for older versions.
- name: Install .NET 6
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

Expand All @@ -27,7 +27,7 @@ jobs:
dotnet build OpenAL-CS.sln

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenAL-CS
path: ./bin