mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
Merge pull request #3968 from roc-lang/macos_x86_nightly_test
Macos x86_64 nightly testing
This commit is contained in:
commit
cc16ac2955
@ -5,7 +5,7 @@ on:
|
||||
name: Test latest nightly release for macOS Apple Silicon
|
||||
|
||||
jobs:
|
||||
test-and-build:
|
||||
test-nightly:
|
||||
name: test nightly macos aarch64
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
timeout-minutes: 90
|
||||
@ -16,7 +16,7 @@ jobs:
|
||||
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_url.sh)" >> $GITHUB_ENV
|
||||
run: echo "RELEASE_URL=$(./ci/get_latest_release_url.sh silicon)" >> $GITHUB_ENV
|
||||
|
||||
- name: get the archive from the url
|
||||
run: curl -OL ${{ env.RELEASE_URL }}
|
34
.github/workflows/test_nightly_macos_x86_64.yml
vendored
Normal file
34
.github/workflows/test_nightly_macos_x86_64.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 13 * * *'
|
||||
|
||||
name: Test latest nightly release for macOS x86_64
|
||||
|
||||
jobs:
|
||||
test-nightly:
|
||||
name: test nightly macos x86_64
|
||||
runs-on: [ macos-12 ]
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- 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_url.sh macos_x86_64)" >> $GITHUB_ENV
|
||||
|
||||
- name: get the archive from the url
|
||||
run: curl -OL ${{ env.RELEASE_URL }}
|
||||
|
||||
- name: remove everything in this dir except the tar # 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" | xargs rm -rf
|
||||
|
||||
- name: decompress the tar
|
||||
run: ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf
|
||||
|
||||
- name: test roc hello world
|
||||
run: ./roc examples/hello-world/main.roc
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# 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]'`
|
||||
LATEST_RELEASE_URL=`cat roc_releases.json | jq --arg arch $1 --arg today $(date +'%Y-%m-%d') '.[0] | .assets | map(.browser_download_url) | map(select(. | contains("\($arch)-\($today)"))) | .[0]'`
|
||||
|
||||
if [[ "$LATEST_RELEASE_URL" == "null" ]]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user