Skip to content

Commit

Permalink
Merge branch 'main' into hotfix/search-nav
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilliamboswell authored Nov 14, 2024
2 parents 5e28756 + 0804758 commit f5b4f80
Show file tree
Hide file tree
Showing 499 changed files with 10,858 additions and 8,619 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Require roc files to be checked out with Unix line endings, even on windows
*.roc text eol=lf
* text=auto eol=lf

crates/compiler/test_mono/generated/* linguist-generated=true
crates/compiler/test_mono/generated/* linguist-generated=true
20 changes: 10 additions & 10 deletions .github/workflows/basic_cli_build_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
#pull_request:
# pull_request:
workflow_dispatch:

# this cancels workflows currently in progress if you start a new one
Expand All @@ -11,7 +11,7 @@ env:
# use .tar.gz for quick testing
ARCHIVE_FORMAT: .tar.br
# Make a new basic-cli git tag and set it here before starting this workflow
RELEASE_TAG: 0.14.0
RELEASE_TAG: 0.16.0

jobs:
prepare:
Expand All @@ -34,14 +34,14 @@ jobs:
fi
# get latest nightly releases
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-TESTING.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-TESTING.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-TESTING.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-TESTING.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-TESTING.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-TESTING.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-TESTING.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-TESTING.tar.gz

- name: Save roc_nightly archives
uses: actions/upload-artifact@v4
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
workflow_dispatch:
# pull_request:
# TODO remove pull_request trigger
#pull_request:

name: Docker images tests

Expand All @@ -19,8 +18,10 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-ubuntu-latest/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-ubuntu-latest/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-ubuntu-latest/docker-compose.yml run roc main.roc
nightly-ubuntu-2204:
Expand All @@ -36,8 +37,10 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-ubuntu-2204/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-ubuntu-2204/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-ubuntu-2204/docker-compose.yml run roc main.roc
nightly-ubuntu-2004:
name: nightly-ubuntu-2004
Expand All @@ -52,8 +55,10 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-ubuntu-2004/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-ubuntu-2004/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-ubuntu-2004/docker-compose.yml run roc main.roc
nightly-debian-latest:
name: nightly-debian-latest
Expand All @@ -68,8 +73,10 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-debian-latest/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-debian-latest/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-debian-latest/docker-compose.yml run roc main.roc
nightly-debian-bookworm:
name: nightly-debian-bookworm
Expand All @@ -84,8 +91,10 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-debian-bookworm/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc main.roc
nightly-debian-buster:
name: nightly-debian-buster
Expand All @@ -100,5 +109,7 @@ jobs:
- name: Build image
run: docker compose -f docker/nightly-debian-buster/docker-compose.yml build

- name: Run hello world test
run: docker compose -f docker/nightly-debian-buster/docker-compose.yml run roc examples/helloWorld.roc
- name: Test with hello world
run: |
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
docker compose -f docker/nightly-debian-buster/docker-compose.yml run roc main.roc
19 changes: 10 additions & 9 deletions .github/workflows/nightly_macos_apple_silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
#pull_request:
workflow_dispatch:
schedule:
- cron: '0 9 * * *'
- cron: "0 9 * * *"

name: Nightly Release macOS Apple Silicon

Expand Down Expand Up @@ -30,15 +30,15 @@ jobs:
run: cargo test --locked --release

- name: get commit SHA
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV

- name: get date
run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV

- name: build file name
env:
DATE: ${{ env.DATE }}
SHA: ${{ env.SHA }}
DATE: ${{ env.DATE }}
SHA: ${{ env.SHA }}
run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_apple_silicon-$DATE-$SHA" >> $GITHUB_ENV

- name: write version to file
Expand All @@ -56,8 +56,9 @@ jobs:
- name: extract tar for a quick test
run: ls | grep tar | xargs tar -xf

- name: test with rust platform
run: cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc examples/platform-switching/rocLovesRust.roc
- name: test with zig platform
run: |
cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc --build-host --suppress-build-host-warning examples/platform-switching/rocLovesZig.roc
- name: print short commit SHA
run: git rev-parse --short "$GITHUB_SHA"
Expand All @@ -66,6 +67,6 @@ jobs:
- name: Upload artifact Actually uploading to github releases has to be done manually
uses: actions/upload-artifact@v4
with:
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
retention-days: 4
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
retention-days: 4
2 changes: 1 addition & 1 deletion .github/workflows/nix_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: roc test all builtins
run: nix develop -c ./ci/roc_test_builtins.sh

- name: test wasm32 cli_run
- name: test wasm32 cli_tests
run: nix develop -c cargo test --locked --release --features="wasm32-cli-run"

- name: test the dev backend # these tests require an explicit feature flag
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/nix_macos_apple_silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,11 @@ jobs:

# for skipped tests: see issue 6274
- name: execute tests with --release
run: nix develop -c cargo test --locked --release -- --skip cli_run::inspect_gui --skip cli_run::hello_gui
run: nix develop -c cargo test --locked --release -- --skip cli_tests::inspect_gui --skip cli_tests::hello_gui

- name: roc test all builtins
run: nix develop -c ./ci/roc_test_builtins.sh

- name: make a libapp.so for the next step
run: nix develop -c cargo run -- gen-stub-lib examples/platform-switching/rocLovesRust.roc

- name: check that the platform`s produced dylib is loadable
run: cd examples/platform-switching/rust-platform && nix develop -c cargo test --release --locked

- name: test aarch64 dev backend
run: nix develop -c cargo nextest-gen-dev --locked --release --no-fail-fast

Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/nix_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@ jobs:

- uses: cachix/install-nix-action@v22

- name: execute cli_run tests only, the full tests take too long but are run nightly
- name: execute cli_tests tests only, the full tests take too long but are run nightly
run: nix develop -c cargo test --locked --release -p roc_cli -- --skip hello_gui
# see 5932 for hello_gui

- name: roc test all builtins
run: nix develop -c ./ci/roc_test_builtins.sh

- name: make a libapp.so for the next step
run: nix develop -c cargo run -- gen-stub-lib examples/platform-switching/rocLovesRust.roc

- name: check that the platform`s produced dylib is loadable
run: cd examples/platform-switching/rust-platform && nix develop -c cargo test --release --locked
10 changes: 2 additions & 8 deletions .github/workflows/test_nightly_macos_apple_silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ jobs:
- name: rename nightly folder
run: mv roc_nightly* roc_nightly

- name: test roc hello world
run: cd roc_nightly && ./roc examples/helloWorld.roc

- name: test platform switching rust
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesRust.roc

- name: test platform switching zig
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesZig.roc
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesZig.roc --build-host --suppress-build-host-warning

- name: test platform switching c
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesC.roc
run: cd roc_nightly && ./roc examples/platform-switching/rocLovesC.roc --build-host --suppress-build-host-warning

- name: test repl
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ubuntu_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ jobs:

- name: regular rust tests
# see #5904 for skipped test
run: cargo test --locked --release -- --skip cli_run::expects_dev_and_test
run: cargo test --locked --release -- --skip cli_tests::expects_dev_and_test

- name: tests examples in docs
run: cargo test --doc --release

- name: check that the platform`s produced dylib is loadable
run: cd examples/platform-switching/rust-platform && LD_LIBRARY_PATH=. cargo test --release --locked
run: cargo test --doc --release

- name: test the dev backend # these tests require an explicit feature flag
run: cargo test --locked --release --package test_gen --no-default-features --features gen-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu_x86_64_nix_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

# for skipped tests; see #6946, #6947
- name: cargo test without --release
run: nix develop -c sh -c 'export ROC_CHECK_MONO_IR=1 && cargo test -- --skip tests/exhaustive/match_on_result_with_uninhabited_error_destructuring_in_lambda_syntax.txt --skip tests::identity_lambda --skip tests::issue_2300 --skip tests::issue_2582_specialize_result_value --skip tests::sum_lambda'
run: nix develop -c sh -c 'export ROC_CHECK_MONO_IR=1 && cargo test'
33 changes: 8 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
"crates/fs",
"crates/glue",
"crates/cli",
"crates/cli_utils",
"crates/cli_test_utils",
"crates/highlight",
"crates/error_macros",
"crates/reporting",
Expand All @@ -19,7 +19,7 @@ members = [
"crates/roc_std",
"crates/test_utils",
"crates/test_utils_dir",
"crates/valgrind",
"crates/valgrind_tests",
"crates/tracing",
"crates/utils/*",
"crates/soa",
Expand Down Expand Up @@ -173,7 +173,6 @@ schemars = "0.8.12"
serde = { version = "1.0.153", features = [
"derive",
] } # update roc_std/Cargo.toml on change
serde-xml-rs = "0.6.0"
serde_json = "1.0.94" # update roc_std/Cargo.toml on change
serial_test = "1.0.0"
signal-hook = "0.3.15"
Expand Down
Loading

0 comments on commit f5b4f80

Please sign in to comment.