Skip to content

Commit

Permalink
Merge branch 'next' into ci/dry_x64_builds
Browse files Browse the repository at this point in the history
  • Loading branch information
wileyj committed Mar 4, 2024
2 parents 1999ab5 + 0910eed commit 5ca35e8
Show file tree
Hide file tree
Showing 146 changed files with 3,890 additions and 1,789 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
) ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
Expand Down
125 changes: 104 additions & 21 deletions .github/workflows/pr-differences-mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- synchronize
- ready_for_review
paths:
- "**.rs"
- '**.rs'

concurrency:
group: pr-differences-${{ github.head_ref || github.ref || github.run_id }}
Expand All @@ -23,10 +23,13 @@ jobs:
runs-on: ubuntu-latest

outputs:
run_big_packages: ${{ steps.check_packages_and_shards.outputs.run_big_packages }}
big_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.big_packages_with_shards }}
run_stackslib: ${{ steps.check_packages_and_shards.outputs.run_stackslib }}
stackslib_with_shards: ${{ steps.check_packages_and_shards.outputs.stackslib_with_shards }}
run_stacks_node: ${{ steps.check_packages_and_shards.outputs.run_stacks_node }}
stacks_node_with_shards: ${{ steps.check_packages_and_shards.outputs.stacks_node_with_shards }}
run_small_packages: ${{ steps.check_packages_and_shards.outputs.run_small_packages }}
small_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.small_packages_with_shards }}
run_stacks_signer: ${{ steps.check_packages_and_shards.outputs.run_stacks_signer }}

steps:
- id: check_packages_and_shards
Expand All @@ -38,23 +41,27 @@ jobs:

needs: check-big-packages-and-shards

if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'false' }}
if: |
needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' &&
needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'false'
runs-on: ubuntu-latest

steps:
- name: Run mutants on diffs
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
package-dimension: "small"
package: 'small'

# Mutation testing - Execute on PR on small packages that have functions modified (run with strategy matrix shards)
pr-differences-mutants-small-shards:
name: Mutation Testing - Shards, Small

needs: check-big-packages-and-shards

if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'true' }}
if: |
needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' &&
needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'true'
runs-on: ubuntu-latest

Expand All @@ -68,15 +75,17 @@ jobs:
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
shard: ${{ matrix.shard }}
package-dimension: "small"
package: 'small'

# Mutation testing - Execute on PR on big packages that have functions modified (normal run, no shards)
pr-differences-mutants-big-normal:
name: Mutation Testing - Normal, Big
# Mutation testing - Execute on PR on stackslib package (normal run, no shards)
pr-differences-mutants-stackslib-normal:
name: Mutation Testing - Normal, Stackslib

needs: check-big-packages-and-shards

if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'false' }}
if: |
needs.check-big-packages-and-shards.outputs.run_stackslib == 'true' &&
needs.check-big-packages-and-shards.outputs.stackslib_with_shards == 'false'
runs-on: ubuntu-latest

Expand All @@ -87,15 +96,17 @@ jobs:
RUST_BACKTRACE: full
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
package-dimension: "big"
package: 'stackslib'

# Mutation testing - Execute on PR on big packages that have functions modified (run with strategy matrix shards)
pr-differences-mutants-big-shards:
name: Mutation Testing - Shards, Big
# Mutation testing - Execute on PR on stackslib package (run with strategy matrix shards)
pr-differences-mutants-stackslib-shards:
name: Mutation Testing - Shards, Stackslib

needs: check-big-packages-and-shards

if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'true' }}
if: |
needs.check-big-packages-and-shards.outputs.run_stackslib == 'true' &&
needs.check-big-packages-and-shards.outputs.stackslib_with_shards == 'true'
runs-on: ubuntu-latest

Expand All @@ -112,28 +123,100 @@ jobs:
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
shard: ${{ matrix.shard }}
package-dimension: "big"
package: 'stackslib'

# Mutation testing - Execute on PR on stacks-node package (normal run, no shards)
pr-differences-mutants-stacks-node-normal:
name: Mutation Testing - Normal, Stacks Node

needs: check-big-packages-and-shards

if: |
needs.check-big-packages-and-shards.outputs.run_stacks_node == 'true' &&
needs.check-big-packages-and-shards.outputs.stacks_node_with_shards == 'false'
runs-on: ubuntu-latest

