Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from ASuciuX/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ASuciuX authored Aug 12, 2024
2 parents 44b1762 + 36dd8a2 commit de35fb9
Show file tree
Hide file tree
Showing 394 changed files with 79,335 additions and 20,411 deletions.
File renamed without changes.
17 changes: 15 additions & 2 deletions .github/actions/dockerfiles/Dockerfile.alpine-binary
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,18 @@ RUN case ${TARGETPLATFORM} in \
&& unzip ${BIN_ARCH}.zip -d /out

FROM --platform=${TARGETPLATFORM} alpine
COPY --from=builder /out/stacks-node /out/stacks-signer /bin/
CMD ["stacks-node", "mainnet"]
COPY --from=builder /out/* /bin/
ARG TAG

RUN case "${TAG}" in \
signer-*) \
echo "/bin/stacks-signer run --config /signer-config.toml" > /tmp/command.sh \
;; \
*) \
echo "/bin/stacks-node mainnet" > /tmp/command.sh && \
rm /bin/blockstack-cli /bin/clarity-cli /bin/relay-server /bin/stacks-events /bin/stacks-inspect \
;; \
esac && \
chmod +x /tmp/command.sh

CMD ["sh", "-c", "/tmp/command.sh"]
17 changes: 15 additions & 2 deletions .github/actions/dockerfiles/Dockerfile.debian-binary
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,18 @@ RUN case ${TARGETPLATFORM} in \
&& unzip ${BIN_ARCH}.zip -d /out

FROM --platform=${TARGETPLATFORM} debian:bookworm
COPY --from=builder /out/stacks-node /out/stacks-signer /bin/
CMD ["stacks-node", "mainnet"]
COPY --from=builder /out/* /bin/
ARG TAG

RUN case "${TAG}" in \
signer-*) \
echo "/bin/stacks-signer run --config /signer-config.toml" > /tmp/command.sh \
;; \
*) \
echo "/bin/stacks-node mainnet" > /tmp/command.sh && \
rm /bin/blockstack-cli /bin/clarity-cli /bin/relay-server /bin/stacks-events /bin/stacks-inspect \
;; \
esac && \
chmod +x /tmp/command.sh

CMD ["sh", "-c", "/tmp/command.sh"]
37 changes: 31 additions & 6 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,41 @@ jobs:
- tests::nakamoto_integrations::correct_burn_outs
- tests::nakamoto_integrations::vote_for_aggregate_key_burn_op
- tests::nakamoto_integrations::follower_bootup
- tests::signer::stackerdb_dkg
- tests::signer::stackerdb_sign
- tests::signer::stackerdb_block_proposal
- tests::signer::stackerdb_filter_bad_transactions
- tests::signer::stackerdb_mine_2_nakamoto_reward_cycles
- tests::signer::stackerdb_sign_after_signer_reboot
- tests::nakamoto_integrations::forked_tenure_is_ignored
- tests::nakamoto_integrations::nakamoto_attempt_time
- tests::signer::v0::block_proposal_rejection
- tests::signer::v0::miner_gather_signatures
- tests::signer::v0::mine_2_nakamoto_reward_cycles
- tests::signer::v0::end_of_tenure
- tests::signer::v0::forked_tenure_okay
- tests::signer::v0::forked_tenure_invalid
- tests::signer::v0::empty_sortition
- tests::signer::v0::bitcoind_forking_test
- tests::signer::v0::multiple_miners
- tests::signer::v0::mock_sign_epoch_25
- tests::signer::v0::signer_set_rollover
- tests::signer::v0::miner_forking
- tests::signer::v0::reloads_signer_set_in
- tests::nakamoto_integrations::stack_stx_burn_op_integration_test
- tests::nakamoto_integrations::check_block_heights
- tests::nakamoto_integrations::clarity_burn_state
- tests::nakamoto_integrations::check_block_times
- tests::nakamoto_integrations::check_block_info
- tests::nakamoto_integrations::check_block_info_rewards
- tests::nakamoto_integrations::continue_tenure_extend
- tests::nakamoto_integrations::mock_mining
- tests::nakamoto_integrations::multiple_miners
# Do not run this one until we figure out why it fails in CI
# - tests::neon_integrations::bitcoin_reorg_flap
# - tests::neon_integrations::bitcoin_reorg_flap_with_follower
# TODO: enable these once v1 signer is supported by a new nakamoto epoch
# - tests::signer::v1::dkg
# - tests::signer::v1::sign_request_rejected
# - tests::signer::v1::filter_bad_transactions
# - tests::signer::v1::delayed_dkg
# - tests::signer::v1::mine_2_nakamoto_reward_cycles
# - tests::signer::v1::sign_after_signer_reboot
# - tests::signer::v1::block_proposal
steps:
## Setup test environment
- name: Setup Test Environment
Expand Down
145 changes: 75 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
- "**.md"
- "**.yml"
workflow_dispatch:
inputs:
tag:
description: "The tag to create (optional)"
required: false
pull_request:
types:
- opened
Expand All @@ -34,7 +30,7 @@ concurrency:
## Always cancel duplicate jobs
cancel-in-progress: true

run-name: ${{ inputs.tag }}
run-name: ${{ github.ref_name }}

jobs:
##
Expand All @@ -48,166 +44,175 @@ jobs:
name: Rust Format
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Rust Toolchain
id: setup_rust_toolchain
uses: actions-rust-lang/setup-rust-toolchain@f3c84ee10bf5a86e7a5d607d487bf17d57670965 # v1.5.0
with:
components: rustfmt
cache: false

- name: Rustfmt
id: rustfmt
uses: stacks-network/actions/rustfmt@main
with:
alias: "fmt-stacks"

######################################################################################
## Check if the branch that this workflow is being run against is a release branch
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 }}
steps:
- name: Check Release
id: check_release
uses: stacks-network/actions/stacks-core/check-release@main
with:
tag: ${{ github.ref_name }}

######################################################################################
## Create a tagged github release
##
## Runs when the following is true:
## - tag is provided
## Runs when:
## - it is a release run
create-release:
if: |
inputs.tag != ''
needs.check-release.outputs.is_release == 'true'
name: Create Release
needs:
- rustfmt
- check-release
uses: ./.github/workflows/github-release.yml
with:
tag: ${{ inputs.tag }}
tag: ${{ needs.check-release.outputs.tag }}
docker_tag: ${{ needs.check-release.outputs.docker_tag }}
secrets: inherit

## Build and push Debian image built from source
##
## Runs when:
## - tag is not provided
## - it is not a release run
docker-image:
if: |
inputs.tag == ''
needs.check-release.outputs.is_release != 'true'
name: Docker Image (Source)
uses: ./.github/workflows/image-build-source.yml
needs:
- rustfmt
- check-release
secrets: inherit

## Create a reusable cache for tests
##
## Runs when:
## - tag is provided
## - it is a release run
## or:
## - no tag provided
## - it is not a release run
## and any of:
## - this workflow is called manually
## - PR is opened
## - commit to either (development, master) branch
create-cache:
if: |
inputs.tag != '' || (
inputs.tag == '' && (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
needs.check-release.outputs.is_release == 'true' || (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
)
name: Create Test Cache
needs:
- rustfmt
- check-release
uses: ./.github/workflows/create-cache.yml

## Tests to run regularly
##
## Runs when:
## - tag is provided
## - it is a release run
## or:
## - no tag provided
## - 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
stacks-core-tests:
if: |
inputs.tag != '' || (
inputs.tag == '' && (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
needs.check-release.outputs.is_release == 'true' || (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
)
name: Stacks Core Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/stacks-core-tests.yml

bitcoin-tests:
if: |
inputs.tag != '' || (
inputs.tag == '' && (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
needs.check-release.outputs.is_release == 'true' || (
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group' ||
(
contains('
refs/heads/master
refs/heads/develop
refs/heads/next
', github.event.pull_request.head.ref) &&
github.event_name == 'push'
)
)
name: Bitcoin Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/bitcoin-tests.yml

## Test to run on a tagged release
##
## Runs when:
## - tag is provided
## - it is a release run
atlas-tests:
if: inputs.tag != ''
if: needs.check-release.outputs.is_release == 'true'
name: Atlas Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/atlas-tests.yml

epoch-tests:
if: inputs.tag != ''
if: needs.check-release.outputs.is_release == 'true'
name: Epoch Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/epoch-tests.yml

slow-tests:
if: inputs.tag != ''
if: needs.check-release.outputs.is_release == 'true'
name: Slow Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/slow-tests.yml

4 changes: 2 additions & 2 deletions .github/workflows/clarity-js-sdk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout latest clarity js sdk
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
token: ${{ secrets.GH_TOKEN }}
repository: ${{ env.CLARITY_JS_SDK_REPOSITORY }}
Expand All @@ -46,7 +46,7 @@ jobs:

- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: "chore: update clarity-native-bin tag"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Build docs
id: build_docs
Expand All @@ -46,7 +46,7 @@ jobs:

- name: Checkout latest docs
id: git_checkout_docs
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
token: ${{ secrets.DOCS_GITHUB_TOKEN }}
repository: ${{ env.TARGET_REPOSITORY }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Open PR
id: open_pr
if: ${{ steps.push.outputs.open_pr == '1' }}
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.DOCS_GITHUB_TOKEN }}
script: |
Expand Down
Loading

0 comments on commit de35fb9

Please sign in to comment.