Skip to content

Update project (#28) #77

Update project (#28)

Update project (#28) #77

Workflow file for this run

name: macOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
macos-test-build-release-xcode:
runs-on: macOS-latest
strategy:
matrix:
xcode: ["15.4", "16.0"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Restore cached Homebrew dependencies
uses: actions/cache@v4
with:
path: |
~/Library/Caches/Homebrew/sdl2--*
~/Library/Caches/Homebrew/downloads/*--sdl2-*
key: ${{ runner.os }}-brew-sdl2-${{ hashFiles('.github/brew-formulae') }}
restore-keys: ${{ runner.os }}-brew-sdl2-
- name: Restore cached SPM dependencies
uses: actions/cache@v4
with:
path: |
.build/repositories
key: ${{ runner.os }}-spm-repos-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-repos-
- name: Install dependencies
run: |
brew install sdl2
sdl2-config --version
- name: Build Release
run: swift build -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v4.4.3
with:
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/*.yaml
.build/*.xml
.build/*.json
.build/*.txt
.build/**/*.json
.build/**/*.txt
.build/**/*.a
.build/**/*.dSYM
.build/**/*.gdb
.build/**/*.bundle
.build/**/Asteroids
.build/**/Particles
if-no-files-found: warn
include-hidden-files: true