steps:
- name: Run Run mutants on diffs
env:
BITCOIND_TEST: 1
RUST_BACKTRACE: full
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
package: 'stacks-node'

# Mutation testing - Execute on PR on stacks-node package (run with strategy matrix shards)
pr-differences-mutants-stacks-node-shards:
name: Mutation Testing - Shards, Stacks Node

needs: check-big-packages-and-shards

if: |
needs.check-big-packages-and-shards.outputs.run_stacks_node == 'true' &&
needs.check-big-packages-and-shards.outputs.stacks_node_with_shards == 'true'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]

steps:
- name: Run mutants on diffs
env:
BITCOIND_TEST: 1
RUST_BACKTRACE: full
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
shard: ${{ matrix.shard }}
package: 'stacks-node'

# Mutation testing - Execute on PR on stacks-signer package (normal run, no shards)
pr-differences-mutants-stacks-signer-normal:
name: Mutation Testing - Normal, Stacks Signer

needs: check-big-packages-and-shards

if: |
needs.check-big-packages-and-shards.outputs.run_stacks_signer == 'true'
runs-on: ubuntu-latest

steps:
- name: Run mutants on diffs
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
with:
package: 'stacks-signer'

# Output the mutants and fail the workflow if there are missed/timeout/unviable mutants
output-mutants:
name: Output Mutants

runs-on: ubuntu-latest

if: always()
needs:
[
check-big-packages-and-shards,
pr-differences-mutants-small-normal,
pr-differences-mutants-small-shards,
pr-differences-mutants-big-normal,
pr-differences-mutants-big-shards,
pr-differences-mutants-stackslib-normal,
pr-differences-mutants-stackslib-shards,
pr-differences-mutants-stacks-node-normal,
pr-differences-mutants-stacks-node-shards,
pr-differences-mutants-stacks-signer-normal,
]

steps:
- name: Output Mutants
uses: stacks-network/actions/stacks-core/mutation-testing/output-pr-mutants@main
with:
big_packages: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages }}
shards_for_big_packages: ${{ needs.check-big-packages-and-shards.outputs.big_packages_with_shards }}
stackslib_package: ${{ needs.check-big-packages-and-shards.outputs.run_stackslib }}
shards_for_stackslib_package: ${{ needs.check-big-packages-and-shards.outputs.stackslib_with_shards }}
stacks_node_package: ${{ needs.check-big-packages-and-shards.outputs.run_stacks_node }}
shards_for_stacks_node_package: ${{ needs.check-big-packages-and-shards.outputs.stacks_node_with_shards }}
small_packages: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages }}
shards_for_small_packages: ${{ needs.check-big-packages-and-shards.outputs.small_packages_with_shards }}
stacks_signer: ${{ needs.check-big-packages-and-shards.outputs.run_stacks_signer }}
3 changes: 2 additions & 1 deletion .github/workflows/stacks-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ jobs:
id: codecov
uses: stacks-network/actions/codecov@main
with:
fail_ci_if_error: true
test-name: ${{ matrix.test-name }}
upload-only: true
filename: ./lcov.info
filename: ./contrib/core-contract-tests/lcov.info

# Core contract tests on Clarinet v1
# Check for false positives/negatives
Expand Down
90 changes: 1 addition & 89 deletions Cargo.lock

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

3 changes: 0 additions & 3 deletions clarity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,3 @@ developer-mode = []
slog_json = ["stacks_common/slog_json"]
testing = []

[target.'cfg(all(target_arch = "x86_64", not(any(target_os="windows"))))'.dependencies]
sha2-asm = "0.5.3"

1 change: 0 additions & 1 deletion clarity/src/libclarity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pub use stacks_common::{
pub mod vm;

pub mod boot_util {
use std::convert::TryFrom;

use stacks_common::types::chainstate::StacksAddress;

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/analysis/type_checker/v2_05/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod contexts;
pub mod natives;

use std::collections::BTreeMap;
use std::convert::TryInto;

use hashbrown::HashMap;
use stacks_common::types::StacksEpochId;
Expand Down

0 comments on commit 5ca35e8

Please sign in to comment.