diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c52fc4b..4d8617d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,9 +212,70 @@ jobs: path: ${{runner.workspace}}/jaMME/build/jamme-macos-${{ matrix.arch }}.tar if-no-files-found: error + macos-arm64: + name: ${{ matrix.config }} macOS ${{ matrix.arch }} + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + arch: [arm64] + cc: [clang] + cxx: [clang++] + include: + - config: Release + rule: install + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: | + brew install zlib libjpeg sdl2 + cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . + + - name: Install + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --install . + + - name: Update readme + working-directory: ${{runner.workspace}}/jaMME/build/mme + shell: bash + run: | + sed -i.bak "s/Date: .*..*..*/Date: $(date +"%d.%m.%Y")/" readme.txt + sed -i.bak "s/Revision: .*/Revision: "$(git rev-parse --short HEAD)"/" readme.txt + rm readme.txt.bak + + - name: Create binary archive + working-directory: ${{runner.workspace}}/jaMME/build + shell: bash + run: | + chmod +x jamme.app/Contents/MacOS/jamme + chmod +x start_jaMME.command + rm start_jaMME.cmd + rm start_jaMME.sh + tar -cvf jamme-macos-${{ matrix.arch }}.tar ./* + + - uses: actions/upload-artifact@v4 + if: matrix.cc == 'clang' && matrix.config == 'Release' + with: + name: jamme-macos-${{ matrix.arch }} + path: ${{runner.workspace}}/jaMME/build/jamme-macos-${{ matrix.arch }}.tar + if-no-files-found: error + create-release: if: github.ref == 'refs/heads/master' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' - needs: [windows, ubuntu, macos] + needs: [windows, ubuntu, macos, macos-arm64] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -233,6 +294,7 @@ jobs: 7z a -r jamme-linux-x86_64.zip ./jamme-linux-x86_64/* 7z a -r jamme-windows-x86.zip ./jamme-windows-x86/* 7z a -r jamme-macos-x86_64.zip ./jamme-macos-x86_64/* + 7z a -r jamme-macos-arm64.zip ./jamme-macos-arm64/* - name: Create latest build uses: crowbarmaster/GH-Automatic-Releases@latest