Some checks failed
Build / Build (push) Has been skipped
Release / gitea-draft-release (push) Successful in 2s
Release / prepare (push) Has been skipped
Release / build_linux (push) Has been skipped
Release / build_macos (push) Has been skipped
Release / build_windows (push) Has been skipped
Release / publish_release (push) Has been skipped
MSVC Build / build-windows (windows-latest) (push) Has been cancelled
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
name: Macos Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "release-**"]
|
|
pull_request:
|
|
branches: [ "main", "dev" ]
|
|
workflow_call:
|
|
inputs:
|
|
build_name:
|
|
required: true
|
|
type: string
|
|
description: 'Build name passed as VC_BUILD_NAME define'
|
|
|
|
jobs:
|
|
build-dmg:
|
|
# Only run on GitHub, skip on Gitea
|
|
if: github.server_url == 'https://github.com'
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Install dependencies from brew
|
|
run: |
|
|
brew install glfw3 glew libpng openal-soft luajit libvorbis skypjack/entt/entt googletest glm
|
|
|
|
- name: Configure
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_TESTS=ON -DVOXELENGINE_BUILD_APPDIR=1 -DVC_BUILD_NAME="${{ inputs.build_name }}"
|
|
|
|
- name: Build
|
|
run: cmake --build build -t install
|
|
|
|
- name: Make fix_dylibs.sh executable
|
|
run: chmod +x dev/fix_dylibs.sh
|
|
|
|
- name: Fix dylibs
|
|
run: ./dev/fix_dylibs.sh VoxelEngine Release build
|
|
|
|
- name: Run tests
|
|
run: ctest --output-on-failure --test-dir build
|
|
|
|
- name: Run engine tests
|
|
timeout-minutes: 1
|
|
run: |
|
|
chmod +x build/VoxelEngine
|
|
chmod +x AppDir/usr/bin/vctest
|
|
AppDir/usr/bin/vctest -e build/VoxelEngine -d dev/tests -u build --output-always
|
|
- name: Create DMG
|
|
run: |
|
|
mkdir VoxelEngineDmgContent
|
|
cp -r build/res VoxelEngineDmgContent/
|
|
cp -r build/VoxelEngine VoxelEngineDmgContent/
|
|
cp -r build/libs VoxelEngineDmgContent/libs
|
|
hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: VoxelEngineMacOs
|
|
path: VoxelEngineMacApp.dmg |