From ce66cfec734a60026c792333bb5ce40ae45e695b Mon Sep 17 00:00:00 2001 From: "Sean T. Allen" Date: Tue, 30 Jan 2024 20:28:40 +0000 Subject: [PATCH] Add MacOS on Apple Silicon as a supported platform --- .github/workflows/nightlies.yml | 42 +++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 35 ++++++++++++++++++++++++++ .github/workflows/release.yml | 34 +++++++++++++++++++++++++ .release-notes/welcome-back-m1.md | 5 ++++ INSTALL.md | 2 +- README.md | 3 +-- RELEASE_PROCESS.md | 1 + 7 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 .release-notes/welcome-back-m1.md diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index 283eec0e4f..679ed3488d 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -112,6 +112,48 @@ jobs: topic: ${{ github.repository }} scheduled job failure content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. + arm64_macos: + runs-on: macos-14 + + name: arm64-apple-darwin + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Restore Libs Cache + id: restore-libs + uses: actions/cache/restore@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Build Libs + if: steps.restore-libs.outputs.cache-hit != 'true' + run: make libs build_flags=-j8 + - name: Save Libs Cache + if: steps.restore-libs.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Install Cloudsmith + run: pip3 install --upgrade cloudsmith-cli + - name: Nightly + run: bash .ci-scripts/arm64-nightly.bash + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} + TRIPLE_VENDOR: apple + TRIPLE_OS: darwin + - name: Send alert on failure + if: ${{ failure() }} + uses: zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4 + with: + api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }} + email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }} + organization-url: 'https://ponylang.zulipchat.com/' + to: notifications + type: stream + topic: ${{ github.repository }} scheduled job failure + content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed. + x86_64-windows: runs-on: windows-2022 defaults: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5af16a225e..7b3355acaa 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -360,6 +360,41 @@ jobs: - name: Test with Release Runtime run: make test-ci config=release usedebugger=lldb + arm64-macos: + runs-on: macos-14 + + name: arm64 Apple Darwin + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Restore Libs Cache + id: restore-libs + uses: actions/cache/restore@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Build Libs + if: steps.restore-libs.outputs.cache-hit != 'true' + run: make libs build_flags=-j8 + - name: Save Libs Cache + if: steps.restore-libs.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Build Debug Runtime + run: | + make configure arch=armv8 config=debug + make build config=debug + - name: Test with Debug Runtime + run: make test-ci config=debug usedebugger=lldb + - name: Build Release Runtime + run: | + make configure arch=armv8 config=release + make build config=release + - name: Test with Release Runtime + run: make test-ci config=release usedebugger=lldb + x86_64-windows: runs-on: windows-2022 defaults: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30584d190a..32bab09512 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,6 +116,40 @@ jobs: TRIPLE_VENDOR: apple TRIPLE_OS: darwin + arm64_macos: + needs: + - pre-artefact-creation + + runs-on: macos-14 + + name: arm64-apple-darwin + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Restore Libs Cache + id: restore-libs + uses: actions/cache/restore@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Build Libs + if: steps.restore-libs.outputs.cache-hit != 'true' + run: make libs build_flags=-j8 + - name: Save Libs Cache + if: steps.restore-libs.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: build/libs + key: libs-arm64-macos-14-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }} + - name: Install Cloudsmith + run: pip3 install --upgrade cloudsmith-cli + - name: Release + run: bash .ci-scripts/arm64-release.bash + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} + TRIPLE_VENDOR: apple + TRIPLE_OS: darwin + x86_64-windows: needs: - pre-artefact-creation diff --git a/.release-notes/welcome-back-m1.md b/.release-notes/welcome-back-m1.md new file mode 100644 index 0000000000..a216b44b8a --- /dev/null +++ b/.release-notes/welcome-back-m1.md @@ -0,0 +1,5 @@ +## Add support for MacOS on Apple Silicon + +Back in August of 2023, we had to drop MacOS on Apple Silicon as a supported platform as we had no Apple Silicon test and build environment. We lost our existing environment when we had to migrate off of CirrusCI. + +GitHub recently announced that they now have Apple Silicon MacOS machines so, we are back in business and MacOS on Apple Silicon is once again a supported platform. diff --git a/INSTALL.md b/INSTALL.md index fe64a5d040..c4529b33fe 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -73,7 +73,7 @@ If you get that error, it means that the Glibc we compiled ponyc with isn't comp ## macOS -Prebuilt macOS packages are available for macOS on Intel via [ponyup](https://github.com/ponylang/ponyup). You can also install nightly builds using ponyup. +Prebuilt macOS packages are available for macOS via [ponyup](https://github.com/ponylang/ponyup). You can also install nightly builds using ponyup. To install the most recent ponyc on macOS: diff --git a/README.md b/README.md index 2225324466..13cf22ce49 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Pony is still pre-1.0 and as such, semi-regularly introduces breaking changes. T ### Operating Systems * Linux -* macOS (x86 only) +* macOS * Windows 10 ### CPUs @@ -28,7 +28,6 @@ Best effort platforms mean that there is support for the platform in the codebas * DragonFlyBSD (x86 only) * FreeBSD (x86 only) -* macOS (Apple Silicon only) ## More Information diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index bc5b35f3ef..6200312bc3 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -42,6 +42,7 @@ You can verify that the release artifacts were successfully built and uploaded b Package names will be: +* ponyc-arm64-apple-darwin.tar.gz * ponyc-x86-64-apple-darwin.tar.gz * ponyc-x86-64-pc-windows-msvc.zip * ponyc-x86-64-unknown-linux-fedora39.tar.gz