Skip to content

Work around a bug

Work around a bug #51

Workflow file for this run

name: CMake Build (macOS)
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
BUILD_TYPE: Release
BUILD_DIR: "${{github.workspace}}/build"
DIST_DIR: "${{github.workspace}}/build/dist"
jobs:
build:
runs-on: macos-latest
continue-on-error: ${{ !matrix.release }}
strategy:
matrix:
include:
- repo: https://github.com/JesseTG/melonDS.git
commit: c976c3e9
release: true
- repo: https://github.com/melonDS-emu/melonDS.git
commit: master
release: false
# This profile is used to receive advanced notice of breaking changes
env:
ARCHIVE_NAME: "melondsds_libretro-macos-universal"
steps:
- uses: actions/checkout@v3
- name: Create build directory
run: mkdir -pv "$BUILD_DIR"
- name: Install Dependencies
run: brew install pkg-config cmake
- name: Configure
working-directory: "${{ env.BUILD_DIR }}"
run: cmake "$GITHUB_WORKSPACE" -DMELONDS_REPOSITORY_URL:STRING="${{ matrix.repo }}" -DMELONDS_REPOSITORY_TAG:STRING="${{ matrix.commit }}" -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64"
- name: Install GCC problem matcher
uses: root-project/gcc-problem-matcher-improved@9d83f12b27a78210f0485fb188e08d94fa807a6d
with:
build-directory: ${{ env.BUILD_DIR }}
- name: Build
working-directory: "${{ env.BUILD_DIR }}"
run: make -j$(sysctl -n hw.logicalcpu)
- name: Prepare Artifact Directory
if: matrix.release
env:
ZIP_ROOT: "${{ env.DIST_DIR }}/cores"
run: |
mkdir -pv "$ZIP_ROOT"
cp -f "$BUILD_DIR/src/libretro/melondsds_libretro.dylib" "$ZIP_ROOT"
cp -f "${{github.workspace}}/melondsds_libretro.info" "$ZIP_ROOT"
- name: Upload Artifact
uses: actions/upload-artifact@v3
if: matrix.release
with:
name: ${{ env.ARCHIVE_NAME }}
if-no-files-found: error
path: "${{ env.DIST_DIR }}"