Skip to content

Commit

Permalink
Merge branch 'refactor-host' of github.com:roc-lang/basic-cli into de…
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
roboteng committed Jul 5, 2024
2 parents d8f6860 + dfeb68a commit 5192bb3
Show file tree
Hide file tree
Showing 30 changed files with 653 additions and 258 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on:
on:
pull_request:
workflow_dispatch:

Expand All @@ -8,7 +8,6 @@ concurrency:
cancel-in-progress: true

jobs:

build-and-test-native:
runs-on: ${{ matrix.operating-system }}
strategy:
Expand All @@ -19,12 +18,12 @@ jobs:

- name: Does init() in platform/src/lib.rs contain all roc_fx functions? (Imperfect check)
run: cat platform/src/lib.rs | grep -oP 'roc_fx_[^(\s]*' | sort | uniq -u | grep -q . && exit 1 || exit 0

- id: try_fetching_testing_release
continue-on-error: true
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-TESTING.tar.gz
- name: There are no TESTING releases, checking regular releases instead
if: steps.try_fetching_testing_release.outcome == 'failure'
run: |
Expand Down Expand Up @@ -58,6 +57,3 @@ jobs:
# Workaround for https://github.com/roc-lang/roc/issues/6688
- name: Check if crash occurred
run: grep -zqv "crashed" all_tests_output.log

# TODO clippy, rustfmt, roc fmt check

76 changes: 37 additions & 39 deletions .github/workflows/ci_nix.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
on:
pull_request:
workflow_dispatch:
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
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test-nix:
strategy:
fail-fast: false
matrix:
# macos-12 uses x86-64 machine, macos-14 uses aarch64
os: [ macos-12, macos-14, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

# install nix
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable

- uses: cachix/cachix-action@v12
with:
name: enigmaticsunrise
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: print architecture
run: uname -m

- name: Run all tests
run: nix develop -c sh -c 'export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh'

- name: Run all tests and capture output to check for crash later
run: nix develop -c sh -c 'export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh 2>&1 | tee all_tests_output.log'

# Workaround for https://github.com/roc-lang/roc/issues/6688
- name: Check if crash occurred
run: grep -qv "crashed" all_tests_output.log


build-and-test-nix:
strategy:
fail-fast: false
matrix:
# macos-12 uses x86-64 machine, macos-14 uses aarch64
os: [macos-12, macos-14, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

# install nix
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable

- uses: cachix/cachix-action@v12
with:
name: enigmaticsunrise
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: print architecture
run: uname -m

- name: Run all tests
run: nix develop -c sh -c 'export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh'

- name: Run all tests and capture output to check for crash later
run: nix develop -c sh -c 'export ROC=roc && export EXAMPLES_DIR=./examples/ && ./ci/all_tests.sh 2>&1 | tee all_tests_output.log'

# Workaround for https://github.com/roc-lang/roc/issues/6688
- name: Check if crash occurred
run: grep -qv "crashed" all_tests_output.log
3 changes: 1 addition & 2 deletions .github/workflows/test_latest_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ concurrency:
cancel-in-progress: true

jobs:

test-latest-release:
runs-on: [ubuntu-20.04]
steps:
Expand All @@ -26,6 +25,6 @@ jobs:

- name: Use ./ci/test_latest_release.sh of the latest git main
run: mv -f ./temp/test_latest_release.sh ./ci/

- name: Run all tests with latest roc release + latest basic-cli release
run: EXAMPLES_DIR=./examples/ ./ci/test_latest_release.sh
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ all_tests_output.log
platform/*.a

ci/file-testBROKEN

# glue generated files
crates/roc_std

# build script artifacts
build
Binary file added 20240704-basic-cli-build-steps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5192bb3

Please sign in to comment.