From c0da4af25733bdd4038c64d08fa02bea78b72736 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Fri, 1 May 2026 21:13:49 -0400 Subject: [PATCH 1/2] Build macOS arm64 and x86_64 I have no clue what I'm doing --- .github/workflows/build.yml | 17 ++++++++++++++--- cmake/PackagingMac.cmake | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d0ac8648..647927243 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,11 @@ jobs: matrix: os: [ubuntu-24.04, windows-latest, macos-latest] qt_version: ["6.5", "6.8", "6.10"] + include: + - os: macos-latest + arch: arm64 + - os: macos-latest + arch: x86_64 runs-on: ${{ matrix.os }} @@ -32,6 +37,7 @@ jobs: version: ${{ matrix.qt_version }} modules: 'qt5compat' cache: true + arch: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' && 'clang_64' || '' }} - name: Setup Visual Studio Tools if: runner.os == 'Windows' @@ -60,7 +66,11 @@ jobs: sudo apt-get install libxkbcommon-dev libxkbcommon-x11-0 fuse libxcb-cursor-dev libcups2-dev - name: Configure - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DAPP_DISTRIBUTION=${{ env.DISTRIBUTION }} + run: | + cmake -S . -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DAPP_DISTRIBUTION=${{ env.DISTRIBUTION }} \ + ${{ runner.os == 'macOS' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }} - name: Build run: cmake --build build --parallel @@ -95,7 +105,7 @@ jobs: uses: actions/upload-artifact@v6 if: runner.os == 'macOS' with: - name: NotepadNext-macOS-Qt${{ matrix.qt_version }} + name: NotepadNext-macOS-${{ matrix.arch }}-Qt${{ matrix.qt_version }} path: ${{ github.workspace }}/build/NotepadNext*.dmg - name: Upload Linux AppImage @@ -143,4 +153,5 @@ jobs: - name: Upload macOS App run: | - gh release upload ${{ github.ref_name }} NotepadNext-macOS-Qt$QT_RELEASE_VER/NotepadNext-${{ github.ref_name }}.dmg + gh release upload ${{ github.ref_name }} NotepadNext-macOS-arm64-Qt$QT_RELEASE_VER/NotepadNext-${{ github.ref_name }}.dmg#NotepadNext-${{ github.ref_name }}-macOS-arm64.dmg + gh release upload ${{ github.ref_name }} NotepadNext-macOS-x86_64-Qt$QT_RELEASE_VER/NotepadNext-${{ github.ref_name }}.dmg#NotepadNext-${{ github.ref_name }}-macOS-x86_64.dmg diff --git a/cmake/PackagingMac.cmake b/cmake/PackagingMac.cmake index 9102113e7..ff775af07 100644 --- a/cmake/PackagingMac.cmake +++ b/cmake/PackagingMac.cmake @@ -1,4 +1,5 @@ message(STATUS "Configuring macOS packaging") +message(STATUS "Building for macOS architecture: ${CMAKE_OSX_ARCHITECTURES}") set(INSTALL_DIR ${CMAKE_BINARY_DIR}/install) From c43d6b5188fc1e6706855d04136d7ceacd45b3ca Mon Sep 17 00:00:00 2001 From: dail8859 Date: Fri, 1 May 2026 21:45:16 -0400 Subject: [PATCH 2/2] Try again --- .github/workflows/build.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 647927243..da39f4494 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,12 +17,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, windows-latest, macos-latest] + os: [ubuntu-24.04, windows-latest, macos-15, macos-15-intel] qt_version: ["6.5", "6.8", "6.10"] include: - - os: macos-latest + - os: macos-15 arch: arm64 - - os: macos-latest + - os: macos-15-intel + arch: x86_64 + - os: ubuntu-24.04 + arch: x86_64 + - os: windows-latest arch: x86_64 runs-on: ${{ matrix.os }} @@ -37,7 +41,6 @@ jobs: version: ${{ matrix.qt_version }} modules: 'qt5compat' cache: true - arch: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' && 'clang_64' || '' }} - name: Setup Visual Studio Tools if: runner.os == 'Windows' @@ -66,11 +69,7 @@ jobs: sudo apt-get install libxkbcommon-dev libxkbcommon-x11-0 fuse libxcb-cursor-dev libcups2-dev - name: Configure - run: | - cmake -S . -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DAPP_DISTRIBUTION=${{ env.DISTRIBUTION }} \ - ${{ runner.os == 'macOS' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }} + run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DAPP_DISTRIBUTION=${{ env.DISTRIBUTION }} ${{ runner.os == 'macOS' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }} - name: Build run: cmake --build build --parallel @@ -151,7 +150,12 @@ jobs: run: | gh release upload ${{ github.ref_name }} NotepadNext-Linux-Qt$QT_RELEASE_VER-AppImage/NotepadNext-${{ github.ref_name }}-x86_64.AppImage - - name: Upload macOS App + - name: Upload macOS arm64 DMG + run: | + gh release upload ${{ github.ref_name }} \ + NotepadNext-macOS-arm64-Qt$QT_RELEASE_VER/*.dmg#NotepadNext-${{ github.ref_name }}-macOS-arm64.dmg + + - name: Upload macOS x86_64 DMG run: | - gh release upload ${{ github.ref_name }} NotepadNext-macOS-arm64-Qt$QT_RELEASE_VER/NotepadNext-${{ github.ref_name }}.dmg#NotepadNext-${{ github.ref_name }}-macOS-arm64.dmg - gh release upload ${{ github.ref_name }} NotepadNext-macOS-x86_64-Qt$QT_RELEASE_VER/NotepadNext-${{ github.ref_name }}.dmg#NotepadNext-${{ github.ref_name }}-macOS-x86_64.dmg + gh release upload ${{ github.ref_name }} \ + NotepadNext-macOS-x86_64-Qt$QT_RELEASE_VER/*.dmg#NotepadNext-${{ github.ref_name }}-macOS-x86_64.dmg \ No newline at end of file