Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 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
e2ca21c
Resolve release readiness backlog
lukewilliamboswell Jul 6, 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
91 changes: 38 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: CI

on:
pull_request:
workflow_dispatch:
Expand All @@ -8,71 +10,54 @@ concurrency:
cancel-in-progress: true

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

jobs:
build-and-test-native:
build-and-test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-15]
steps:
- uses: actions/checkout@v4
os:
- macos-15 # Apple Silicon
- macos-15-intel # Intel Mac
- ubuntu-22.04 # Linux x86_64
- ubuntu-24.04-arm # Linux ARM64
defaults:
run:
shell: bash

- 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
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
- name: Install Zig
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
version: 0.16.0

- name: Install Roc nightly
run: ./ci/install_roc.sh
env:
GITHUB_TOKEN: ${{ github.token }}

- run: roc version
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl

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

- name: Install dependencies (macOS)
- name: Install expect (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
run: brew install expect

- name: Run all tests
run: ROC=roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh

- 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

- 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

- 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
uses: roc-lang/roc/.github/actions/flaky-retry@main
with:
command: ./ci/all_tests.sh
error_string_contains: "error: (unable|invalid HTTP response)|HttpConnectionClosing"
54 changes: 0 additions & 54 deletions .github/workflows/ci_nix.yml

This file was deleted.

124 changes: 64 additions & 60 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,109 +5,113 @@ on:
branches:
- main
paths:
- '**.roc'
release:
- ".github/workflows/deploy-docs.yml"
- "ci/install_roc.sh"
- "docs/**"
- "platform/**"
workflow_run:
workflows:
- Release
types:
- created

- completed
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
if: github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'workflow_dispatch')
runs-on: ubuntu-24.04
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
with:
# Note: nightly hashes are not verified because they are updated regularly.
version: nightly
- name: Install Roc nightly
run: ./ci/install_roc.sh
env:
GITHUB_TOKEN: ${{ github.token }}

- run: roc version

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

- name: Download and extract docs for each release

- name: Download release docs
env:
GH_TOKEN: ${{ github.token }}
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
set -euo pipefail

releases_json="$(gh api "repos/${{ github.repository }}/releases?per_page=100")"

latest_release="$(printf '%s' "$releases_json" | jq -r '[.[] | select(.draft == false and .prerelease == false)][0].tag_name // empty')"
if [ -z "$latest_release" ]; then
latest_release="$(printf '%s' "$releases_json" | jq -r '[.[] | select(.draft == false)][0].tag_name // empty')"
fi
if [ -z "$latest_release" ]; then
latest_release="main"
fi

printf '%s' "$releases_json" | jq -r '.[] | select(.draft == false) | .tag_name' | while IFS= read -r release_name; do
[ -n "$release_name" ] || continue

download_dir="./temp_docs/_downloads/$release_name"
mkdir -p "$download_dir"

if gh release download "$release_name" --repo "${{ github.repository }}" --pattern docs.tar.gz --dir "$download_dir" --clobber; then
mkdir -p "./temp_docs/$release_name"
tar -xzf "$download_dir/docs.tar.gz" -C "./temp_docs/$release_name" --strip-components=1
echo "Added docs for release $release_name"
else
echo "Error: docs.tar.gz not found for release ${release_name}"
echo "No docs.tar.gz asset found for release $release_name; skipping"
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')

rm -rf ./temp_docs/_downloads

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}"
sed "s/LATESTVERSION/${latest_release}/g" ./docs/index.html > ./temp_docs/index.html
echo "Created root redirect to $latest_release"
else
echo "Error: index.html not found in docs folder"
echo "Error: docs/index.html not found"
exit 1
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

roc docs --output=generated-docs docs/basic-cli.roc
mkdir -p ./temp_docs/main
cp -R ./generated-docs/. ./temp_docs/main/

mkdir -p "./temp_docs/main"
- name: Fix legacy generated URLs
run: |
set -euo pipefail

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

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"

path: ./temp_docs

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