Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor host into crate #194

Merged
merged 51 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6c7b159
refactor to support surgical linker builds
lukewilliamboswell Apr 30, 2024
48930ce
chore: cargo clippy and fmt
lukewilliamboswell Jul 2, 2024
cb26c57
restore flake
lukewilliamboswell Jul 2, 2024
2b84a72
fix: restore rust-toolchain.toml
lukewilliamboswell Jul 3, 2024
24f4d21
fix: add --prebuilt-platform flag to CI
lukewilliamboswell Jul 3, 2024
3996094
fix: add build step to nix CI
lukewilliamboswell Jul 3, 2024
e749cda
feat: add --release to build script
lukewilliamboswell Jul 3, 2024
d2a434d
chore: cleanup build.roc script
lukewilliamboswell Jul 3, 2024
af35039
try print pwd
lukewilliamboswell Jul 3, 2024
c1f4198
fix: missing file extension on macos-x64.a library
lukewilliamboswell Jul 3, 2024
2cf4da5
feat: improve workspace and path manage for build scripts
lukewilliamboswell Jul 3, 2024
13ef211
try: ls -al on ./
lukewilliamboswell Jul 3, 2024
0dfa57a
try: moving rust_platform.toml
lukewilliamboswell Jul 3, 2024
244fb62
try: building in release mode
lukewilliamboswell Jul 3, 2024
d76f49d
fix: incorrect --path arg to build script
lukewilliamboswell Jul 3, 2024
ed9afc4
remove unused glue script
lukewilliamboswell Jul 3, 2024
e819d57
fix: path.roc being called incorectly
lukewilliamboswell Jul 3, 2024
1e3ab8f
ls -R
Anton-4 Jul 3, 2024
245ebd7
feat: pass argument to roc cli into build script
lukewilliamboswell Jul 3, 2024
614f2d5
chore: cleanup CI debugging things
lukewilliamboswell Jul 3, 2024
f8c8d0a
chore: update flake to latest nightly
lukewilliamboswell Jul 3, 2024
0a28ce9
small improvements
Anton-4 Jul 3, 2024
6bcdd66
add build steps diagram
lukewilliamboswell Jul 4, 2024
e0ba5e8
fix typo
lukewilliamboswell Jul 4, 2024
dfeb68a
add more documentation
lukewilliamboswell Jul 4, 2024
a88459b
Merge remote-tracking branch 'remote/main' into refactor-host
lukewilliamboswell Jul 7, 2024
9017380
use updated basic-cli 0.12.0
Anton-4 Jul 9, 2024
8ad3179
update for new glue & 6894
lukewilliamboswell Jul 14, 2024
5d82453
Merge remote-tracking branch 'remote/main' into refactor-host & updat…
lukewilliamboswell Jul 14, 2024
b61cee6
update flake
lukewilliamboswell Jul 14, 2024
a5c0f0b
update build.roc arg parsing
lukewilliamboswell Jul 14, 2024
d440b8d
use generic legacy host, and legacy linker
lukewilliamboswell Jul 14, 2024
e90f13a
minor improvements
Anton-4 Jul 15, 2024
df631ca
remove linker flag in all_tests CI script
lukewilliamboswell Jul 15, 2024
f0508f5
put linker flag back in
lukewilliamboswell Jul 15, 2024
1414383
try fixing call to roc in CI
lukewilliamboswell Jul 15, 2024
1554614
leave linker flag out
lukewilliamboswell Jul 15, 2024
56f87eb
add prebuilt-platform when building script on linux
lukewilliamboswell Jul 16, 2024
1e850f3
add Path.tmpDir
lukewilliamboswell Jul 16, 2024
07788da
change to Path
lukewilliamboswell Jul 16, 2024
9c924be
remove accidental export in Dir.roc
lukewilliamboswell Jul 16, 2024
797a802
back to normal hello-world
Anton-4 Jul 16, 2024
caad27b
make tempDir return Path
Anton-4 Jul 16, 2024
9b95e9c
Merge branch 'main' into refactor-host
Anton-4 Jul 16, 2024
212b85a
remove prebuilt-platform for build.roc
Anton-4 Jul 16, 2024
57b6041
get rid --release
Anton-4 Jul 16, 2024
b30c358
Merge branch 'refactor-host' of github.com:roc-lang/basic-cli into re…
Anton-4 Jul 16, 2024
6807b5b
add jump-start
Anton-4 Jul 16, 2024
de3613a
env.roc got renamed
Anton-4 Jul 16, 2024
1ef5488
skip roc dev env-var.roc
Anton-4 Jul 16, 2024
e44553a
allow jump-start to take ROC env var
Anton-4 Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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