Skip to content

Commit

Permalink
Merge branch 'main' into ayaz/optimize-list-literal-alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilliamboswell authored Sep 17, 2024
2 parents 6b04318 + 0149d1e commit 49dedf0
Show file tree
Hide file tree
Showing 424 changed files with 15,751 additions and 10,841 deletions.
3 changes: 2 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rustflags = ["-Clink-args=/FORCE:UNRESOLVED"]
# https://github.com/rust-lang/cargo/issues/3946#issuecomment-973132993
ROC_WORKSPACE_DIR = { value = "", relative = true }

# Debug flags. Keep this up-to-date with compiler/debug_flags/src/lib.rs.
# Debug flags. Explanations for these are in compiler/debug_flags/src/lib.rs.
# Set = "1" to turn a debug flag on.
ROC_PRETTY_PRINT_ALIAS_CONTENTS = "0"
ROC_PRINT_UNIFICATIONS = "0"
Expand All @@ -49,6 +49,7 @@ ROC_PRINT_IR_AFTER_TRMC = "0"
ROC_PRINT_IR_AFTER_DROP_SPECIALIZATION = "0"
ROC_DEBUG_ALIAS_ANALYSIS = "0"
ROC_PRINT_RUNTIME_ERROR_GEN = "0"
ROC_NO_UNBOUND_LAYOUT = "0"
ROC_PRINT_LLVM_FN_VERIFICATION = "0"
ROC_WRITE_FINAL_WASM = "0"
ROC_LOG_WASM_INTERP = "0"
Expand Down
43 changes: 22 additions & 21 deletions .github/workflows/basic_cli_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.12.0
RELEASE_TAG: 0.14.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 All @@ -60,16 +60,16 @@ jobs:
- name: build basic-cli with surgical linker and also with legacy linker
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: ./ci/build_basic_cli.sh linux_x86_64 "--linker legacy"
run: ./ci/build_basic_cli.sh linux_x86_64

- name: Save .rh, .rm and .o file
- name: Save .rh, .rm and .a file
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-files
path: |
basic-cli/platform/metadata_linux-x64.rm
basic-cli/platform/linux-x64.rh
basic-cli/platform/linux-x64.o
basic-cli/platform/linux-x64.a
build-linux-arm64-files:
Expand All @@ -89,12 +89,12 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_cli.sh linux_arm64

- name: Save .o file
- name: Save .a file
uses: actions/upload-artifact@v4
with:
name: linux-arm64-files
path: |
basic-cli/platform/linux-arm64.o
basic-cli/platform/linux-arm64.a
build-macos-x86_64-files:
runs-on: [macos-12] # I expect the generated files to work on macOS 12 and up
Expand All @@ -107,15 +107,15 @@ jobs:

- run: ./ci/build_basic_cli.sh macos_x86_64

- name: Save .o files
- name: Save .a file
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-files
path: |
basic-cli/platform/macos-x64.o
basic-cli/platform/macos-x64.a
build-macos-apple-silicon-files:
name: build apple silicon .o file
name: build apple silicon .a file
runs-on: [self-hosted, macOS, ARM64]
needs: [prepare]
steps:
Expand All @@ -126,12 +126,12 @@ jobs:

- run: ./ci/build_basic_cli.sh macos_apple_silicon

- name: Save macos-arm64.o file
- name: Save macos-arm64.a file
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-files
path: |
basic-cli/platform/macos-arm64.o
basic-cli/platform/macos-arm64.a
create-release-archive:
needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files]
Expand Down Expand Up @@ -250,10 +250,11 @@ jobs:
git checkout ${{ env.RELEASE_TAG }}
cp -r examples ../..
cp -r ci ../..
cp -r LICENSE ../..
# LICENSE is necessary for command test
cp -r LICENSE ../..
- name: run tests
run: |
cd basic-cli-platform
ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ROC_BUILD_FLAGS=--prebuilt-platform ./ci/all_tests.sh
# no need to build platform anymore
NO_BUILD=1 ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
24 changes: 12 additions & 12 deletions .github/workflows/basic_webserver_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
env:
# use .tar.gz for quick testing
ARCHIVE_FORMAT: .tar.br
BASIC_WEBSERVER_BRANCH: main
RELEASE_TAG: 0.8.0

jobs:
fetch-releases:
Expand Down Expand Up @@ -46,16 +46,16 @@ jobs:
- name: build basic-webserver with legacy linker
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: ./ci/build_basic_webserver.sh linux_x86_64 "--linker legacy"
run: ./ci/build_basic_webserver.sh linux_x86_64

- name: Save .rh, .rm and .o file
- name: Save .rh, .rm and .a file
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-files
path: |
basic-webserver/platform/metadata_linux-x64.rm
basic-webserver/platform/linux-x64.rh
basic-webserver/platform/linux-x64.o
basic-webserver/platform/linux-x64.a
build-linux-arm64-files:
Expand All @@ -75,12 +75,12 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_webserver.sh linux_arm64

- name: Save .o file
- name: Save .a file
uses: actions/upload-artifact@v4
with:
name: linux-arm64-files
path: |
basic-webserver/platform/linux-arm64.o
basic-webserver/platform/linux-arm64.a
build-macos-x86_64-files:
runs-on: [macos-12] # I expect the generated files to work on macOS 12 and up
Expand All @@ -93,15 +93,15 @@ jobs:

