-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add macOS on Intel as a fully supported platform
- Loading branch information
1 parent
37fa7a1
commit 059debf
Showing
9 changed files
with
362 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
case "${1}" in | ||
"release") | ||
REPO=nightlies | ||
;; | ||
"nightly") | ||
REPO=nightlies | ||
;; | ||
*) | ||
echo "invalid ponyc version" | ||
echo "Options:" | ||
echo "release" | ||
echo "nightly" | ||
exit 1 | ||
esac | ||
|
||
# | ||
# Libressl is required for ponyup | ||
# | ||
|
||
brew update | ||
brew install libressl | ||
|
||
# | ||
# Install ponyc the hard way | ||
# It will end up in /tmp/ponyc/ with the binary at /tmp/ponyc/bin/ponyc | ||
# | ||
|
||
pushd /tmp || exit | ||
mkdir ponyc | ||
curl "https://dl.cloudsmith.io/public/ponylang/${REPO}/raw/versions/latest/ponyc-x86-64-apple-darwin.tar.gz" --output ponyc.tar.gz | ||
tar xzf ponyc.tar.gz -C ponyc --strip-components=1 | ||
popd || exit | ||
|
||
# | ||
# Install corral the hard way | ||
# It will end up in /tmp/corral/ with the binary at /tmp/corral/bin/corral | ||
# | ||
|
||
pushd /tmp || exit | ||
mkdir corral | ||
curl "https://dl.cloudsmith.io/public/ponylang/${REPO}/raw/versions/latest/corral-x86-64-apple-darwin.tar.gz" --output corral.tar.gz | ||
tar xzf corral.tar.gz -C corral --strip-components=1 | ||
popd || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/bin/bash | ||
|
||
# - Builds release package | ||
# - Uploads to Cloudsmith | ||
# | ||
# Tools required in the environment that runs this: | ||
# | ||
# - bash | ||
# - cloudsmith-cli | ||
# - GNU coreutils | ||
# - GNU gzip | ||
# - GNU make | ||
# - libressl | ||
# - ponyc | ||
# - corral | ||
# - GNU tar | ||
|
||
# add hard way installed ponyc, corral to our PATH | ||
export PATH="/tmp/corral/bin:/tmp/ponyc/bin/:/Library/Frameworks/Python.framework/Versions/3.11/bin/:$PATH" | ||
set -o errexit | ||
|
||
# Pull in shared configuration specific to this repo | ||
base=$(dirname "$0") | ||
# shellcheck source=.ci-scripts/release/config.bash | ||
source "${base}/config.bash" | ||
|
||
# Verify ENV is set up correctly | ||
# We validate all that need to be set in case, in an absolute emergency, | ||
# we need to run this by hand. Otherwise the GitHub actions environment should | ||
# provide all of these if properly configured | ||
if [[ -z "${CLOUDSMITH_API_KEY}" ]]; then | ||
echo -e "\e[31mCloudsmith API key needs to be set in CLOUDSMITH_API_KEY." | ||
echo -e "Exiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${GITHUB_REPOSITORY}" ]]; then | ||
echo -e "\e[31mName of this repository needs to be set in GITHUB_REPOSITORY." | ||
echo -e "\e[31mShould be in the form OWNER/REPO, for example:" | ||
echo -e "\e[31m ponylang/ponyup" | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${APPLICATION_NAME}" ]]; then | ||
echo -e "\e[31mAPPLICATION_NAME needs to be set." | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${APPLICATION_SUMMARY}" ]]; then | ||
echo -e "\e[31mAPPLICATION_SUMMARY needs to be set." | ||
echo -e "\e[31mIt's a short description of the application that will appear in Cloudsmith." | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
# no unset variables allowed from here on out | ||
# allow above so we can display nice error messages for expected unset variables | ||
set -o nounset | ||
|
||
TODAY=$(date +%Y%m%d) | ||
|
||
# Compiler target parameters | ||
ARCH=x86-64 | ||
|
||
# Triple construction | ||
VENDOR=apple | ||
OS=darwin | ||
TRIPLE=${ARCH}-${VENDOR}-${OS} | ||
|
||
# Build parameters | ||
BUILD_PREFIX=$(mktemp -d) | ||
APPLICATION_VERSION="nightly-${TODAY}" | ||
BUILD_DIR=${BUILD_PREFIX}/${APPLICATION_VERSION} | ||
|
||
# Asset information | ||
PACKAGE_DIR=$(mktemp -d) | ||
PACKAGE=${APPLICATION_NAME}-${TRIPLE} | ||
|
||
# Cloudsmith configuration | ||
CLOUDSMITH_VERSION=${TODAY} | ||
ASSET_OWNER=ponylang | ||
ASSET_REPO=nightlies | ||
ASSET_PATH=${ASSET_OWNER}/${ASSET_REPO} | ||
ASSET_FILE=${PACKAGE_DIR}/${PACKAGE}.tar.gz | ||
ASSET_SUMMARY="${APPLICATION_SUMMARY}" | ||
ASSET_DESCRIPTION="https://github.com/${GITHUB_REPOSITORY}" | ||
|
||
# Build application installation | ||
echo -e "\e[34mBuilding ${APPLICATION_NAME}...\e[0m" | ||
make install prefix="${BUILD_DIR}" arch=${ARCH} \ | ||
version="${APPLICATION_VERSION}" | ||
|
||
# Package it all up | ||
echo -e "\e[34mCreating .tar.gz of ${APPLICATION_NAME}...\e[0m" | ||
pushd "${BUILD_PREFIX}" || exit 1 | ||
tar -cvzf "${ASSET_FILE}" -- * | ||
popd || exit 1 | ||
|
||
# Ship it off to cloudsmith | ||
echo -e "\e[34mUploading package to cloudsmith...\e[0m" | ||
cloudsmith push raw --version "${CLOUDSMITH_VERSION}" \ | ||
--api-key "${CLOUDSMITH_API_KEY}" --summary "${ASSET_SUMMARY}" \ | ||
--description "${ASSET_DESCRIPTION}" ${ASSET_PATH} "${ASSET_FILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/bin/bash | ||
|
||
# - Builds release package | ||
# - Uploads to Cloudsmith | ||
# | ||
# Tools required in the environment that runs this: | ||
# | ||
# - bash | ||
# - cloudsmith-cli | ||
# - GNU coreutils | ||
# - GNU gzip | ||
# - GNU make | ||
# - libressl | ||
# - ponyc | ||
# - corral | ||
# - GNU tar | ||
|
||
# add hard way installed ponyc, corral to our PATH | ||
export PATH="/tmp/corral/bin:/tmp/ponyc/bin/:/Library/Frameworks/Python.framework/Versions/3.11/bin/:$PATH" | ||
set -o errexit | ||
|
||
# Pull in shared configuration specific to this repo | ||
base=$(dirname "$0") | ||
# shellcheck source=.ci-scripts/release/config.bash | ||
source "${base}/config.bash" | ||
|
||
# Verify ENV is set up correctly | ||
# We validate all that need to be set in case, in an absolute emergency, | ||
# we need to run this by hand. Otherwise the GitHub actions environment should | ||
# provide all of these if properly configured | ||
if [[ -z "${CLOUDSMITH_API_KEY}" ]]; then | ||
echo -e "\e[31mCloudsmith API key needs to be set in CLOUDSMITH_API_KEY." | ||
echo -e "Exiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${GITHUB_REPOSITORY}" ]]; then | ||
echo -e "\e[31mName of this repository needs to be set in GITHUB_REPOSITORY." | ||
echo -e "\e[31mShould be in the form OWNER/REPO, for example:" | ||
echo -e "\e[31m ponylang/ponyup" | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${APPLICATION_NAME}" ]]; then | ||
echo -e "\e[31mAPPLICATION_NAME needs to be set." | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${APPLICATION_SUMMARY}" ]]; then | ||
echo -e "\e[31mAPPLICATION_SUMMARY needs to be set." | ||
echo -e "\e[31mIt's a short description of the application that will appear in Cloudsmith." | ||
echo -e "\e[31mExiting.\e[0m" | ||
exit 1 | ||
fi | ||
|
||
# no unset variables allowed from here on out | ||
# allow above so we can display nice error messages for expected unset variables | ||
set -o nounset | ||
|
||
# Compiler target parameters | ||
ARCH=x86-64 | ||
|
||
# Triple construction | ||
VENDOR=apple | ||
OS=darwin | ||
TRIPLE=${ARCH}-${VENDOR}-${OS} | ||
|
||
# Build parameters | ||
BUILD_PREFIX=$(mktemp -d) | ||
APPLICATION_VERSION=$(cat VERSION) | ||
BUILD_DIR=${BUILD_PREFIX}/${APPLICATION_VERSION} | ||
|
||
# Asset information | ||
PACKAGE_DIR=$(mktemp -d) | ||
PACKAGE=${APPLICATION_NAME}-${TRIPLE} | ||
|
||
# Cloudsmith configuration | ||
CLOUDSMITH_VERSION=$(cat VERSION) | ||
ASSET_OWNER=ponylang | ||
ASSET_REPO=releases | ||
ASSET_PATH=${ASSET_OWNER}/${ASSET_REPO} | ||
ASSET_FILE=${PACKAGE_DIR}/${PACKAGE}.tar.gz | ||
ASSET_SUMMARY="${APPLICATION_SUMMARY}" | ||
ASSET_DESCRIPTION="https://github.com/${GITHUB_REPOSITORY}" | ||
|
||
# Build application installation | ||
echo -e "\e[34mBuilding ${APPLICATION_NAME}...\e[0m" | ||
make install prefix="${BUILD_DIR}" arch=${ARCH} \ | ||
version="${APPLICATION_VERSION}" | ||
|
||
# Package it all up | ||
echo -e "\e[34mCreating .tar.gz of ${APPLICATION_NAME}...\e[0m" | ||
pushd "${BUILD_PREFIX}" || exit 1 | ||
tar -cvzf "${ASSET_FILE}" -- * | ||
popd || exit 1 | ||
|
||
# Ship it off to cloudsmith | ||
echo -e "\e[34mUploading package to cloudsmith...\e[0m" | ||
cloudsmith push raw --version "${CLOUDSMITH_VERSION}" \ | ||
--api-key "${CLOUDSMITH_API_KEY}" --summary "${ASSET_SUMMARY}" \ | ||
--description "${ASSET_DESCRIPTION}" ${ASSET_PATH} "${ASSET_FILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: macOS ponyc update breakage test | ||
|
||
on: | ||
repository_dispatch: | ||
types: [ponyc-macos-nightly-released] | ||
|
||
jobs: | ||
vs-ponyc-main-macos: | ||
name: Verify main against ponyc main on macOS | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install pony tools | ||
run: bash .ci-scripts/macOS-x86-install-pony-tools.bash nightly | ||
# we can't turn this on until we are able to pass the tests | ||
# that requires a couple of macos on intel ponyc releases | ||
# - name: Test with the most recent ponyc release | ||
# run: | | ||
# export PATH=/tmp/corral/bin/:/tmp/ponyc/bin/:$PATH | ||
# make test | ||
- 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Add macOS on Intel as fully supported platform | ||
|
||
We've added macOS on Intel as a fully supported platform. This means that we test ponyup using macOS on Intel and provide nightly and release builds of ponyup for macOS on Intel. | ||
|
||
We plan to maintain ponyup as fully supported on macOS on Intel as long as we have a macOS on Intel environment or until Apple stops supporting new macOS releases on Intel CPUs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters