From 6249f83adb532ec62e2e1000c834ae4a74837b54 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 28 Apr 2025 18:20:55 +0200 Subject: [PATCH 1/5] ci: add `cargo hack` --- .github/workflows/features.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/features.yml diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml new file mode 100644 index 000000000..6360c7db1 --- /dev/null +++ b/.github/workflows/features.yml @@ -0,0 +1,21 @@ +name: Precommit + +on: + push: + branches: ["master", "web-prod"] + pull_request: + branches: ["master"] + merge_group: + +env: + CARGO_TERM_COLOR: always + +jobs: + # make sure the crate works with all features enabled/disabled + features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup update --no-self-update stable && rustup default stable + - uses: taiki-e/install-action@cargo-hack + - run: cargo hack check --each-feature From a7e918177bc6e255a1898fd5f28494d01721fa25 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 28 Apr 2025 18:25:12 +0200 Subject: [PATCH 2/5] docs: update comment --- .github/workflows/features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 6360c7db1..fa5c2c88e 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -11,7 +11,7 @@ env: CARGO_TERM_COLOR: always jobs: - # make sure the crate works with all features enabled/disabled + # make sure all crates work with all features enabled/disabled features: runs-on: ubuntu-latest steps: From 7f4bfab891b7161324d6b43a53caaa1d661f2ad7 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 28 Apr 2025 18:25:39 +0200 Subject: [PATCH 3/5] docs: rename CI job --- .github/workflows/features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index fa5c2c88e..7eab1a540 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -1,4 +1,4 @@ -name: Precommit +name: Check all features on: push: From efe650c8b1d76fdae8f99c02767f35b47a44c16f Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Thu, 1 May 2025 18:41:48 +0200 Subject: [PATCH 4/5] ci: removed workflow --- .github/workflows/features.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/features.yml diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml deleted file mode 100644 index 7eab1a540..000000000 --- a/.github/workflows/features.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Check all features - -on: - push: - branches: ["master", "web-prod"] - pull_request: - branches: ["master"] - merge_group: - -env: - CARGO_TERM_COLOR: always - -jobs: - # make sure all crates work with all features enabled/disabled - features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: rustup update --no-self-update stable && rustup default stable - - uses: taiki-e/install-action@cargo-hack - - run: cargo hack check --each-feature From 8aad7470855a7681eaa77358b75518d10bbb6666 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Thu, 1 May 2025 18:47:58 +0200 Subject: [PATCH 5/5] ci: add cargo-hack to justfile --- .github/workflows/precommit.yml | 3 +++ justfile | 1 + packages/web/src/routes/docs/contributors/environment/+page.md | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index c14928522..edaeb9f27 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -27,5 +27,8 @@ jobs: run: sudo apt-get update && sudo apt-get install pandoc -y - name: Install `wasm-pack` run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - name: Install `cargo-hack` + uses: taiki-e/install-action@cargo-hack + run: cargo hack check --each-feature - name: Precommit run: just precommit diff --git a/justfile b/justfile index 18dbe6124..eedef36cd 100644 --- a/justfile +++ b/justfile @@ -205,6 +205,7 @@ precommit: check test build-harperjs build-obsidian build-web build-wp cargo doc cargo build --all-targets + cargo hack check --each-feature # Install `harper-cli` and `harper-ls` to your machine via `cargo` install: diff --git a/packages/web/src/routes/docs/contributors/environment/+page.md b/packages/web/src/routes/docs/contributors/environment/+page.md index 57a65b55b..5b6b4303d 100644 --- a/packages/web/src/routes/docs/contributors/environment/+page.md +++ b/packages/web/src/routes/docs/contributors/environment/+page.md @@ -2,7 +2,7 @@ title: Set Up Your Environment --- -To use the tooling required to build and debug Harper, you'll need the following programs available in your `$PATH`. +To use the tooling required to build and debug Harper, you'll need the following programs available in your `$PATH`. For Nix users, we provide a [Nix development shell](#Nix-development-shell) to setup all the necessary tooling automatically. - [`just`](https://github.com/casey/just) @@ -14,6 +14,7 @@ For Nix users, we provide a [Nix development shell](#Nix-development-shell) to s - [`wasm-pack`](https://rustwasm.github.io/wasm-pack/installer/) - `zip` - `pandoc` +- [`cargo-hack`](https://github.com/taiki-e/cargo-hack?tab=readme-ov-file#installation) To run integration tests, you may also need `libnss3` and/or `libasound3`. These are installable in Ubuntu using `apt-get`.