fix basic-cli arm64 linux tests #199
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 | |
- name: Run all tests on the main branch of basic-cli | |
run: ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh | |
###### | |
# Now test the latest basic-cli release, not the main branch | |
###### | |
- name: Delete nightly to keep things simple, we'll download it again in ./ci/test_latest_release.sh | |
run: rm -rf roc_nightly | |
- name: Get the repo of the latest basic-cli release | |
run: | | |
git clone https://github.com/roc-lang/basic-cli | |
cd basic-cli | |
git checkout linux-arm64-test-debugging | |
# temp for debugging | |
#git fetch --tags | |
## Get the latest tag matching pattern X.Y* | |
#latestTag=$(git for-each-ref --sort=-version:refname --format '%(refname:short)' refs/tags/ | grep -E '^[0-9]+\.[0-9]+.*' | head -n1) | |
#git checkout $latestTag | |
- name: Run all tests with latest roc nightly and latest basic-cli release | |
run: | | |
sed -i 's/x86_64/arm64/g' ./ci/test_latest_release.sh | |
ROC=./roc_nightly/roc EXAMPLES_DIR=./basic-cli/examples/ ./ci/test_latest_release.sh |