-
-
Notifications
You must be signed in to change notification settings - Fork 25
Introduce Github Action to build Darwin packages. #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Darwin Package Build | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
LOG_LEVEL: debug | ||
|
||
jobs: | ||
dist_darwin: | ||
runs-on: macos-11 | ||
|
||
steps: | ||
- | ||
name: Select Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '13.2.1' | ||
|
||
- # Reference: https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side | ||
name: Download distribution-scripts sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: distribution-scripts | ||
|
||
- | ||
name: Download crystal sources | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: crystal-lang/crystal | ||
path: crystal | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
|
||
- | ||
name: Restore Omnibus Depenedcies' cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: distribution-scripts/omnibus/vendor/bundler | ||
key: ${{ runner.os }}-omnibus-bundler-${{ hashFiles('distribution-scripts/omnibus/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-omnibus-bundler- | ||
${{ runner.os }}- | ||
|
||
- | ||
name: Install Omnibus Depenedcies | ||
miry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
cd distribution-scripts/omnibus | ||
bundle install --path vendor/bundler | ||
|
||
- | ||
name: Create build folders | ||
run: | | ||
sudo mkdir -p /opt/crystal | ||
sudo chown $(whoami) /opt/crystal/ | ||
sudo mkdir -p /var/cache | ||
sudo chown $(whoami) /var/cache | ||
|
||
- | ||
name: Build Dawin package | ||
miry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
make -C distribution-scripts/darwin \ | ||
OMNIBUS_OPTS="--log-level ${{ env.LOG_LEVEL }} --override use_git_caching:false" \ | ||
CRYSTAL_REPO=$GITHUB_WORKSPACE/crystal \ | ||
CRYSTAL_SRC=$GITHUB_WORKSPACE/crystal \ | ||
CRYSTAL_SHA1=master \ | ||
CRYSTAL_VERSION=1.11.0 \ | ||
PACKAGE_ITERATION=1 \ | ||
LLVM_VERSION=15.0.7 \ | ||
PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ=https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-darwin-universal.tar.gz | ||
Comment on lines
+70
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Crystal and LLVM versions should be updated. I believe we just upgraded to LLVM 18? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ysbaddaden i think I asked @straight-shoota about this 1 year ago :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to review it again, to check if it was any changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's why I said if/when this is merged. Don't bother with this now :) |
||
|
||
|
||
- # Reference: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files | ||
name: Extract the package name to be used for the artifact name | ||
run: | | ||
cd distribution-scripts/darwin/build | ||
ls -la | ||
filename=$(ls -1 crystal-*.tar.gz) | ||
echo "ARTIFACT_NAME=${filename%.tar.gz}" >> "$GITHUB_ENV" | ||
|
||
- # When an Artifact is uploaded, all the files are assembled into an immutable Zip archive. | ||
# https://github.com/actions/upload-artifact#zip-archives | ||
name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: distribution-scripts/darwin/build/* | ||
retention-days: 1 | ||
if-no-files-found: error | ||
compression-level: 0 # package is already compressed |
Uh oh!
There was an error while loading. Please reload this page.