Nightly Release macOS Apple Silicon #570
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
on: | |
# pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 9 * * *' | |
name: Nightly Release macOS Apple Silicon | |
env: | |
RUST_BACKTRACE: 1 | |
LLVM_SYS_160_PREFIX: /opt/homebrew/opt/llvm@16 | |
jobs: | |
test-and-build: | |
name: Rust tests, build and package nightly release | |
runs-on: [self-hosted, macOS, ARM64] | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: zig version | |
- name: llvm version | |
run: llc --version | grep LLVM | |
- name: run tests | |
run: cargo test --locked --release | |
- name: get commit SHA | |
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | |
- name: get date | |
run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV | |
- name: build file name | |
env: | |
DATE: ${{ env.DATE }} | |
SHA: ${{ env.SHA }} | |
run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_apple_silicon-$DATE-$SHA" >> $GITHUB_ENV | |
- name: write version to file | |
run: ./ci/write_version.sh | |
- name: build nightly release | |
run: cargo build --locked --profile=release-with-lto --bin roc --bin roc_ls | |
- name: package release | |
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} | |
- name: delete everything except the tar | |
run: ls | grep -v "roc_nightly.*tar\.gz" | xargs rm -rf | |
- name: extract tar for a quick test | |
run: ls | grep tar | xargs tar -xf | |
- name: test with rust platform | |
run: cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc examples/platform-switching/rocLovesRust.roc | |
- name: print short commit SHA | |
run: git rev-parse --short "$GITHUB_SHA" | |
- name: print date | |
run: date | |
- name: Upload artifact Actually uploading to github releases has to be done manually | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz | |
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz | |
retention-days: 4 |