Skip to content

Commit 49fcb0d

Browse files
authored
Merge branch 'develop' into fix/c-deps_master
2 parents af07c00 + b5e5539 commit 49fcb0d

12 files changed

+252
-14
lines changed

.github/workflows/docs-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ jobs:
6666
git add src/_data/boot-contracts-reference.json
6767
if $(git diff --staged --quiet --exit-code); then
6868
echo "No reference.json changes, stopping"
69-
echo "::set-output name=open_pr::0"
69+
echo "open_pr=0" >> "$GITHUB_OUTPUT"
7070
else
7171
git remote add robot https://github.com/$ROBOT_OWNER/$ROBOT_REPO
7272
git commit -m "auto: update Clarity references JSONs from stacks-core@${GITHUB_SHA}"
7373
git push robot $ROBOT_BRANCH
74-
echo "::set-output name=open_pr::1"
74+
echo "open_pr=1" >> "$GITHUB_OUTPUT"
7575
fi
7676
7777
- name: Open PR
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: PR Differences Mutants
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
paths:
11+
- "**.rs"
12+
13+
concurrency:
14+
group: pr-differences-${{ github.head_ref || github.ref || github.run_id }}
15+
# Always cancel duplicate jobs
16+
cancel-in-progress: true
17+
18+
jobs:
19+
# Check and output whether to run big (`stacks-node`/`stackslib`) or small (others) packages with or without shards
20+
check-big-packages-and-shards:
21+
name: Check Packages and Shards
22+
23+
runs-on: ubuntu-latest
24+
25+
outputs:
26+
run_big_packages: ${{ steps.check_packages_and_shards.outputs.run_big_packages }}
27+
big_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.big_packages_with_shards }}
28+
run_small_packages: ${{ steps.check_packages_and_shards.outputs.run_small_packages }}
29+
small_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.small_packages_with_shards }}
30+
31+
steps:
32+
- id: check_packages_and_shards
33+
uses: stacks-network/actions/stacks-core/mutation-testing/check-packages-and-shards@main
34+
35+
# Mutation testing - Execute on PR on small packages that have functions modified (normal run, no shards)
36+
pr-differences-mutants-small-normal:
37+
name: Mutation Testing - Normal, Small
38+
39+
needs: check-big-packages-and-shards
40+
41+
if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'false' }}
42+
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- name: Run mutants on diffs
47+
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
48+
with:
49+
package-dimension: "small"
50+
51+
# Mutation testing - Execute on PR on small packages that have functions modified (run with strategy matrix shards)
52+
pr-differences-mutants-small-shards:
53+
name: Mutation Testing - Shards, Small
54+
55+
needs: check-big-packages-and-shards
56+
57+
if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'true' }}
58+
59+
runs-on: ubuntu-latest
60+
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
shard: [0, 1, 2, 3]
65+
66+
steps:
67+
- name: Run mutants on diffs
68+
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
69+
with:
70+
shard: ${{ matrix.shard }}
71+
package-dimension: "small"
72+
73+
# Mutation testing - Execute on PR on big packages that have functions modified (normal run, no shards)
74+
pr-differences-mutants-big-normal:
75+
name: Mutation Testing - Normal, Big
76+
77+
needs: check-big-packages-and-shards
78+
79+
if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'false' }}
80+
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: Run Run mutants on diffs
85+
env:
86+
BITCOIND_TEST: 1
87+
RUST_BACKTRACE: full
88+
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
89+
with:
90+
package-dimension: "big"
91+
92+
# Mutation testing - Execute on PR on big packages that have functions modified (run with strategy matrix shards)
93+
pr-differences-mutants-big-shards:
94+
name: Mutation Testing - Shards, Big
95+
96+
needs: check-big-packages-and-shards
97+
98+
if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'true' }}
99+
100+
runs-on: ubuntu-latest
101+
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
shard: [0, 1, 2, 3, 4, 5, 6, 7]
106+
107+
steps:
108+
- name: Run mutants on diffs
109+
env:
110+
BITCOIND_TEST: 1
111+
RUST_BACKTRACE: full
112+
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main
113+
with:
114+
shard: ${{ matrix.shard }}
115+
package-dimension: "big"
116+
117+
# Output the mutants and fail the workflow if there are missed/timeout/unviable mutants
118+
output-mutants:
119+
name: Output Mutants
120+
121+
runs-on: ubuntu-latest
122+
123+
needs:
124+
[
125+
check-big-packages-and-shards,
126+
pr-differences-mutants-small-normal,
127+
pr-differences-mutants-small-shards,
128+
pr-differences-mutants-big-normal,
129+
pr-differences-mutants-big-shards,
130+
]
131+
132+
steps:
133+
- name: Output Mutants
134+
uses: stacks-network/actions/stacks-core/mutation-testing/output-pr-mutants@main
135+
with:
136+
big_packages: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages }}
137+
shards_for_big_packages: ${{ needs.check-big-packages-and-shards.outputs.big_packages_with_shards }}
138+
small_packages: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages }}
139+
shards_for_small_packages: ${{ needs.check-big-packages-and-shards.outputs.small_packages_with_shards }}

build-scripts/Dockerfile.linux-glibc-arm64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1818
&& CC=aarch64-linux-gnu-gcc \
1919
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
2020
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
21-
cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
21+
cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
2222
&& mkdir -p /out \
2323
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2424

build-scripts/Dockerfile.linux-glibc-armv7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1818
&& CC=arm-linux-gnueabihf-gcc \
1919
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
2020
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
21-
cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
21+
cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
2222
&& mkdir -p /out \
2323
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2424

2525
FROM scratch AS export-stage
26-
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
26+
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /

build-scripts/Dockerfile.linux-glibc-x64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y git
1515
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1616
&& cd ${BUILD_DIR} \
1717
&& rustup target add ${TARGET} \
18-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
18+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
1919
&& mkdir -p /out \
2020
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2121

build-scripts/Dockerfile.linux-musl-arm64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ COPY . .
1313
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1414
&& cd ${BUILD_DIR} \
1515
&& rustup target add ${TARGET} \
16-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
16+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
1717
&& mkdir -p /out \
1818
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
1919

2020
FROM scratch AS export-stage
2121
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
22+

build-scripts/Dockerfile.linux-musl-armv7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ COPY . .
1313
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1414
&& cd ${BUILD_DIR} \
1515
&& rustup target add ${TARGET} \
16-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
16+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
1717
&& mkdir -p /out \
1818
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
1919

2020
FROM scratch AS export-stage
21-
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
21+
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /

build-scripts/Dockerfile.linux-musl-x64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ RUN apk update && apk add git musl-dev
1515
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
1616
&& cd ${BUILD_DIR} \
1717
&& rustup target add ${TARGET} \
18-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
18+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
1919
&& mkdir -p /out \
2020
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2121

2222
FROM scratch AS export-stage
2323
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
24+

build-scripts/Dockerfile.macos-arm64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
2121
&& cd ${BUILD_DIR} \
2222
&& rustup target add ${TARGET} \
2323
&& . /opt/osxcross/env-macos-aarch64 \
24-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
24+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
2525
&& mkdir -p /out \
2626
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2727

2828
FROM scratch AS export-stage
2929
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
30+

build-scripts/Dockerfile.macos-x64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
2121
&& cd ${BUILD_DIR} \
2222
&& rustup target add ${TARGET} \
2323
&& . /opt/osxcross/env-macos-x86_64 \
24-
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
24+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
2525
&& mkdir -p /out \
2626
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2727

2828
FROM scratch AS export-stage
2929
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
30+

0 commit comments

Comments
 (0)