sm64coopdx/.github/workflows/build-coop.yaml
EmeraldLockdown 2fcf14d08d
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
Add backwards compatibility for older versions of macOS and add new macOS Icon (#957)
Here are the changes:

- Update each runner to their respective latest versions (Arm is macOS-26 preview, and intel is macOS-15-intel)
- Compiled glew and sdl2 manually, specifically targeting 11 (big sur) on arm and 10.15 (catalina) on intel
- Recompiled arm lua libs to support Big Sur
- Add new icon designed for macOS 26 (tahoe), including backwards compatibility support for versions prior to tahoe

Few things to note are

- Vscode automatically removed white lines in the workflow for actions, if I need to revert it lmk.
- I tested this in a vm on macOS 11 (Monterey), and it appeared to work. If someone on intel is on macOS 10.15 (Catalina) or someone on arm is on macOS 11 (Big Sur), it would be greatly appreciated if you could test this. Even if you're on a slightly newer version that isn't supported in the current version, that would be appreciated. You can find the zipped builds [here](https://github.com/EmeraldLoc/random-files)
2026-02-23 08:35:53 +10:00

280 lines
10 KiB
YAML

name: Build coop
on:
workflow_dispatch:
push:
branches: [ dev ]
jobs:
build-linux:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev zip
- name: Build the game
run: make -j$(nproc)
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Linux.zip dynos lang mods palettes libdiscord_game_sdk.so sm64coopdx
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-linux
path: ./build/us_pc/sm64coopdx_Linux.zip
build-steamos:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev zip
- name: Build the game
run: make -j$(nproc) HANDHELD=1
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_SteamOS.zip dynos lang mods palettes libdiscord_game_sdk.so sm64coopdx
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-steamos
path: ./build/us_pc/sm64coopdx_SteamOS.zip
build-windows-opengl:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >
unzip
make
git
mingw-w64-i686-gcc
mingw-w64-x86_64-gcc
mingw-w64-i686-glew
mingw-w64-x86_64-glew
mingw-w64-i686-SDL2
mingw-w64-i686-SDL
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL
python3
zip
- name: Build the game
run: make -j$(nproc)
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Windows_OpenGL.zip dynos lang mods palettes coop.map discord_game_sdk.dll sm64coopdx.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-windows-opengl
path: ./build/us_pc/sm64coopdx_Windows_OpenGL.zip
build-windows-directx:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >
unzip
make
git
mingw-w64-i686-gcc
mingw-w64-x86_64-gcc
mingw-w64-i686-glew
mingw-w64-x86_64-glew
mingw-w64-i686-SDL2
mingw-w64-i686-SDL
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL
python3
zip
- name: Build the game
run: make -j$(nproc) RENDER_API=D3D11 WINDOW_API=DXGI
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Windows_DirectX.zip dynos lang mods palettes coop.map discord_game_sdk.dll sm64coopdx.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-windows-directx
path: ./build/us_pc/sm64coopdx_Windows_DirectX.zip
build-macos-arm:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: macos-26
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install make mingw-w64 pkg-config glfw3 coreutils
- name: Compile glew
run: |
export MACOSX_DEPLOYMENT_TARGET=11
curl -L -o glew.tar.gz https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz
tar -xzf glew.tar.gz
cd glew-2.2.0
make SYSTEM=darwin CC="clang -arch arm64 -mmacosx-version-min=11" GLEW_PREFIX=/opt/homebrew GLEW_DEST=/opt/homebrew
make install GLEW_PREFIX=/opt/homebrew GLEW_DEST=/opt/homebrew
- name: Compile SDL2
run: |
curl -L -o SDL2.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
tar -xzf SDL2.tar.gz
cd SDL2-2.30.9
./configure --prefix=/opt/homebrew CC="clang -arch arm64 -mmacosx-version-min=11"
make -j$(sysctl -n hw.ncpu)
make install
- name: Build the game
run: |
export PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH
gmake OSX_BUILD=1 -j$(sysctl -n hw.ncpu)
- name: Code sign the app (Ad-Hoc)
run: |
codesign --force --deep --sign - ./build/us_pc/sm64coopdx.app
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx.app/Contents/MacOS/sm64coopdx)"
- name: Zip the .app bundle
run: |
cd ./build/us_pc
zip -r sm64coopdx_macOS_ARM.zip sm64coopdx.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-macos-arm
path: ./build/us_pc/sm64coopdx_macOS_ARM.zip
build-macos-intel:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: macos-15-intel
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install make mingw-w64 gcc@9 pkg-config glfw3 coreutils
- name: Compile glew
run: |
export MACOSX_DEPLOYMENT_TARGET=10.15
curl -L -o glew.tar.gz https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz
tar -xzf glew.tar.gz
cd glew-2.2.0
make SYSTEM=darwin CC="clang -arch x86_64 -mmacosx-version-min=10.15"
make install
- name: Compile SDL2
run: |
curl -L -o SDL2.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
tar -xzf SDL2.tar.gz
cd SDL2-2.30.9
./configure --prefix=/usr/local CC="clang -arch x86_64 -mmacosx-version-min=10.15"
make -j$(sysctl -n hw.ncpu)
make install
- name: Build the game
run: |
gmake OSX_BUILD=1 -j$(sysctl -n hw.ncpu)
- name: Code sign the app (Ad-Hoc)
run: |
codesign --force --deep --sign - ./build/us_pc/sm64coopdx.app
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx.app/Contents/MacOS/sm64coopdx)"
- name: Zip the .app bundle
run: |
cd ./build/us_pc
zip -r sm64coopdx_macOS_Intel.zip sm64coopdx.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-macos-intel
path: ./build/us_pc/sm64coopdx_macOS_Intel.zip