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

ci: add CHANGELOG check and specific targets #456

Merged
merged 10 commits into from
Jul 31, 2024
16 changes: 16 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Changelog"
on:
merge_group:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
# We only want this for user-visible changes, so we add a few labels
# for which the check is skipped
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: pipelines,tests,documentation,no-changelog
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd use the previously-existing 'no changelog' label for this. We could also delete that one and keep no-changelog, but I think it's a bit better if it's aligned with other Miden repos.

29 changes: 29 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check
on:
push:
branches: [main, next]
pull_request:
types: [opened, repoened, synchronize]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install Rust
run: |
rustup update --no-self-update nightly
- name: make - check
run: make check

check-wasm:
name: Check WASM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install Rust with rustfmt
run: |
rustup update --no-self-update nightly
- name: make - check-wasm
run: make check-wasm
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ build: ## Builds the CLI binary and client library in release mode

build-wasm: ## Builds the client library for wasm32
cargo build --target wasm32-unknown-unknown --features idxdb,web-tonic --no-default-features --package miden-client

# --- Check ---------------------------------------------------------------------------------------

check: ## Builds the CLI binary and client library in release mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add the phony targets for these

cargo check --release --features $(FEATURES_CLI)

check-wasm: ## Builds the client library for wasm32
cargo check --target wasm32-unknown-unknown --features idxdb,web-tonic --no-default-features --package miden-client
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

5 changes: 5 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[toolchain]
channel = "1.78"
components = ["rustfmt", "rust-src", "clippy"]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"
Loading