Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stacks-network/stacks-core
Browse files Browse the repository at this point in the history
… into chore/add-drop-reason-to-p2p-logs
  • Loading branch information
jferrant committed Feb 8, 2025
2 parents bd12b6e + 851ada6 commit e40c02b
Show file tree
Hide file tree
Showing 25 changed files with 768 additions and 454 deletions.
7 changes: 3 additions & 4 deletions .github/actions/dockerfiles/Dockerfile.alpine-binary
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ ARG TARGETVARIANT
ARG REPO

RUN case ${TARGETPLATFORM} in \
linux/amd64/v2) BIN_ARCH=linux-glibc-x64-v2 ;; \
linux/amd64*) BIN_ARCH=linux-glibc-x64 ;; \
linux/arm64*) BIN_ARCH=linux-glibc-arm64 ;; \
linux/arm/v7) BIN_ARCH=linux-glibc-armv7 ;; \
linux/amd64*) BIN_ARCH=linux-musl-x64 ;; \
linux/arm64*) BIN_ARCH=linux-musl-arm64 ;; \
linux/arm/v7) BIN_ARCH=linux-musl-armv7 ;; \
*) exit 1 ;; \
esac \
&& echo "TARGETPLATFORM: $TARGETPLATFORM" \
Expand Down
1 change: 0 additions & 1 deletion .github/actions/dockerfiles/Dockerfile.debian-binary
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ARG TARGETVARIANT
ARG REPO

RUN case ${TARGETPLATFORM} in \
linux/amd64/v2) BIN_ARCH=linux-glibc-x64-v2 ;; \
linux/amd64*) BIN_ARCH=linux-glibc-x64 ;; \
linux/arm64*) BIN_ARCH=linux-glibc-arm64 ;; \
linux/arm/v7) BIN_ARCH=linux-glibc-armv7 ;; \
Expand Down
103 changes: 64 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,47 +52,66 @@ jobs:

######################################################################################
## Check if the branch that this workflow is being run against is a release branch
##
## Outputs:
## - node_tag: Tag of the stacks-node if the branch is a release one (example: release/3.4.0.0.1), null otherwise
## - node_docker_tag: Version of the stacks-node if the branch is a release one (example: 3.4.0.0.1), null otherwise
## - signer_tag: Tag of the stacks-signer if the branch is a release one (example: release/3.4.0.0.1.0), null otherwise
## - signer_docker_tag: Version of the stacks-signer if the branch is a release one (example: 3.4.0.0.1.0), null otherwise
## - is_node_release: True if the branch represents a 'stacks-node' release, false otherwise.
## If this is true, 'is_signer_release' will also be true, since a 'stacks-signer' binary
## is always released alongside 'stacks-node'.
## - is_signer_release: True if the branch represents a 'stacks-signer' release, false otherwise.
check-release:
name: Check Release
needs:
- rustfmt
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.check_release.outputs.tag }}
docker_tag: ${{ steps.check_release.outputs.docker_tag }}
is_release: ${{ steps.check_release.outputs.is_release }}
node_tag: ${{ steps.check_release.outputs.node_tag }}
node_docker_tag: ${{ steps.check_release.outputs.node_docker_tag }}
signer_tag: ${{ steps.check_release.outputs.signer_tag }}
signer_docker_tag: ${{ steps.check_release.outputs.signer_docker_tag }}
is_node_release: ${{ steps.check_release.outputs.is_node_release }}
is_signer_release: ${{ steps.check_release.outputs.is_signer_release }}
steps:
- name: Check Release
id: check_release
uses: stacks-network/actions/stacks-core/check-release@main
uses: stacks-network/actions/stacks-core/release/check-release@main
with:
tag: ${{ github.ref_name }}

