From 3374246436219c62cd777790743720996689f907 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 10 Jun 2024 14:19:32 -0400 Subject: [PATCH 1/3] Build support for macos silicon --- .github/workflows/cmake_macos.yml | 101 ++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index 5a9f31a01..28b03d9ac 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -124,3 +124,104 @@ jobs: with: name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-x86_64-gha${{ github.run_number }}' path: build/artifacts/** + + macos14-arm64: + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, arm64" + + runs-on: macos-14 + +# env: +# BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed + + strategy: + fail-fast: true + matrix: + build: +# - name: Regular +# preset: regular + - name: Debug + preset: debug + slug: -Debug + - name: Dev + preset: experimental + slug: -Dev + dynarec: +# - name: ODR +# new: off +# slug: -ODR + - name: NDR + new: on + slug: -NDR + ui: + - name: SDL GUI + qt: off + static: on + src-packages: >- + libsndfile + - name: Qt GUI + qt: on + slug: -Qt + packages: >- + qt@5 + src-packages: >- + libsndfile + + steps: + - name: Install source dependencies + run: >- + brew reinstall -s + ${{ matrix.ui.src-packages }} + + - name: Install dependencies + run: >- + brew install + ninja + freetype + sdl2 + libpng + rtmidi + openal-soft + fluidsynth + libslirp + ${{ matrix.ui.packages }} + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + +# - name: Install sonar-scanner and build-wrapper +# uses: SonarSource/sonarcloud-github-c-cpp@v2 + + - name: Configure CMake + run: >- + cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ./cmake/llvm-macos-aarch64.cmake + -D NEW_DYNAREC=${{ matrix.dynarec.new }} + -D CMAKE_INSTALL_PREFIX=./build/artifacts + -D QT=${{ matrix.ui.qt }} + -D Qt5_ROOT=$(brew --prefix qt@5) + -D Qt5LinguistTools_ROOT=$(brew --prefix qt@5) + -D OpenAL_ROOT=$(brew --prefix openal-soft) + + - name: Build + run: | + cmake --build build + +# - name: Run sonar-scanner +# if: 0 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# run: | +# sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" + + - name: Generate package + run: | + cmake --install build + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-arm64-gha${{ github.run_number }}' + path: build/artifacts/** From f73dff6d768a7eb7f94336d596595516d72f5e81 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 10 Jun 2024 14:58:37 -0400 Subject: [PATCH 2/3] freetype & libpng are installed by default on mac --- .github/workflows/cmake_macos.yml | 4 ---- .github/workflows/codeql_macos.yml | 2 -- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index 28b03d9ac..f70b7334a 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -76,9 +76,7 @@ jobs: run: >- brew install ninja - freetype sdl2 - libpng rtmidi openal-soft fluidsynth @@ -176,9 +174,7 @@ jobs: run: >- brew install ninja - freetype sdl2 - libpng rtmidi openal-soft fluidsynth diff --git a/.github/workflows/codeql_macos.yml b/.github/workflows/codeql_macos.yml index 6d2c3861f..adf34cb54 100644 --- a/.github/workflows/codeql_macos.yml +++ b/.github/workflows/codeql_macos.yml @@ -70,9 +70,7 @@ jobs: run: >- brew install ninja - freetype sdl2 - libpng rtmidi openal-soft fluidsynth From 7411fda449483bd5b86a2193ff371a52640d5302 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 10 Jun 2024 15:16:17 -0400 Subject: [PATCH 3/3] Switch sonarcloud scanner to git release This is temporary till it gets a new update --- .github/workflows/cmake_linux.yml | 2 +- .github/workflows/cmake_macos.yml | 4 ++-- .github/workflows/cmake_windows_msys2.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake_linux.yml b/.github/workflows/cmake_linux.yml index 04238ece0..f1ef973c4 100644 --- a/.github/workflows/cmake_linux.yml +++ b/.github/workflows/cmake_linux.yml @@ -88,7 +88,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@v2 + uses: SonarSource/sonarcloud-github-c-cpp@5c3c39143e381909307f6903f13774b275ed956d - name: Configure CMake run: >- diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index f70b7334a..045626cd1 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -88,7 +88,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@v2 + uses: SonarSource/sonarcloud-github-c-cpp@5c3c39143e381909307f6903f13774b275ed956d - name: Configure CMake run: >- @@ -187,7 +187,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis # - name: Install sonar-scanner and build-wrapper -# uses: SonarSource/sonarcloud-github-c-cpp@v2 +# uses: SonarSource/sonarcloud-github-c-cpp@5c3c39143e381909307f6903f13774b275ed956d - name: Configure CMake run: >- diff --git a/.github/workflows/cmake_windows_msys2.yml b/.github/workflows/cmake_windows_msys2.yml index 36442684a..d415c7821 100644 --- a/.github/workflows/cmake_windows_msys2.yml +++ b/.github/workflows/cmake_windows_msys2.yml @@ -111,7 +111,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@v2 + uses: SonarSource/sonarcloud-github-c-cpp@5c3c39143e381909307f6903f13774b275ed956d - name: Configure CMake run: >-