Skip to content

Fix crash enabling sound #36

Fix crash enabling sound

Fix crash enabling sound #36

Workflow file for this run

# Builds the game for multiple platforms and uploads the artifacts
name: Build on multiple platforms
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_linux:
name: Build for Linux for x86, x64, ARM, ARM64 and PPC64LE
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: ./build-linux.sh
- name: Upload Linux 386 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Linux-386
path: dist/linux_386/kens-labyrinth-linux-386.tar.gz
if-no-files-found: error
- name: Upload Linux AMD64 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Linux-AMD64
path: dist/linux_amd64/kens-labyrinth-linux-amd64.tar.gz
if-no-files-found: error
- name: Upload Linux ARMv7 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Linux-ARMv7
path: dist/linux_arm_v7/kens-labyrinth-linux-armv7.tar.gz
if-no-files-found: error
- name: Upload Linux ARM64 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Linux-ARM64
path: dist/linux_arm64/kens-labyrinth-linux-arm64.tar.gz
if-no-files-found: error
- name: Upload Linux PPC64LE artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Linux-PPC64LE
path: dist/linux_ppc64le/kens-labyrinth-linux-ppc64le.tar.gz
if-no-files-found: error
build_nintendo_switch:
name: Build for Nintendo Switch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: ./build-switch.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Nintendo-Switch
path: dist/switch/ken
if-no-files-found: error
build_macos:
name: Build for macOS for Intel and Apple Silicon
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install the Apple developer certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Cache Dependencies
id: cache-dependencies
uses: actions/cache@v4
with:
path: macports-cache
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/CMakeLists.txt') }}
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
brew uninstall cmake
mkdir -p macports-cache
cd macports-cache
git clone https://github.com/macports/macports-base.git
cd macports-base
./configure --prefix=${{ github.workspace }}/macports-cache --enable-readline
make
sudo make install
make distclean
sudo ${{ github.workspace }}/macports-cache/bin/port selfupdate
sudo ${{ github.workspace }}/macports-cache/bin/port install cmake
echo "macosx_deployment_target 12.4" | sudo tee -a ${{ github.workspace }}/macports-cache/etc/macports/macports.conf > /dev/null
sudo ${{ github.workspace }}/macports-cache/bin/port install libsdl2 libsdl2_image libpng webp jpeg tiff +universal
# The latest zlib version is not compatible with the game so we need to install an older version
git checkout a9dc453e0037f30ceccdab1c649e168e66738531
cd archivers/zlib
sudo ${{ github.workspace }}/macports-cache/bin/port install +universal
- name: Build
run: |
mkdir -p build
cd build
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ github.workspace }}/macports-cache ..
cmake --build .
brew install create-dmg
create-dmg ../dist/macos/Kens-Labyrinth-macOS-Universal.dmg ../dist/macos/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-macOS-Universal
path: dist/macos/Kens-Labyrinth-macOS-Universal.dmg
if-no-files-found: error
build_windows:
name: Build for Windows for ARM64, x86 and x64
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
- name: Build for ARM64
run: |
mkdir -f build
cd build
cmake -A ARM64 ..
cmake --build . --config Release
cd ..
rmdir -force -recurse build
- name: Upload Windows ARM64 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Windows-ARM64
path: dist/windows/
if-no-files-found: error
- name: Build for x86
run: |
mkdir -f build
cd build
cmake -A Win32 ..
cmake --build . --config Release
cd ..
rmdir -force -recurse build
- name: Upload Windows x86 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Windows-x86
path: dist/windows/
if-no-files-found: error
- name: Build for x64
run: |
mkdir -f build
cd build
cmake -A x64 ..
cmake --build . --config Release
cd ..
rmdir -force -recurse build
- name: Upload Windows x64 artifact
uses: actions/upload-artifact@v4
with:
name: Kens-Labyrinth-Windows-x64
path: dist/windows/
if-no-files-found: error