######################################################################################
## Create a tagged github release
##
## Runs when:
## - it is a release run
## - it is either a node release or a signer release
create-release:
if: |
needs.check-release.outputs.is_release == 'true'
name: Create Release
needs.check-release.outputs.is_node_release == 'true' ||
needs.check-release.outputs.is_signer_release == 'true'
name: Create Release(s)
needs:
- rustfmt
- check-release
uses: ./.github/workflows/github-release.yml
with:
tag: ${{ needs.check-release.outputs.tag }}
docker_tag: ${{ needs.check-release.outputs.docker_tag }}
node_tag: ${{ needs.check-release.outputs.node_tag }}
node_docker_tag: ${{ needs.check-release.outputs.node_docker_tag }}
signer_tag: ${{ needs.check-release.outputs.signer_tag }}
signer_docker_tag: ${{ needs.check-release.outputs.signer_docker_tag }}
is_node_release: ${{ needs.check-release.outputs.is_node_release }}
is_signer_release: ${{ needs.check-release.outputs.is_signer_release }}
secrets: inherit

## Build and push Debian image built from source
##
## Runs when:
## - it is not a release run
## - it is not a node or signer-only release run
docker-image:
if: |
needs.check-release.outputs.is_release != 'true'
needs.check-release.outputs.is_node_release != 'true' ||
needs.check-release.outputs.is_signer_release != 'true'
name: Docker Image (Source)
uses: ./.github/workflows/image-build-source.yml
needs:
Expand All @@ -103,16 +122,14 @@ jobs:
## Create a reusable cache for tests
##
## Runs when:
## - it is a release run
## or:
## - it is not a release run
## and any of:
## - this workflow is called manually
## - PR is opened
## - commit to either (development, master) branch
## - it is a node release run
## or any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
create-cache:
if: |
needs.check-release.outputs.is_release == 'true' ||
needs.check-release.outputs.is_node_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
Expand All @@ -125,16 +142,15 @@ jobs:
## Tests to run regularly
##
## Runs when:
## - it is a release run
## or:
## - it is not a release run
## and any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
## - commit to either (development, next, master) branch
## - it is a node or signer-only release run
## or any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
stacks-core-tests:
if: |
needs.check-release.outputs.is_node_release == 'true' ||
needs.check-release.outputs.is_signer_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
Expand All @@ -148,16 +164,15 @@ jobs:
## Checks to run on built binaries
##
## Runs when:
## - it is a release run
## or:
## - it is not a release run
## and any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
## - commit to either (development, next, master) branch
## - it is a node or signer-only release run
## or any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
stacks-core-build-tests:
if: |
needs.check-release.outputs.is_node_release == 'true' ||
needs.check-release.outputs.is_signer_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
Expand All @@ -167,8 +182,17 @@ jobs:
- check-release
uses: ./.github/workflows/core-build-tests.yml

## Checks to run on built binaries
##
## Runs when:
## - it is a node release run
## or any of:
## - this workflow is called manually
## - PR is opened
## - PR added to merge queue
bitcoin-tests:
if: |
needs.check-release.outputs.is_node_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
Expand All @@ -181,6 +205,7 @@ jobs:

p2p-tests:
if: |
needs.check-release.outputs.is_node_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
Expand All @@ -194,9 +219,9 @@ jobs:
## Test to run on a tagged release
##
## Runs when:
## - it is a release run
## - it is a node release run
atlas-tests:
if: needs.check-release.outputs.is_release == 'true'
if: needs.check-release.outputs.is_node_release == 'true'
name: Atlas Tests
needs:
- rustfmt
Expand All @@ -205,7 +230,7 @@ jobs:
uses: ./.github/workflows/atlas-tests.yml

epoch-tests:
if: needs.check-release.outputs.is_release == 'true'
if: needs.check-release.outputs.is_node_release == 'true'
name: Epoch Tests
needs:
- rustfmt
Expand All @@ -214,7 +239,7 @@ jobs:
uses: ./.github/workflows/epoch-tests.yml

slow-tests:
if: needs.check-release.outputs.is_release == 'true'
if: needs.check-release.outputs.is_node_release == 'true'
name: Slow Tests
needs:
- rustfmt
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/create-source-binary.yml

This file was deleted.

Loading

0 comments on commit e40c02b

Please sign in to comment.