Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
2c00c1d
tests: cargo-free runner (tests/run.sh) and native suite
dev-dami Nov 22, 2026
a0a63ae
ci: run tests/run.sh in the seed-bootstrap job
dev-dami Nov 22, 2026
0ccc3e7
tests: port selfhost_tests.rs, editor/highlight tests to tests/run.sh
dev-dami Nov 22, 2026
1b307ed
tests: port language, checker and CLI tests to tests/run.sh
dev-dami Nov 22, 2026
f2976a1
tests: PORTING.md inventory of every cargo test
dev-dami Nov 22, 2026
ab724bc
s2: parity tests need real executables; runner checks tests/sh/ids.txt
dev-dami Nov 22, 2026
cce529b
s2: commit the example and run-output goldens (*.out was gitignored)
dev-dami Nov 22, 2026
dfe256d
s2: error_handling golden no longer bakes in this machine's /etc/host…
dev-dami Nov 22, 2026
3b4f92a
Merge remote-tracking branch 'origin/agent/s4-lsp' into agent/s5-no-rust
dev-dami Nov 22, 2026
8f3ea45
Merge remote-tracking branch 'origin/agent/s2-tests' into agent/s5-no…
dev-dami Nov 22, 2026
eba7d0d
Delete the Rust stage0, yard and LSP; drop cargo from scripts and bench
dev-dami Nov 22, 2026
5e849b7
CI and docs: build, test and ship from the C seed alone
dev-dami Nov 22, 2026
3bd0371
Point two compiler comments at the Track suites, not the deleted Rust…
dev-dami Nov 22, 2026
73f71ee
Site: describe Track as self-hosted (C-seed bootstrap, yard and LSP i…
dev-dami Nov 22, 2026
0fd0c90
Site: fix bash highlighter span corruption, keep install fences free …
dev-dami Nov 22, 2026
4d721b1
s5: restore lost CI coverage; document --from-seed
dev-dami Nov 22, 2026
b610d48
Merge remote-tracking branch 'origin/main' into agent/s5-no-rust
dev-dami Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
145 changes: 43 additions & 102 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,88 +6,12 @@ on:
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
build:
# Track from the committed C seed: cc and POSIX tools only.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 22
sudo apt-get install -y libpolly-22-dev zlib1g-dev libzstd-dev || true


- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --release

- name: Run tests
run: cargo test

- name: Check examples
run: |
for f in examples/*.trk; do
echo "Checking $f..."
if [[ "$f" == *"_err.trk" ]]; then
if ./target/release/track check "$f" 2>/dev/null; then
echo "Error: Expected rejection for $f but check succeeded!"
exit 1
else
echo "✓ Rejection test passed for $f"
fi
else
./target/release/track check "$f"
fi
done

- name: Native compiler package (yard)
run: |
scripts/embed_runtime.sh --check
(cd compiler && ../target/release/yard check)
(cd compiler && ../target/release/yard build)
(cd compiler && ../target/release/yard test)
for f in compiler/src/*.trk; do
echo "Checking $f..."
./target/release/track check "$f"
done

- name: Bootstrap fixed point from Rust (stage0 -> stage3, then native)
run: YARD=./target/release/yard scripts/bootstrap.sh --from-rust

- name: Compiler sources are warning-clean
run: ./build/bootstrap/stage3/trackc check --deny-warnings compiler/src/main.trk

- name: Self-hosting from .trk alone (native, no C toolchain)
run: scripts/selfhost.sh

- name: Verify versions
run: |
./target/release/track --version | grep -q "1.0.0"
./target/release/yard --version | grep -q "1.0.0"
./build/bootstrap/stage3/trackc --version | grep -q "1.0.0"
echo "✓ versions ok"


seed-bootstrap:
# Track from the committed C seed: cc and POSIX tools only, no Rust.
runs-on: ubuntu-latest
env:
TRACKC: ${{ github.workspace }}/build/bootstrap/stage3/trackc
steps:
- uses: actions/checkout@v4

Expand All @@ -104,34 +28,51 @@ jobs:
- name: Seed is up to date
run: env PATH=/usr/bin:/bin scripts/update_seed.sh --check

- name: Compiler sources are warning-clean
run: ./build/bootstrap/stage3/trackc check --deny-warnings compiler/src/main.trk
- name: Compiler and yard sources are warning-clean
run: |
env PATH=/usr/bin:/bin "$TRACKC" check --deny-warnings compiler/src/main.trk
env PATH=/usr/bin:/bin "$TRACKC" check --deny-warnings tools/yard/main.trk

- name: yard (written in Track) passes its suite
- name: Every compiler source checks; yard checks and builds the compiler package
run: |
./build/bootstrap/stage3/trackc check --deny-warnings tools/yard/main.trk
env PATH=/usr/bin:/bin TRACKC="$PWD/build/bootstrap/stage3/trackc" tests/yard/run.sh
for f in compiler/src/*.trk; do
env PATH=/usr/bin:/bin "$TRACKC" check "$f" || { echo "check failed: $f"; exit 1; }
done
mkdir -p build
env PATH=/usr/bin:/bin "$TRACKC" build --native tools/yard/main.trk -o build/yard
(cd compiler && env PATH=/usr/bin:/bin TRACKC="$TRACKC" ../build/yard check)
(cd compiler && env PATH=/usr/bin:/bin TRACKC="$TRACKC" ../build/yard build)

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test suite (tests/run.sh)
run: env PATH=/usr/bin:/bin tests/run.sh -j "$(nproc)" -K

- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 22
sudo apt-get install -y libpolly-22-dev zlib1g-dev libzstd-dev || true
- name: yard (written in Track) passes its suite
run: env PATH=/usr/bin:/bin tests/yard/run.sh

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: trackc lsp passes its recorded sessions
run: env PATH=/usr/bin:/bin tests/lsp/run.sh "$TRACKC"

- name: Check formatting
run: cargo fmt --all -- --check
- name: Self-hosting from .trk alone (native, no C toolchain)
run: env PATH=/usr/bin:/bin scripts/selfhost.sh "$TRACKC"

- name: Run clippy
run: cargo clippy -- -D warnings
- name: Check examples
run: |
for f in examples/*.trk; do
if [[ "$f" == *"_err.trk" ]]; then
if env PATH=/usr/bin:/bin "$TRACKC" check "$f" >/dev/null 2>&1; then
echo "Error: expected rejection for $f but check succeeded"
exit 1
fi
echo "✓ rejected $f"
else
env PATH=/usr/bin:/bin "$TRACKC" check "$f"
fi
done

- name: Verify versions
run: |
mkdir -p build
env PATH=/usr/bin:/bin "$TRACKC" build --native tools/yard/main.trk -o build/yard >/dev/null
"$TRACKC" --version | grep -q "1.0.0"
build/yard --version | grep -q "1.0.0"
echo "✓ versions ok"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# yard writes target/ (target/_yard_root.trk, target/objects/) in the project it builds
/target
/tmp_benchmark
*.o
*.out
!tests/cases/**/*.out
*.exe

# IDE
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed
- **All Rust code.** The Rust stage 0 compiler, the Rust yard and the Rust
LSP (`src/`), `Cargo.toml`, `Cargo.lock` and the cargo test suites
(`tests/*.rs`) are deleted. Track builds from the C seed with
`scripts/bootstrap.sh` (cc -> stage1..3 -> native) and tests with
`tests/run.sh`, `tests/yard/run.sh` and `tests/lsp/run.sh`; yard is
`tools/yard/*.trk` and the language server is `trackc lsp`.
`scripts/bootstrap.sh --from-rust` is gone, and `bench/` compares
trackc's C and native backends.

### Added
- **Runtime written in Track** (`compiler/rt/*.trk`): every function of
`runtime/track_runtime.c` on raw syscalls, no libc. `trackc build
Expand Down
Loading
Loading