Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
6ba1155
initial migration - support just Sdout and native target
lukewilliamboswell Dec 30, 2025
b1f3ce5
migrate Env and File effects, examples and tests
lukewilliamboswell Dec 30, 2025
5779c84
migrate test script
lukewilliamboswell Dec 30, 2025
c2b3e05
migrate command line example and test
lukewilliamboswell Dec 30, 2025
519d2af
add linux binaries libc and libunwind
lukewilliamboswell Dec 30, 2025
4774794
add linux CRT files
lukewilliamboswell Dec 30, 2025
08e14d4
migrate print-test
lukewilliamboswell Dec 30, 2025
e914e0a
migrate Dir functionality
lukewilliamboswell Dec 30, 2025
41f75f5
migrate Path
lukewilliamboswell Dec 30, 2025
3e6246a
update CI
lukewilliamboswell Dec 30, 2025
4f62b3b
improve error handling, use open tag union
lukewilliamboswell Dec 30, 2025
1fcef27
implement Random, Sleep, Utc modules
lukewilliamboswell Dec 30, 2025
953ed5f
migrate Cmd
lukewilliamboswell Dec 31, 2025
8c951de
fix some things
lukewilliamboswell Jan 5, 2026
1b6f5c6
remove Path.type! due to opaque type ABI issue
lukewilliamboswell Jan 5, 2026
49eb5d0
Restructure Cmd module and clean up orphaned tests
lukewilliamboswell Jan 5, 2026
73ca5fa
Update Cmd module to use static dispatch for effects
lukewilliamboswell Jan 7, 2026
41f87a4
Delete test-cmd-method-chaining
lukewilliamboswell Jan 7, 2026
6db4a74
Make Cmd an opaque nominal type
lukewilliamboswell Jan 7, 2026
c1d5baf
remove nix for now
lukewilliamboswell Jan 7, 2026
912b156
Fix command-line argument handling for static library builds
lukewilliamboswell Jan 7, 2026
4179f25
Use c_char instead of i8 for cross-platform compatibility
lukewilliamboswell Jan 7, 2026
b919143
Fix SIGPIPE error in release workflow on Linux
lukewilliamboswell Jan 7, 2026
f538094
Add explicit permissions blocks to CI workflows
lukewilliamboswell Jan 7, 2026
28a376e
small CI improvements
Anton-4 Jan 7, 2026
188e1b5
same setup-zig version everywhere
Anton-4 Jan 7, 2026
c0d20d9
use flaky-retry action
Anton-4 Jan 8, 2026
8fd545b
Cargo.toml improvements
Anton-4 Jan 8, 2026
070b8b3
gitignore binary files without extension
Anton-4 Jan 12, 2026
8c1135c
bundle include THIRD_PARTY_LICENSES.md #417
Anton-4 Jan 12, 2026
43cdaf5
use commit for latest nightly
Anton-4 Jan 12, 2026
2b4c74f
use nightly roc
Anton-4 Jan 12, 2026
7532209
fix: print bundle.sh output before failing in CI
Anton-4 Jan 13, 2026
634720e
fix: use relative path for THIRD_PARTY_LICENSES.md in bundle
Anton-4 Jan 13, 2026
03e94ad
fix: copy THIRD_PARTY_LICENSES.md into platform dir for bundling
Anton-4 Jan 13, 2026
a2e0191
Add Tty and Locale modules (#418)
codegod100 Jan 24, 2026
6ff2359
Upgrade Roc glue and CI harness
lukewilliamboswell Jun 25, 2026
2305a8e
Port API updates to migrate zig compiler
lukewilliamboswell Jun 25, 2026
e25412e
Merge pull request #423 from roc-lang/migrate-zig-compiler-edits
lukewilliamboswell Jun 25, 2026
80ee298
Clean up migrate zig compiler branch
lukewilliamboswell Jun 25, 2026
b5aa0d9
Prepare migrated platform for release CI
lukewilliamboswell Jun 25, 2026
0b8f3e1
Pin Roc glue alias generator
lukewilliamboswell Jun 25, 2026
49a072d
Re-port SQLite to the flat platform
lukewilliamboswell Jun 26, 2026
8892a8f
Re-port TCP to the flat platform
lukewilliamboswell Jun 26, 2026
f4cf66b
Explore HTTP port to the flat platform (musl validated)
lukewilliamboswell Jun 26, 2026
c7348c6
Finish HTTP port: e2e example, test server, expect test
lukewilliamboswell Jun 26, 2026
662305d
Adopt roc-lang/http package; decouple CI from pinned roc commit
lukewilliamboswell Jun 27, 2026
818c207
Pin CI to a specific roc nightly; regen glue for 08aae15
lukewilliamboswell Jun 27, 2026
6a9ae91
Add JSON HTTP helper
lukewilliamboswell Jun 28, 2026
f8ba1c1
Restore buffered file reader example
lukewilliamboswell Jun 28, 2026
0e1887f
Restore terminal snake example
lukewilliamboswell Jun 29, 2026
862b33a
Restore platform docs publishing
lukewilliamboswell Jun 29, 2026
ac29ceb
Adopt shared Path package
lukewilliamboswell Jun 29, 2026
8517a0e
Refactor host effects and examples
lukewilliamboswell Jul 6, 2026
2fa15ba
Update http package to 1.0.0
lukewilliamboswell Jul 6, 2026
08e7b7d
Apply Roc style guide cleanups
lukewilliamboswell Jul 6, 2026
f11245f
Resolve release readiness backlog
lukewilliamboswell Jul 6, 2026
eb44be8
Address PR review feedback
lukewilliamboswell Jul 7, 2026
a43cc48
Split host implementation into modules
lukewilliamboswell Jul 7, 2026
cfc1b27
Use setup-roc action in CI
lukewilliamboswell Jul 7, 2026
664693c
Restore example expect coverage
lukewilliamboswell Jul 7, 2026
1ca17fa
Re-enable TCP expect test
lukewilliamboswell Jul 7, 2026
6382482
Re-enable Env expect test
lukewilliamboswell Jul 7, 2026
deac032
Re-enable File expect test
lukewilliamboswell Jul 7, 2026
d1100e9
Re-enable Path expect test
lukewilliamboswell Jul 7, 2026
c3c60aa
Re-enable SQLite expect test
lukewilliamboswell Jul 7, 2026
c6eb30e
Re-enable UTC expect test
lukewilliamboswell Jul 7, 2026
5797e18
Re-enable URL expect test
lukewilliamboswell Jul 7, 2026
d227ec0
Document remaining expect coverage blockers
lukewilliamboswell Jul 7, 2026
dbbdce5
Tighten expect coverage restoration
lukewilliamboswell Jul 7, 2026
b4386c8
Focus TODO on PR merge blockers
lukewilliamboswell Jul 7, 2026
2ab631f
Use builtin JSON dispatch in HTTP helpers
lukewilliamboswell Jul 7, 2026
daade21
Let examples bubble structured errors
lukewilliamboswell Jul 7, 2026
3ebf1f7
Use OsStr for native platform strings
lukewilliamboswell Jul 7, 2026
547883b
Document release candidate blockers
lukewilliamboswell Jul 13, 2026
87cc179
Adopt shared release package actions
lukewilliamboswell Jul 13, 2026
af722bd
Support bundled tests on macOS Bash
lukewilliamboswell Jul 13, 2026
0e66e4a
Use an available port for bundle tests
lukewilliamboswell Jul 13, 2026
5c21791
Add Windows x64 platform coverage
lukewilliamboswell Jul 13, 2026
f7e9162
Bundle Windows system import libraries
lukewilliamboswell Jul 13, 2026
49005f4
Remove resolved release blockers
lukewilliamboswell Jul 13, 2026
f4ab0b8
Pin Rust and retire resolved compiler workarounds
lukewilliamboswell Jul 13, 2026
6d74362
Delete TODO.md
lukewilliamboswell Jul 13, 2026
52dcf27
Restore environment and public release APIs
lukewilliamboswell Jul 13, 2026
3938c20
Consolidate scripts and add spec-driven tests
lukewilliamboswell Jul 13, 2026
3e9e4b9
Update test_spec.json
lukewilliamboswell Jul 13, 2026
38a8c34
Make examples the cross-target test suite
lukewilliamboswell Jul 13, 2026
4b05251
Stabilize cross-platform example runs
lukewilliamboswell Jul 13, 2026
d64ebd0
Make example checks directly executable
lukewilliamboswell Jul 13, 2026
63ed39e
Use nightly Roc formatting
lukewilliamboswell Jul 13, 2026
1277341
Use IPv4 loopback in HTTP examples
lukewilliamboswell Jul 13, 2026
13773b7
Emit UTF-8 from the example runner
lukewilliamboswell Jul 13, 2026
f9be88a
Skip broken Windows time runtime
lukewilliamboswell Jul 13, 2026
61d8db2
Handle macOS PTY EOF
lukewilliamboswell Jul 13, 2026
b75d988
Preserve LF when rewriting example URLs
lukewilliamboswell Jul 13, 2026
219876f
Update contributor setup and Roc formatting
lukewilliamboswell Jul 13, 2026
297a8cb
ci: trigger pipeline rerun
lukewilliamboswell Jul 14, 2026
e4806b6
Vendor Path implementation
lukewilliamboswell Jul 14, 2026
fc13681
Refactor platform APIs around resources
lukewilliamboswell Jul 15, 2026
210009f
Add nominal Locale type
lukewilliamboswell Jul 15, 2026
41cc51a
Add validated URL type
lukewilliamboswell Jul 15, 2026
65bb37b
Add nominal API helpers and documentation
lukewilliamboswell Jul 15, 2026
b6bf3f6
Expand nominal helpers and platform validation
lukewilliamboswell Jul 15, 2026
930f57f
Remove platform codec derivations pending compiler fix
lukewilliamboswell Jul 15, 2026
330b8c4
Improve Windows support for host, tests, and CI
lukewilliamboswell Jul 14, 2026
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
172 changes: 109 additions & 63 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,124 @@
name: CI

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

# Do not add permissions here! Configure them at the job level!
permissions: {}

jobs:
build-and-test-native:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-15]
validate:
name: validate sources
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- 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

- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
- uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # ratchet:mlugg/setup-zig@v2.0.5
with:
# Note: nightly hashes are not verified because they are updated regularly.
version: nightly

- run: roc version

- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt install -y expect ncat ripgrep

- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos-')
run: |
brew install expect # expect for testing
brew install nmap # includes ncat, for tcp-client example
brew install ripgrep # ripgrep for ci/check_all_exposed_funs_tested.roc

- run: expect -v

- name: Run all tests
run: ROC=roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
version: 0.16.0
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- uses: dtolnay/rust-toolchain@1.83.0
with:
targets: x86_64-unknown-linux-musl
- name: Format, check, and test examples
run: ./scripts/test.py --operation validate

- name: Install dependencies for musl build
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get install -y musl-tools
if [[ "${{ matrix.os }}" == *"-arm" ]]; then
# TODO re-enable once TODO below is done: rustup target add aarch64-unknown-linux-musl
echo "no-op"
else
rustup target add x86_64-unknown-linux-musl
fi
validate-windows:
name: validate sources (windows)
runs-on: windows-2025
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- uses: dtolnay/rust-toolchain@1.83.0
with:
targets: x86_64-pc-windows-msvc
- name: Format, check, and test examples
shell: bash
run: ./scripts/test.py --operation validate

- name: Test building with musl target
if: startsWith(matrix.os, 'ubuntu-')
env:
ROC: roc
run: |
if [[ "${{ matrix.os}}" == *"-arm" ]]; then
# TODO debug this: CARGO_BUILD_TARGET=aarch64-unknown-linux-musl $ROC build.roc
echo "no-op"
else
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl $ROC build.roc
fi
build-examples:
name: build examples (${{ matrix.target }})
needs: validate
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: x64mac
os: macos-15
rust_target: x86_64-apple-darwin
- target: arm64mac
os: macos-15
rust_target: aarch64-apple-darwin
- target: x64musl
os: ubuntu-22.04
rust_target: x86_64-unknown-linux-musl
- target: arm64musl
os: ubuntu-22.04
rust_target: aarch64-unknown-linux-musl
- target: x64win
os: windows-2025
rust_target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Zig
if: runner.os != 'Windows'
uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # ratchet:mlugg/setup-zig@v2.0.5
with:
version: 0.16.0
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- uses: dtolnay/rust-toolchain@1.83.0
with:
targets: ${{ matrix.rust_target }}
- name: Cross-compile every example
shell: bash
run: ./scripts/test.py --operation build --target "${{ matrix.target }}" --artifact-dir dist/example-binaries
- name: Upload example binaries
uses: actions/upload-artifact@v4
with:
name: basic-cli-example-binaries-${{ matrix.target }}
path: dist/example-binaries/${{ matrix.target }}
if-no-files-found: error

