From e4fd5de139e3d8a32d415649ec1f392bb0a4089d Mon Sep 17 00:00:00 2001 From: ownedbywuigi Date: Tue, 17 Jun 2025 14:52:59 -0400 Subject: [PATCH] Hopefully get a macOS build running --- .github/workflows/build.yml | 44 ++++++++++++++++++++++++++++++++++--- README.md | 4 ++-- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1c1166..d3e693a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,6 @@ jobs: echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT - Linux: name: Linux runs-on: ubuntu-24.04 @@ -78,8 +77,9 @@ jobs: fetch-depth: 0 - name: Configure CMake - run: cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` + -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl ` + -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS @@ -94,3 +94,41 @@ jobs: with: name: Pound-win64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}} path: artifact/ + + macOS: + name: macOS + runs-on: macos-14 + needs: get-info + strategy: + matrix: + arch: [x86_64, arm64] + steps: + - uses: actions/checkout@main + with: + submodules: recursive + fetch-depth: 0 + + - name: Install Dependencies + run: | + brew update + brew install cmake ninja ccache + + - name: Configure CMake for ${{ matrix.arch }} + run: > + cmake -G Ninja -B "${{env.BUILD_DIR}}" + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} + + - name: Build for ${{ matrix.arch }} + run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.logicalcpu) + + - name: Prepare Artifact Folder + run: | + mkdir -p artifact + cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-${{ matrix.arch }}-macOS-${{env.BUILD_TYPE}} + + - name: Upload macOS Artifact + uses: actions/upload-artifact@main + with: + name: Pound-macOS-${{ matrix.arch }}-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash }} + path: artifact/ diff --git a/README.md b/README.md index 69de104..4ea0685 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Also check out [obomori](https://github.com/Nikilites/oboromi), another emulator #### Android #### macOS - - + + #### Windows