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
5 changes: 4 additions & 1 deletion .github/workflows/lydite-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ jobs:
python-version: "3.12"
- name: Install recorded solver version
run: python -m pip install z3-solver==5.1.0
- name: Check independent Aplite version
working-directory: .
run: node scripts/check-aplite-release.mjs
- name: Test affected Lydite packages and documentation
run: |
Z3_BIN="$(command -v z3)"
export Z3_BIN
cargo test --locked -p lydite -p lydite-ir -p lydite-solver -p lydite-syntax -p lydite-verify
cargo test --locked -p lydite -p lydite-ir -p lydite-solver -p lydite-syntax -p lydite-verify -p aplite

documentation:
needs: changes
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/publish-aplite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Aplite

on:
workflow_dispatch:

concurrency:
group: aplite-publish-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: read

env:
RELEASE_TAG: ${{ github.ref_name }}

jobs:
validate:
name: Validate and test Aplite release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
- uses: actions/setup-node@v6
with:
node-version: '24'
- name: Check release identity
env:
GH_TOKEN: ${{ github.token }}
run: node scripts/publish-aplite.mjs validate
- uses: ./.github/actions/setup-rust
- name: Test and verify standalone package
run: |
cargo test --locked -p aplite
cargo package --locked -p aplite

publish:
name: Publish Aplite to crates.io
needs: validate
runs-on: ubuntu-latest
environment: crates-io
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
- uses: actions/setup-node@v6
with:
node-version: '24'
- uses: ./.github/actions/setup-rust
- name: Authenticate to crates.io
id: crates_io_auth
uses: rust-lang/crates-io-auth-action@v1
- name: Publish independent package
env:
GH_TOKEN: ${{ github.token }}
CARGO_REGISTRY_TOKEN: ${{ steps.crates_io_auth.outputs.token }}
run: node scripts/publish-aplite.mjs publish
70 changes: 70 additions & 0 deletions .github/workflows/release-aplite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Aplite Release Management

on:
push:
branches: [master]
paths:
- 'crates/aplite/**'
- '.release-please-aplite-manifest.json'
- 'release-please-aplite-config.json'
- '.github/workflows/release-aplite.yml'
workflow_dispatch:

concurrency:
group: release-management-aplite
cancel-in-progress: false

permissions: {}

jobs:
release-please:
name: Update Aplite release pull request
runs-on: ubuntu-latest
steps:
- name: Create release app token
id: release-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-actions: write
permission-contents: write
permission-issues: write
permission-pull-requests: write
permission-workflows: write

- name: Check whether the release pull request is frozen
id: release-pr
env:
GH_TOKEN: ${{ steps.release-token.outputs.token }}
shell: bash
run: |
pull_requests="$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--state open --base master \
--head release-please--branches--master--components--aplite \
--json isCrossRepository,labels)"
frozen="$(jq -r 'any(.[]; .isCrossRepository == false and any(.labels[]; .name == "merge-ready" or .name == "queued"))' <<< "$pull_requests")"
echo "frozen=$frozen" >> "$GITHUB_OUTPUT"

- name: Create release or update release pull request
id: release
uses: googleapis/release-please-action@v5
with:
token: ${{ steps.release-token.outputs.token }}
config-file: release-please-aplite-config.json
manifest-file: .release-please-aplite-manifest.json
skip-github-pull-request: ${{ steps.release-pr.outputs.frozen == 'true' }}

- name: Queue Aplite publication
if: steps.release.outputs['crates/aplite--release_created'] == 'true'
env:
GH_TOKEN: ${{ steps.release-token.outputs.token }}
RELEASE_TAG: ${{ steps.release.outputs['crates/aplite--tag_name'] }}
shell: bash
run: |
if [[ ! "$RELEASE_TAG" =~ ^aplite-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Expected an Aplite stable release tag." >&2
exit 1
fi
gh workflow run publish-aplite.yml --repo "$GITHUB_REPOSITORY" --ref "$RELEASE_TAG"
1 change: 1 addition & 0 deletions .release-please-aplite-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Keep optional backend and comparison crates out of ordinary local builds.
default-members = ["crates/celox", "crates/celox-napi", "crates/celox-vpi"]
members = [
"crates/aplite",
"crates/celox",
"crates/celox-analysis",
"crates/celox-backend-cranelift",
Expand Down Expand Up @@ -56,6 +57,8 @@ description = "Celox HDL Simulator"
rust-version = "1.99.1"

[workspace.dependencies]
# Aplite has its own release version; these consumers are unpublished.
aplite = { path = "crates/aplite" }
celox = { version = "=0.11.0", path = "crates/celox", default-features = false } # x-release-please-version
celox-analysis = { version = "=0.11.0", path = "crates/celox-analysis" } # x-release-please-version
celox-backend-arm64 = { version = "=0.11.0", path = "crates/celox-backend-arm64" } # x-release-please-version
Expand Down
5 changes: 5 additions & 0 deletions crates/aplite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## Unreleased

- Extract the existing finite solver and expression IR from lydite without changing its algorithms.
17 changes: 17 additions & 0 deletions crates/aplite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "aplite"
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Bounded in-process Boolean, bit-vector and array constraint solver"
repository = "https://github.com/celox-sim/celox"
readme = "README.md"
keywords = ["solver", "sat", "bitvector", "constraints"]
categories = ["algorithms"]
include = ["src/**", "README.md", "RELEASING.md", "CHANGELOG.md", "Cargo.toml", "clippy.toml", "LICENSE-*"]

[dependencies]
serde_json = "1.0"

[lints]
workspace = true
Loading
Loading