roc/.github/workflows/nightly_macos_apple_silicon.yml

67 lines
2.0 KiB
YAML
Raw Normal View History

on:
2023-01-25 17:51:20 +03:00
workflow_dispatch:
schedule:
- cron: '0 9 * * *'
2022-06-17 19:02:04 +03:00
2022-06-24 16:32:28 +03:00
name: Nightly Release macOS Apple Silicon
2022-06-17 20:36:17 +03:00
2022-06-17 19:02:04 +03:00
jobs:
2022-06-17 20:36:17 +03:00
test-and-build:
name: Rust tests, build and package nightly release
2022-06-17 19:02:04 +03:00
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
2022-06-17 19:02:04 +03:00
- name: zig version
run: zig version
- name: llvm version
2022-06-17 21:05:47 +03:00
run: llc --version | grep LLVM
2022-08-19 15:43:40 +03:00
- name: run tests
2022-07-08 05:23:44 +03:00
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 }}
2023-01-17 13:28:08 +03:00
run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_apple_silicon-$DATE-$SHA" >> $GITHUB_ENV
2022-08-19 15:43:40 +03:00
2022-06-17 19:02:04 +03:00
- name: write version to file
2022-06-18 18:10:59 +03:00
run: ./ci/write_version.sh
2022-08-19 15:43:40 +03:00
2022-06-17 19:02:04 +03:00
- name: build nightly release
2023-03-14 18:36:03 +03:00
run: cargo build --locked --profile=release-with-lto --features "editor" --bin roc
2022-08-19 15:43:40 +03:00
2023-02-18 13:13:47 +03:00
# this makes the roc binary a lot smaller
- name: strip debug info
run: strip ./target/release-with-lto/roc
2023-02-18 13:13:47 +03:00
2022-06-17 19:02:04 +03:00
- name: package release
2023-01-17 13:28:08 +03:00
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }}
2022-06-17 19:02:04 +03:00
2023-01-25 16:31:56 +03:00
- 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
2023-01-25 16:41:21 +03:00
- name: test with rust platform
run: cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc examples/platform-switching/rocLovesRust.roc
2023-01-25 16:31:56 +03:00
2022-08-19 15:43:40 +03:00
- 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:
2023-01-20 13:20:19 +03:00
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
2022-08-19 15:43:40 +03:00
retention-days: 4