mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
on:
|
|
# pull_request:
|
|
workflow_dispatch:
|
|
|
|
# this cancels workflows currently in progress if you start a new one
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
# Do not add permissions here! Configure them at the job level!
|
|
permissions: {}
|
|
|
|
jobs:
|
|
test-basic-cli-release-arm64:
|
|
runs-on: [self-hosted, Linux, ARM64]
|
|
steps:
|
|
- name: clone basic-cli repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: roc-lang/basic-cli
|
|
ref: main
|
|
|
|
- name: get latest roc nightly
|
|
run: |
|
|
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
|
|
|
|
- name: rename nightly tar
|
|
run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
|
|
|
|
- name: decompress the tar
|
|
run: tar -xzf roc_nightly.tar.gz
|
|
|
|
- run: rm roc_nightly.tar.gz
|
|
|
|
- name: simplify nightly folder name
|
|
run: mv roc_nightly* roc_nightly
|
|
|
|
- run: ./roc_nightly/roc version
|
|
|
|
- run: expect -v
|
|
|
|
# Run all tests
|
|
- run: ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
|
|
|
|
######
|
|
# Now test the latest basic-cli release, not the main branch
|
|
######
|
|
|
|
- name: Remove roc_nightly folder to keep things simple (we'll download it again later)
|
|
run: rm -rf roc_nightly
|
|
|
|
- name: Get the repo of the latest basic-cli release
|
|
run: |
|
|
git clone --depth 1 https://github.com/roc-lang/basic-cli
|
|
cd basic-cli
|
|
git fetch --tags
|
|
latestTag=$(git describe --tags $(git rev-list --tags --max-count=1))
|
|
git checkout $latestTag
|
|
# remove things that don't work on musl
|
|
rm ./examples/file-accessed-modified-created-time.roc
|
|
sed -i.bak -e '/time_accessed!,$/d' -e '/time_modified!,$/d' -e '/time_created!,$/d' -e '/^time_accessed!/,/^$/d' -e '/^time_modified!/,/^$/d' -e '/^time_created!/,/^$/d' -e '/^import Utc exposing \[Utc\]$/d' ./platform/File.roc
|
|
rm ./platform/File.roc.bak
|
|
sed -i 's/x86_64/arm64/g' ./ci/test_latest_release.sh
|
|
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} EXAMPLES_DIR=./examples/ ./ci/test_latest_release.sh
|