Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
171 changes: 123 additions & 48 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ jobs:

- name: Build Release (Non-Windows)
if: runner.os != 'Windows' && inputs.release-build
run: cargo build-full --release --verbose
run: cargo build --release --verbose

- name: Build Release (Windows MinGW)
if: runner.os == 'Windows' && inputs.release-build
run: cargo build-full --release --verbose --target x86_64-pc-windows-gnu
run: cargo build --release --verbose --target x86_64-pc-windows-gnu

- name: Verify vendored LLVM
run: |
Expand All @@ -274,11 +274,11 @@ jobs:

- name: Test Release (Non-Windows)
if: runner.os != 'Windows' && inputs.release-build
run: cargo test-full --verbose
run: cargo test --release --verbose

- name: Test Release (Windows MinGW)
if: runner.os == 'Windows' && inputs.release-build
run: cargo test-full --verbose --target x86_64-pc-windows-gnu
run: cargo test --release --verbose --target x86_64-pc-windows-gnu

- name: Clippy (Non-Windows)
if: runner.os != 'Windows'
Expand All @@ -295,53 +295,91 @@ jobs:
run: cargo audit

# Package artifacts (only for release builds)
- name: Prepare Artifact Package (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts
- name: Prepare infc Artifact Package (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
run: |
New-Item -ItemType Directory -Force -Path artifact\bin
New-Item -ItemType Directory -Force -Path artifact\lib
Copy-Item target\x86_64-pc-windows-gnu\release\infc.exe artifact\
Copy-Item book\check_deps.ps1 artifact\
Copy-Item external\bin\windows\inf-llc.exe artifact\bin\
Copy-Item external\bin\windows\rust-lld.exe artifact\bin\

- name: Prepare Artifact Package (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts
New-Item -ItemType Directory -Force -Path artifact-infc\bin
Copy-Item target\x86_64-pc-windows-gnu\release\infc.exe artifact-infc\
Copy-Item book\check_deps.ps1 artifact-infc\
Copy-Item external\bin\windows\inf-llc.exe artifact-infc\bin\
Copy-Item external\bin\windows\rust-lld.exe artifact-infc\bin\
Copy-Item external\bin\libLLVM-21.dll artifact-infc\bin\

- name: Prepare infs Artifact Package (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
run: |
New-Item -ItemType Directory -Force -Path artifact-infs
Copy-Item target\x86_64-pc-windows-gnu\release\infs.exe artifact-infs\

- name: Prepare infc Artifact Package (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
run: |
mkdir -p artifact-infc/bin
mkdir -p artifact-infc/lib
cp target/release/infc artifact-infc/
cp target/release/bin/* artifact-infc/bin/ || true
cp target/release/lib/* artifact-infc/lib/ || true

- name: Prepare infs Artifact Package (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
run: |
mkdir -p artifact/bin
mkdir -p artifact/lib
cp target/release/infc artifact/
cp target/release/bin/* artifact/bin/
cp target/release/lib/* artifact/lib/

- name: Package Artifact (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts
mkdir -p artifact-infs
cp target/release/infs artifact-infs/

- name: Package infc Artifact (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
run: |
7z a -tzip infc-windows-x64.zip .\artifact-infc\*
$hash = (Get-FileHash infc-windows-x64.zip -Algorithm SHA256).Hash.ToLower()
"$hash infc-windows-x64.zip" | Out-File -Encoding ascii infc-windows-x64.zip.sha256

- name: Package infs Artifact (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
run: |
7z a -tzip infc-windows-x64.zip .\artifact\*
certutil -hashfile infc-windows-x64.zip SHA256 > infc-windows-x64.zip.sha256
7z a -tzip infs-windows-x64.zip .\artifact-infs\*
$hash = (Get-FileHash infs-windows-x64.zip -Algorithm SHA256).Hash.ToLower()
"$hash infs-windows-x64.zip" | Out-File -Encoding ascii infs-windows-x64.zip.sha256

- name: Package Artifact (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts
- name: Package infc Artifact (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
run: |
tar -czf infc-linux-x64.tar.gz -C artifact .
tar -czf infc-linux-x64.tar.gz -C artifact-infc .
sha256sum infc-linux-x64.tar.gz > infc-linux-x64.tar.gz.sha256

- name: Package infs Artifact (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
run: |
tar -czf infs-linux-x64.tar.gz -C artifact-infs .
sha256sum infs-linux-x64.tar.gz > infs-linux-x64.tar.gz.sha256

- name: Prepare Artifact Package (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts
- name: Prepare infc Artifact Package (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
run: |
mkdir -p artifact/bin
cp target/release/infc artifact/
cp target/release/bin/* artifact/bin/ || true
mkdir -p artifact-infc/bin
cp target/release/infc artifact-infc/
cp target/release/bin/* artifact-infc/bin/ || true
if [ -d target/release/lib ] && [ "$(ls -A target/release/lib)" ]; then
mkdir -p artifact/lib
cp target/release/lib/* artifact/lib/
mkdir -p artifact-infc/lib
cp target/release/lib/* artifact-infc/lib/
fi

- name: Prepare infs Artifact Package (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
run: |
mkdir -p artifact-infs
cp target/release/infs artifact-infs/

- name: Package Artifact (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts
- name: Package infc Artifact (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
run: |
tar -czf infc-macos-apple-silicon.tar.gz -C artifact .
tar -czf infc-macos-apple-silicon.tar.gz -C artifact-infc .
shasum -a 256 infc-macos-apple-silicon.tar.gz > infc-macos-apple-silicon.tar.gz.sha256

- name: Package infs Artifact (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
run: |
tar -czf infs-macos-apple-silicon.tar.gz -C artifact-infs .
shasum -a 256 infs-macos-apple-silicon.tar.gz > infs-macos-apple-silicon.tar.gz.sha256

- name: Upload to Release (Windows)
if: runner.os == 'Windows' && inputs.upload-to-release
Expand All @@ -350,49 +388,86 @@ jobs:
files: |
infc-windows-x64.zip
infc-windows-x64.zip.sha256

infs-windows-x64.zip
infs-windows-x64.zip.sha256

- name: Upload to Release (Linux)
if: runner.os == 'Linux' && inputs.upload-to-release
uses: softprops/action-gh-release@v1
with:
files: |
infc-linux-x64.tar.gz
infc-linux-x64.tar.gz.sha256

infs-linux-x64.tar.gz
infs-linux-x64.tar.gz.sha256

- name: Upload to Release (macOS)
if: runner.os == 'macOS' && inputs.upload-to-release
uses: softprops/action-gh-release@v1
with:
files: |
infc-macos-apple-silicon.tar.gz
infc-macos-apple-silicon.tar.gz.sha256
infs-macos-apple-silicon.tar.gz
infs-macos-apple-silicon.tar.gz.sha256

- name: Upload Workflow Artifact (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && !inputs.upload-to-release
# Always upload workflow artifacts when packaging - needed for manifest generation
- name: Upload Workflow Artifact infc (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infc-windows-x64
path: |
infc-windows-x64.*
retention-days: 90
compression-level: 0

- name: Upload Workflow Artifact (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && !inputs.upload-to-release

- name: Upload Workflow Artifact infs (Windows)
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infs-windows-x64
path: |
infs-windows-x64.*
retention-days: 90
compression-level: 0

- name: Upload Workflow Artifact infc (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infc-linux-x64
path: |
infc-linux-x64.*
retention-days: 90
compression-level: 0

- name: Upload Workflow Artifact (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && !inputs.upload-to-release

- name: Upload Workflow Artifact infs (Linux)
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infs-linux-x64
path: |
infs-linux-x64.*
retention-days: 90
compression-level: 0

- name: Upload Workflow Artifact infc (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infc-macos-apple-silicon
path: |
infc-macos-apple-silicon.*
retention-days: 90
compression-level: 0

- name: Upload Workflow Artifact infs (macOS)
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
uses: actions/upload-artifact@v4
with:
name: infs-macos-apple-silicon
path: |
infs-macos-apple-silicon.*
retention-days: 90
compression-level: 0
52 changes: 51 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Testing

- Expand `infs` test coverage from 282 to 429 tests (360 unit + 69 integration) ([#96])
- Add TUI rendering tests using TestBackend for main_view, doctor_view, toolchain_view
- Add integration tests for non-deterministic features (forall, exists, assume, unique, oracle)
- Add tests for error handling, environment variables, and edge cases
- Consolidate test fixtures in `apps/infs/tests/fixtures/`
- Move QA test suite to `apps/infs/docs/qa-test-suite.md` with 9 truly manual tests ([#96])

### infs CLI

- Add automatic PATH configuration on first install ([#96])
- Unix: Modifies shell profile (`~/.bashrc`, `~/.zshrc`, `~/.config/fish/config.fish`)
- Windows: Modifies user PATH in registry (`HKCU\Environment\Path`)
- Users only need to restart their terminal after installation
- Rename environment variable and directory for consistency ([#96])
- `INFS_HOME` → `INFERENCE_HOME`
- `~/.infs` → `~/.inference`
- Add `infc` symlink to installed toolchain alongside `inf-llc` and `rust-lld` ([#96])
- Improve `infs install` to auto-set default toolchain when none is configured ([#96])
- When installing an already-installed version without a default toolchain, `infs install` now automatically sets that version as default and updates symlinks
- Provides graceful recovery if default toolchain file was manually removed
- Improve `infs doctor` recommendations for missing default toolchain ([#96])
- When no default is set but toolchains exist, suggests `infs default <version>` instead of `infs install`
- When no toolchains exist, suggests `infs install`
- Fix `infs install` and `infs self update` to fall back to latest pre-release version when no stable versions exist ([#96])
- Previously failed with "No stable version found in manifest" error
- Now uses latest stable version if available, otherwise falls back to latest version regardless of stability
- Fix `infs install` failing with nested archive structure from GitHub releases ([#96])
- GitHub releases wrap tar.gz archives in ZIP files
- Now automatically detects and extracts nested tar.gz after ZIP extraction
- Fix `infs uninstall` leaving broken symlinks when removing non-default toolchains ([#96])
- Previously, `Path::exists()` returned false for broken symlinks, causing them to remain in `~/.inference/bin/`
- Now uses `symlink_metadata().is_ok()` to correctly detect and remove both valid and broken symlinks
- Added `validate_symlinks()` to check for broken symlinks after uninstallation
- Added `repair_symlinks()` to automatically fix broken symlinks by updating them to the default version or removing them

### Build

- Add `infs` binaries to release artifacts for all platforms (Linux x64, Windows x64, macOS ARM64)
- Update release manifest to schema version 2 with separate `infc` and `infs` tool entries

### Project Manifest

- Replace `manifest_version` field with `infc_version` in Inference.toml ([#96])
- `infc_version` is a String (semver format) that records the compiler version used to create the project
- Automatically detected from `infc --version` when running `infs new` or `infs init`
- Falls back to `infs` version if `infc` is not available
- All Inference ecosystem crates share the same version number

### Editor Support

- Add VS Code extension with syntax highlighting for Inference language ([#94])
Expand Down Expand Up @@ -112,7 +162,6 @@ Initial tagged release.
- Function definitions with generic type parameters
- Module system with visibility modifiers
- Add `undef` syntax support ([#10])
- Rename `apply` to `verify` ([#10])

### Compiler

Expand Down Expand Up @@ -165,3 +214,4 @@ Initial tagged release.
[#69]: https://github.com/Inferara/inference/pull/69
[#86]: https://github.com/Inferara/inference/pull/86
[#94]: https://github.com/Inferara/inference/pull/94
[#96]: https://github.com/Inferara/inference/pull/96
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ serde = { version = "1.0.228", features = ["derive", "rc"] }
leb128 = "0.2.5"
rustc-hash = "2.1.1"
inkwell = { version = "0.8.0", features = ["llvm21-1"] }

[profile.release]
codegen-units = 1 # Better optimization (slower compile)
Loading