- name: Test using musl build
if: startsWith(matrix.os, 'ubuntu-')
run: |
# TODO remove `if` when above TODOs are done
if [[ "${{ matrix.os }}" != *"-arm" ]]; then
NO_BUILD=1 IS_MUSL=1 ROC=roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
fi
run-examples:
name: run examples (${{ matrix.target }})
needs: build-examples
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: x64mac
os: macos-15-intel
- target: arm64mac
os: macos-15
- target: x64musl
os: ubuntu-22.04
- target: x64win
os: windows-2025
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.83.0
- name: Download native example binaries
uses: actions/download-artifact@v4
with:
name: basic-cli-example-binaries-${{ matrix.target }}
path: dist/example-binaries/${{ matrix.target }}
- name: Run native spec cases
shell: bash
run: ./scripts/test.py --operation run --target "${{ matrix.target }}" --artifact-dir dist/example-binaries
54 changes: 0 additions & 54 deletions .github/workflows/ci_nix.yml

This file was deleted.

97 changes: 29 additions & 68 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,109 +5,70 @@ on:
branches:
- main
paths:
- '**.roc'
release:
types:
- created

- ".github/workflows/deploy-docs.yml"
- "docs/**"
- "platform/**"
- "www/**"
workflow_dispatch:

# this cancels workflows currently in progress if you start a new one
concurrency:
group: "pages"
group: pages
cancel-in-progress: true

