yquake2remaster/.github/workflows/macos.yml
Denis Pauk 5d082ab2d9 Add test githaub action builds
Testbuild is applied to macos, linux, win32, win64.

Win32/64 additionally create release for tags.

Linux build is checked with disabled ffmpeg flag as LTS linux image
has unsupported ffmpeg version.

Based on:
*  180050b9a3
2024-08-11 18:08:44 +03:00

60 lines
2.4 KiB
YAML

name: Testbuild for MacOS
run-name: testbuild_macos
on:
push:
branches:
- 'master'
pull_request:
types:
- opened
- edited
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_macos_aarch64:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- env: macos
steps:
- name: Install build dependencies
run: |
brew update
brew install sdl2 openal-soft make ffmpeg molten-vk
brew upgrade
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
# Public runners come with 3 CPUs.
gmake -j3
- name: Create testbuild package
run: |
# Create release directory tree
mkdir -p publish/quake2-macos-${{github.sha}}/misc/docs
# Copy release assets
cp -r release/* publish/quake2-macos-${{github.sha}}/
# Copy misc assets
cp -r stuff/yq2.cfg publish/quake2-macos-${{github.sha}}/misc/yq2.cfg
cp -r stuff/mapfixes publish/quake2-macos-${{github.sha}}/misc
cp LICENSE publish/quake2-macos-${{github.sha}}/misc/docs/LICENSE.txt
cp README.md publish/quake2-macos-${{github.sha}}/misc/docs/README.txt
cp doc/010_index.md publish/quake2-macos-${{github.sha}}/misc/docs/010_index.txt
cp doc/020_installation.md publish/quake2-macos-${{github.sha}}/misc/docs/020_installation.txt
cp doc/030_configuration.md publish/quake2-macos-${{github.sha}}/misc/docs/030_configuration.txt
cp doc/040_cvarlist.md publish/quake2-macos-${{github.sha}}/misc/docs/040_cvarlist.txt
cp doc/050_commands.md publish/quake2-macos-${{github.sha}}/misc/docs/050_commands.txt
cp doc/060_multiplayer.md publish/quake2-macos-${{github.sha}}/misc/docs/060_multiplayer.txt
cp doc/070_packaging.md publish/quake2-macos-${{github.sha}}/misc/docs/070_packaging.txt
cp doc/080_contributing.md publish/quake2-macos-${{github.sha}}/misc/docs/080_contributing.txt
cp doc/090_filelists.md publish/quake2-macos-${{github.sha}}/misc/docs/090_filelists.md
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: quake2-macos-${{github.sha}}
path: publish/
if-no-files-found: error