-
Notifications
You must be signed in to change notification settings - Fork 698
feat: add cargo hack check on ci #6262
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
Open
Jiloc
wants to merge
51
commits into
stacks-network:develop
Choose a base branch
from
Jiloc:feature/cargo-hack-check-ci
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,989
−6,725
Open
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
82fbfb1
make http-parser and ctrlc optional features
Jiloc cb16f1a
remove regex from stacks-common
Jiloc f348b65
move serde_json to workspace. refactor stacks common cargo
Jiloc 6775c85
removed time
Jiloc 7442358
add vm feature flag
Jiloc 75b0191
fix format
Jiloc 5e2eeac
clippy
Jiloc d186115
make rand optional for CosmWasm support
Jiloc a9c14bf
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 97c968c
substitute ::generate with ::from_bytes
Jiloc d64ad0b
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc f6621cb
add custom dummy getdefault
Jiloc 526c0d1
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 309e98d
remove getrandom::register_custom_getrandom for wasm-deterministic
Jiloc 9f9d721
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 5405302
remove unused rand-chacha
Jiloc 492b0e0
proxy stacks-common wasm features in clarity
Jiloc c007bc6
update Cargo.lock
Jiloc 0f9fecb
add git hack check workflow
Jiloc 018885a
Merge branch 'develop' into chore/clarity-vm-feature-gate
Jiloc 9703978
Merge branch 'chore/clarity-vm-feature-gate' into feature/cargo-hack-…
Jiloc 96f77c8
remove stacks-signer/monitoring_prom from features
Jiloc 66cf8ba
remove summary job. pin taiki-e/install-action
Jiloc 85c72ce
split cache between wasm-deterministic and wasm-web
Jiloc 6b35872
fix cargo check features=testing for stacks-node
Jiloc 0c956e2
Merge branch 'develop' into feature/cargo-hack-check-ci
Jiloc fd13754
Update .github/workflows/cargo-hack-check.yml
Jiloc 2ebf15e
remove http-parser feature
Jiloc 5783141
Merge branch 'develop' into chore/stacks-common-optional-requirements
Jiloc 13aa4b5
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 0f4dbe5
Merge branch 'chore/clarity-vm-feature-gate' into feature/cargo-hack-…
Jiloc 190d4e9
Merge branch 'feature/cargo-hack-check-ci' of github.com:Jiloc/stacks…
Jiloc d54bc3d
add persist-credentials: false to checkouts
Jiloc 06b120b
add toolchain name to cache
Jiloc 372d08c
remove now redundant cargo checks
Jiloc 908b21c
remove unused default features
Jiloc 1029432
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 7dba0eb
remove unused slog import
Jiloc 9770d5a
Merge branch 'chore/clarity-vm-feature-gate' into feature/cargo-hack-…
Jiloc 5694877
update cargo.lock
Jiloc 4a70884
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 66d9077
disable unused defaul-features for clarity
Jiloc 37c823f
Merge branch 'chore/clarity-vm-feature-gate' into feature/cargo-hack-…
Jiloc 4fdd73e
split linux and windows jobs
Jiloc 06b010a
remove clippy::assertions_on_constants
Jiloc dc7be7b
Merge branch 'develop' into chore/stacks-common-optional-requirements
Jiloc 016ace1
Merge branch 'chore/stacks-common-optional-requirements' into chore/c…
Jiloc 44fcfb6
Merge branch 'chore/clarity-vm-feature-gate' into feature/cargo-hack-…
Jiloc e982df6
Revert "split linux and windows jobs"
Jiloc 1e8c83c
install targets with the target param
Jiloc 75c4155
Merge branch 'develop' into feature/cargo-hack-check-ci
Jiloc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: Cargo Hack Check | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
RUST_BACKTRACE: full | ||
|
||
concurrency: | ||
group: cargo-hack-check-${{ github.head_ref || github.ref || github.run_id }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
# Setup job to prepare common dependencies | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
rust-toolchain: ${{ steps.toolchain.outputs.rust-toolchain }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Get Rust toolchain | ||
id: toolchain | ||
run: echo "rust-toolchain=$(cat ./rust-toolchain)" >> $GITHUB_OUTPUT | ||
|
||
# Native targets (Windows/Linux) | ||
native-targets: | ||
name: All Crates (Windows/Linux) | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Rust with Cache | ||
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | ||
with: | ||
toolchain: ${{ needs.setup.outputs.rust-toolchain }} | ||
target: x86_64-pc-windows-gnu,x86_64-unknown-linux-gnu | ||
cache: true | ||
cache-key: cargo-hack-native-${{ needs.setup.outputs.rust-toolchain }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8 | ||
with: | ||
tool: cargo-hack | ||
|
||
- name: Install Windows cross-compilation tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-mingw-w64-x86-64 | ||
wileyj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Run cargo hack check | ||
run: | | ||
cargo hack check \ | ||
--all \ | ||
--each-feature \ | ||
--no-dev-deps \ | ||
--exclude-features=wasm-deterministic,wasm-web \ | ||
--target x86_64-pc-windows-gnu \ | ||
--target x86_64-unknown-linux-gnu | ||
|
||
# WASM targets - separate cache since dependencies differ | ||
wasm-targets: | ||
name: ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: "Clarity & Stacks-Common WASM Web" | ||
command: | | ||
cargo hack check \ | ||
-p clarity \ | ||
-p stacks-common \ | ||
--each-feature \ | ||
--no-dev-deps \ | ||
--exclude-features=default,rusqlite,testing,wasm-deterministic \ | ||
--features=wasm-web | ||
|
||
- name: "Clarity & Stacks-Common WASM Deterministic" | ||
command: | | ||
cargo hack check \ | ||
-p clarity \ | ||
-p stacks-common \ | ||
--each-feature \ | ||
--no-dev-deps \ | ||
--include-features=wasm-deterministic,slog_json \ | ||
--features=wasm-deterministic | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
fdefelici marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Rust with Cache | ||
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | ||
with: | ||
toolchain: ${{ needs.setup.outputs.rust-toolchain }} | ||
target: wasm32-unknown-unknown | ||
cache: true | ||
cache-key: cargo-hack-wasm-${{ matrix.name }}-${{ needs.setup.outputs.rust-toolchain }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8 | ||
with: | ||
tool: cargo-hack | ||
|
||
- name: Run cargo hack check | ||
run: ${{ matrix.command }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.