roc/.github/workflows/test_nightly_macos_apple_silicon.yml
2024-01-27 10:57:53 -05:00

48 lines
1.6 KiB
YAML

on:
workflow_dispatch:
name: Test latest nightly release for macOS Apple Silicon
jobs:
test-nightly:
name: test nightly macos aarch64
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: get the latest release archive
run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz
- name: remove everything in this dir except the tar and ci folder # we want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout
run: ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs rm -rf
- name: decompress the tar
run: ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf
- name: delete tar
run: ls | grep "roc_nightly.*tar\.gz" | xargs rm -rf
- name: rename nightly folder
run: mv roc_nightly* roc_nightly
- name: test roc hello world
run: cd roc_nightly && ./roc examples/helloWorld.roc
- name: test platform switching rust
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesRust.roc
- name: test platform switching zig
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesZig.roc
- name: test platform switching c
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesC.roc
- name: test repl
run: |
cd ci/repl_basic_test
cargo build --release
cp target/release/repl_basic_test ../../roc_nightly
cd ../../roc_nightly
./repl_basic_test