Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v0.0.7 #328

Merged
merged 29 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1b4a92c
chore: bump msrv to 1.80
bitwalker Sep 6, 2024
b08386c
release: 0.0.6
bitwalker Sep 6, 2024
c8ab278
Merge pull request #310 from 0xPolygonMiden/release-plz-2024Sep6
bitwalker Sep 6, 2024
ab9e353
chore: add `cargo-semver-checks` install to the CONTRIBUTING.md
greenhat Sep 9, 2024
e1c3e88
Merge pull request #311 from 0xPolygonMiden/greenhat/add-semver-check…
bitwalker Sep 9, 2024
5947e41
style update, broken link, run script and dependencies
kmurphypolygon Sep 10, 2024
173c48b
chore: fallback to cwd if CARGO_MANIFEST_DIR env var is not set
greenhat Sep 11, 2024
a123934
Merge pull request #318 from 0xPolygonMiden/greenhat/env-var-fallback…
bitwalker Sep 12, 2024
18540d0
chore: add `CompilerTestInputType::CargoMiden` and use `cargo-miden` …
greenhat Sep 10, 2024
d60dce5
Merge pull request #313 from 0xPolygonMiden/greenhat/i312-use-cargo-m…
greenhat Sep 12, 2024
2562ca6
docs: add build instructions, a few tweaks
bitwalker Sep 12, 2024
83e234b
Merge pull request #315 from 0xPolygonMiden/docs/copy-edit-1
bitwalker Sep 12, 2024
9a9242c
chore: update cargo-component to v0.16.0
greenhat Sep 13, 2024
e3623ba
Merge pull request #321 from 0xPolygonMiden/greenhat/update-cargo-com…
bitwalker Sep 13, 2024
bfad773
build: update rust toolchain
bitwalker Sep 13, 2024
df16a23
chore: update deps
bitwalker Sep 13, 2024
e959fc8
ci: rework github actions workflows
bitwalker Sep 13, 2024
6d9dba3
chore: fix up new clippy warnings
bitwalker Sep 13, 2024
5d9c543
ci(rustfmt): disable wrap_comments due to broken behavior
bitwalker Sep 13, 2024
f0f56ac
chore: update expect output after toolchain upgrade
bitwalker Sep 13, 2024
dfc7f84
Merge pull request #322 from 0xPolygonMiden/bitwalker/rust-toolchain
bitwalker Sep 16, 2024
29491a2
doc: add `--release` option to `cargo miden build` command
greenhat Sep 16, 2024
31ad4ce
fix: switch cargo-miden to v0.4.0 of the new project template with
greenhat Sep 17, 2024
7639039
chore: remove `miden-assembly` dependency from `sdk/base-sys` for `bi…
greenhat Sep 17, 2024
479f29f
Merge pull request #324 from 0xPolygonMiden/greenhat/i323-fix-guide
bitwalker Sep 17, 2024
5211b74
Merge pull request #325 from 0xPolygonMiden/greenhat/i323-dev-profile…
bitwalker Sep 17, 2024
4b0c16b
Merge pull request #326 from 0xPolygonMiden/greenhat/miden-base-sys-n…
bitwalker Sep 17, 2024
3ea1702
chore: release-plz update (bumped to v0.0.7)
greenhat Sep 17, 2024
8076326
Merge pull request #327 from 0xPolygonMiden/release-plz-2024-Sep-17
bitwalker Sep 17, 2024
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
41 changes: 16 additions & 25 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,26 @@ on:
push:
branches:
- main
- develop
- next

jobs:
deploy:
publish_docs:
name: publish docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- name: Install mdbook-katex
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex
- name: Install mdbook-linkcheck
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-linkcheck
- name: Build miden book
run: mdbook build docs/
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update --no-self-update
rustc --version
- name: Install cargo-make
run: |
cargo install cargo-make --force
- name: Build
run: |
cargo make docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book/html
publish_dir: ./target/docs/site
206 changes: 113 additions & 93 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,132 +4,152 @@ on:
push:
branches:
- main
- next
paths-ignore:
- "*.md"
- "*.txt"
- "docs"
pull_request:
paths-ignore:
- "*.md"

env:
CARGO_MAKE_TOOLCHAIN: nightly-2024-05-07
- "*.txt"
- "docs"

jobs:
compiler:
lint:
name: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
# Use a common cache for the basic compilation/formatter/clippy checks
shared-key: ${{ github.workflow }}-shared
save-if: ${{ github.ref == 'refs/heads/next' }}
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-make
- name: Build
uses: actions-rs/cargo@v1
with:
command: make
args: build
- name: Test
uses: actions-rs/cargo@v1
with:
command: make
args: test -E 'not package(cargo-miden)'
run: |
if ! cargo make --version 2>/dev/null; then
cargo install cargo-make --force
fi
- name: Clippy
run: |
cargo make clippy

cargo_miden_test_clean_env:
# Run cargo-miden test in the clean env to simulate user's first run.
# To test the installation of the required dependencies (e.g. rust-src, wasm target, etc.)
name: cargo-miden tests
check_format:
name: check formatting
runs-on: ubuntu-latest

# Run this job after the linter, so the cache is hot
needs: [lint]
# But run this check even if the lint check failed
if: ${{ always() }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
# Use a common cache for the basic compilation/formatter/clippy checks
shared-key: ${{ github.workflow }}-shared
# But do not save this cache, just use it
save-if: false
- name: Install cargo-make
uses: actions-rs/cargo@v1
run: |
if ! cargo make --version 2>/dev/null; then
cargo install cargo-make --force
fi
- name: Check Formatting
run: |
cargo make check-format

unit_tests:
name: midenc unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
command: install
args: cargo-make
# NOTE: We use a different cache for the tests, so they can be run in parallel, but we
# also share the cache for the tests for efficiency
shared-key: ${{ github.workflow }}-shared-tests
save-if: ${{ github.ref == 'refs/heads/next' }}
- name: Install cargo-make
run: |
if ! cargo make --version 2>/dev/null; then
cargo install cargo-make --force
fi
- name: Check
# We run `cargo check` to verify that the workspace compiles correctly before attempting
# to execute the tests from each crate. This produces easier to read output if a compilation
# error occurs
run: |
cargo make check --tests
- name: Test
uses: actions-rs/cargo@v1
with:
command: make
args: test -E 'package(cargo-miden)'
run: |
cargo make test -E 'not (package(miden-integration-tests) or package(cargo-miden))'

clippy:
name: clippy
midenc_integration_tests:
name: midenc integration tests
runs-on: ubuntu-latest
# We only want to run the integration tests if the unit tests pass, and that has the added
# benefit that we can re-use the cache from the unit test job for all integration tests
needs: [unit_tests]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
shared-key: ${{ github.workflow }}-shared-tests
# Do not persist the cache, leave that to the unit tests, we just use the cache here
save-if: false
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-make
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: make
args: clippy
run: |
if ! cargo make --version 2>/dev/null; then
cargo install cargo-make --force
fi
- name: Test
run: |
cargo make test -E 'package(miden-integration-tests)'

rustfmt:
name: rustfmt
cargo_miden_integration_tests:
name: cargo-miden integration tests
runs-on: ubuntu-latest
# We only want to run the integration tests if the unit tests pass, and that has the added
# benefit that we can re-use the cache from the unit test job for all integration tests
needs: [unit_tests]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
shared-key: ${{ github.workflow }}-shared-tests
# Do not persist the cache, leave that to the unit tests, we just use the cache here
save-if: false
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-make
- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: make
args: check-format
run: |
if ! cargo make --version 2>/dev/null; then
cargo install cargo-make --force
fi
- name: Test
run: |
cargo make test -E 'package(cargo-miden)'
50 changes: 22 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Runs `release-plz release` only after the release PR (starts with `release-plz-`)
# is merged to the next branch. See `release_always = false` in `release-plz.toml`
# Runs `release-plz release` only after the release PR (starts with `release-plz-`)
# is merged to the next branch. See `release_always = false` in `release-plz.toml`
# Publishes any unpublished crates when.
# Does nothing if all crates are already published (i.e. have their versions on crates.io).
# Does not create/update release PRs.
# The crate version bumping and changelog generation is done via the `release-plz update` CLI command.
# Then manually create a release PR(starts with `release-plz-`) with the proposed changes and
# Then manually create a release PR(starts with `release-plz-`) with the proposed changes and
# when the PR is merged this action will publish the crates.
# See CONTRIBUTING.md for more details.

Expand All @@ -15,33 +15,27 @@ on:
branches:
- next

env:
CARGO_MAKE_TOOLCHAIN: nightly-2024-05-07

jobs:
release-plz:
name: release-plz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
- name: Publish Miden compiler crates
uses: MarcoIeni/[email protected]
with:
# Only run the `release` command that publishes any unpublished crates.
command: release
# `manifest_path` is omitted because it defaults to the root directory
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update --no-self-update
rustc --version
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/next' }}
- name: Publish
uses: MarcoIeni/[email protected]
with:
# Only run the `release` command that publishes any unpublished crates.
command: release
# `manifest_path` is omitted because it defaults to the root directory
# manifest_path: "..."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ bin/midenc
bin/litcheck
.crates.toml
.crates2.json

# Docs platform ignores
.vscode
.code
.idea
site/
venv/
env/
*.out
node_modules/
*DS_Store
*.iml
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TBD
### Prerequisites

Install `release-plz` CLI tool following the instructions [here](https://release-plz.ieni.dev/docs/usage/installation)
Install `cargo-semver-checks` CLI tool [here](https://github.com/obi1kenobi/cargo-semver-checks#installation) to use as an extra check in `release-plz` and bump the major versions on semver violations.

### Release of the Miden Compiler and Miden SDK crates

Expand Down
Loading