-
-
Notifications
You must be signed in to change notification settings - Fork 320
72 lines (56 loc) · 2.15 KB
/
nightly_macos_apple_silicon.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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]
env:
LIBRARY_PATH: /opt/homebrew/Cellar/zstd/1.5.6/lib
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Update PATH to use zig 11
run: |
echo "PATH=/Users/m1ci/Downloads/zig-macos-aarch64-0.11.0:$PATH" >> $GITHUB_ENV
- run: zig version
- 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_language_server
- 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 zig platform
run: |
cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc --build-host --suppress-build-host-warning examples/platform-switching/rocLovesZig.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@v4
with:
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
retention-days: 4