mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
138 lines
4.5 KiB
YAML
138 lines
4.5 KiB
YAML
name: Build coop
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ dev ]
|
|
|
|
jobs:
|
|
build-ubuntu:
|
|
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
|
|
runs-on: ubuntu-latest
|
|
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
|
|
|
|
- name: Build the game
|
|
run: make -j$(nproc)
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sm64coopdx-ubuntu
|
|
path: ./build/us_pc/sm64coopdx
|
|
|
|
build-windows:
|
|
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
|
|
|
|
- name: Build the game
|
|
run: make -j$(nproc)
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sm64coopdx-windows
|
|
path: ./build/us_pc/sm64coopdx.exe
|
|
|
|
build-macos-arm:
|
|
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install make mingw-w64 gcc sdl2 pkg-config glew glfw3 libusb coreutils
|
|
|
|
- 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-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-13
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install make mingw-w64 gcc@9 sdl2 pkg-config glew glfw3 libusb coreutils
|
|
|
|
- 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
|