mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 23:37:56 +03:00
macos m1 nightly cron tests
This commit is contained in:
parent
0f3c38e2e1
commit
0be3ec13c9
29
.github/workflows/test_nightlies.yml
vendored
Normal file
29
.github/workflows/test_nightlies.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
on: [pull_request]
|
||||
# schedule:
|
||||
# - cron: '0 15 * * *'
|
||||
|
||||
name: Test latest nightly release for macOS Apple Silicon
|
||||
|
||||
jobs:
|
||||
test-and-build:
|
||||
name: test nightly macos aarch64
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
name: fetch releases data and save to file
|
||||
run: curl https://api.github.com/repos/roc-lang/roc/releases > roc_releases.json
|
||||
|
||||
name: get the url of today's release for macos apple silicon
|
||||
run: echo "RELEASE_URL=$(./ci/get_latest_release.sh)" >> $GITHUB_ENV
|
||||
|
||||
name: get the archive from the url
|
||||
run: curl -OL ${{ env.RELEASE_URL }}
|
||||
|
||||
name: decompress the tar
|
||||
run: ls | grep tar | xargs tar -xzvf
|
||||
|
||||
name: test roc hello world
|
||||
run: ./roc examples/hello-world/main.roc
|
||||
|
||||
|
||||
|
13
ci/get_latest_release_url.sh
Executable file
13
ci/get_latest_release_url.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# assumes roc_releases.json is present
|
||||
|
||||
LATEST_RELEASE_URL=`cat roc_releases.json | jq --arg today $(date +'%Y-%m-%d') '.[0] | .assets | map(.browser_download_url) | map(select(. | contains("silicon-\($today)"))) | .[0]'`
|
||||
|
||||
if [[ "$LATEST_RELEASE_URL" == "null" ]]
|
||||
then
|
||||
echo "I expected to get a url but I got null instead. Today's release may not have been uploaded?"
|
||||
exit 1
|
||||
else
|
||||
echo $LATEST_RELEASE_URL | sed s/\"//g
|
||||
fi
|
Loading…
Reference in New Issue
Block a user