# Do not add permissions here! Configure them at the job level!
permissions:
contents: read

jobs:
deploy:
name: Deploy docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
permissions:
contents: read
pages: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
- name: Install Roc
uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
# Note: nightly hashes are not verified because they are updated regularly.
version: nightly
version: nightly-new-compiler

- run: roc version

- name: Create temp directory for docs
run: mkdir -p ./temp_docs

- name: Download and extract docs for each release
- name: Create Pages tree
run: |
# Get all releases
releases=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/roc-lang/basic-cli/releases" | jq -c '.')
echo "$releases" | jq -c '.[]' | while read -r release; do
release_name=$(echo $release | jq -r '.tag_name')
assets_url=$(echo $release | jq -r '.assets_url')

# Get assets for this release
assets=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "${assets_url}")

# Look for docs.tar.gz asset
download_url=$(echo $assets | jq -r '.[] | select(.name=="docs.tar.gz") | .browser_download_url')

if [ ! -z "$download_url" ]; then
echo "Processing release ${release_name}, downloading from ${download_url}"

# Create directory for this release
mkdir -p "./temp_docs/${release_name}"

# Download and extract
curl -sL "${download_url}" -o ./temp_docs/temp.tar.gz
tar -xzf ./temp_docs/temp.tar.gz -C "./temp_docs/${release_name}" --strip-components=1
rm ./temp_docs/temp.tar.gz
else
echo "Error: docs.tar.gz not found for release ${release_name}"
fi
done

# fix URLs
find ./temp_docs -type f -exec sed -i 's/\/packages\/basic-cli\//\/basic-cli\//g' {} +

# Get the latest release version
latest_release=$(echo "${releases}" | jq -r '.[0].tag_name')

if [ -f "./docs/index.html" ]; then
# Copy the index.html and replace LATESTVERSION with actual latest release
cat ./docs/index.html | sed "s/LATESTVERSION/${latest_release}/g" > ./temp_docs/index.html
echo "Created index.html with latest version: ${latest_release}"
mkdir -p temp_docs
if [ -d www ]; then
cp -R www/. temp_docs/
else
echo "Error: index.html not found in docs folder"
exit 1
sed 's/LATESTVERSION/main/g' docs/index.html > temp_docs/index.html
fi

- name: Add docs for main branch
- name: Generate main branch docs
env:
ROC_DOCS_URL_ROOT: /basic-cli/main
run: |
roc docs ./platform/main.roc
set -euo pipefail

mkdir -p "./temp_docs/main"
roc docs --output=temp_docs/main platform/main.roc

mv ./generated-docs/* ./temp_docs/main

- name: Fix legacy generated URLs
run: |
find temp_docs -type f \( -name "*.html" -o -name "*.js" \) \
-exec sed -i 's|/packages/basic-cli/|/basic-cli/|g' {} +

- name: Upload artifact
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the processed docs folder
path: "./temp_docs"

- name: Deploy to GitHub Pages
path: temp_docs

- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@v4
Loading
Loading