- run: ./ci/build_basic_webserver.sh macos_x86_64

- name: Save .o files
- name: Save .a files
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-files
path: |
basic-webserver/platform/macos-x64.o
basic-webserver/platform/macos-x64.a
build-macos-apple-silicon-files:
name: build apple silicon .o file
name: build apple silicon .a file
runs-on: [self-hosted, macOS, ARM64]
needs: [fetch-releases]
steps:
Expand All @@ -112,12 +112,12 @@ jobs:

- run: ./ci/build_basic_webserver.sh macos_apple_silicon

- name: Save macos-arm64.o file
- name: Save macos-arm64.a file
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-files
path: |
basic-webserver/platform/macos-arm64.o
basic-webserver/platform/macos-arm64.a
create-release-archive:
needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files]
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- run: |
git clone https://github.com/roc-lang/basic-webserver.git
cd basic-webserver
git checkout ${{ env.BASIC_WEBSERVER_BRANCH }}
git checkout ${{ env.RELEASE_TAG }}
cd ..
- run: cp macos-apple-silicon-files/* ./basic-webserver/platform
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ jobs:
if: needs.check-changes.outputs.run_tests == 'full'
uses: ./.github/workflows/ubuntu_x86_64.yml

start-ubuntu-x86-64-tests-debug:
start-ubuntu-x86-64-nix-tests-debug:
needs: check-changes
if: needs.check-changes.outputs.run_tests == 'full'
uses: ./.github/workflows/ubuntu_x86_64_debug.yml
uses: ./.github/workflows/ubuntu_x86_64_nix_debug.yml

start-windows-release-build-test:
needs: check-changes
Expand All @@ -133,7 +133,7 @@ jobs:
start-nix-macos-apple-silicon-tests,
start-macos-x86-64-tests,
start-ubuntu-x86-64-tests,
start-ubuntu-x86-64-tests-debug,
start-ubuntu-x86-64-nix-tests-debug,
start-windows-release-build-test,
start-windows-tests,
start-roc-benchmarks
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
on:
workflow_dispatch:
# pull_request:
# TODO remove pull_request trigger

name: Docker images tests

Expand All @@ -15,10 +17,10 @@ jobs:
run: cp docker/nightly-ubuntu-latest/docker-compose.example.yml docker/nightly-ubuntu-latest/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-ubuntu-latest/docker-compose.yml build
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
run: docker compose -f docker/nightly-ubuntu-latest/docker-compose.yml run roc examples/helloWorld.roc


nightly-ubuntu-2204:
Expand All @@ -32,10 +34,10 @@ jobs:
run: cp docker/nightly-ubuntu-2204/docker-compose.example.yml docker/nightly-ubuntu-2204/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-ubuntu-2204/docker-compose.yml build
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
run: docker compose -f docker/nightly-ubuntu-2204/docker-compose.yml run roc examples/helloWorld.roc

nightly-ubuntu-2004:
name: nightly-ubuntu-2004
Expand All @@ -48,10 +50,10 @@ jobs:
run: cp docker/nightly-ubuntu-2004/docker-compose.example.yml docker/nightly-ubuntu-2004/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-ubuntu-2004/docker-compose.yml build
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
run: docker compose -f docker/nightly-ubuntu-2004/docker-compose.yml run roc examples/helloWorld.roc

nightly-debian-latest:
name: nightly-debian-latest
Expand All @@ -64,10 +66,10 @@ jobs:
run: cp docker/nightly-debian-latest/docker-compose.example.yml docker/nightly-debian-latest/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-debian-latest/docker-compose.yml build
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
run: docker compose -f docker/nightly-debian-latest/docker-compose.yml run roc examples/helloWorld.roc

nightly-debian-bookworm:
name: nightly-debian-bookworm
Expand All @@ -80,10 +82,10 @@ jobs:
run: cp docker/nightly-debian-bookworm/docker-compose.example.yml docker/nightly-debian-bookworm/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-debian-bookworm/docker-compose.yml build
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
run: docker compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc examples/helloWorld.roc

nightly-debian-buster:
name: nightly-debian-buster
Expand All @@ -96,7 +98,7 @@ jobs:
run: cp docker/nightly-debian-buster/docker-compose.example.yml docker/nightly-debian-buster/docker-compose.yml

- name: Build image
run: docker-compose -f docker/nightly-debian-buster/docker-compose.yml build
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
run: docker compose -f docker/nightly-debian-buster/docker-compose.yml run roc examples/helloWorld.roc
2 changes: 1 addition & 1 deletion .github/workflows/test_nightly_many_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-13, ubuntu-20.04, ubuntu-22.04 ]
os: [ macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 90
steps:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/ubuntu_x86_64_debug.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/ubuntu_x86_64_nix_debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_call:

name: cargo test debug nix

env:
RUST_BACKTRACE: 1

jobs:
cargo-test-debug-nix:
name: cargo test debug nix
runs-on: [ubuntu-22.04]
timeout-minutes: 90
steps:
- uses: actions/checkout@v4

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

- name: Check if debug flag files are in sync
run: ./ci/check_debug_vars.sh

# 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'
Loading

0 comments on commit 49dedf0

Please sign in to comment.