Skip to content

1/merge

1/merge #2

Workflow file for this run

## The main Github Actions workflow
name: CI
on: pull_request
# on:
# merge_group:
# types:
# - checks_requested
# push:
# branches:
# - master
# - develop
# - next
# paths-ignore:
# - "**.md"
# - "**.yml"
# workflow_dispatch:
# pull_request:
# types:
# - opened
# - reopened
# - synchronize
defaults:
run:
shell: bash
concurrency:
group: ci-${{ github.head_ref || github.ref || github.run_id }}
## Always cancel duplicate jobs
cancel-in-progress: true
run-name: ${{ github.ref_name }}
jobs:
##
## Jobs to execute everytime workflow runs
## do not run if the trigger is any of the following:
## - PR review submitted (not approved)
## and any of:
## - PR review comment
## - PR change is requested
rustfmt:
name: Rust Format
runs-on: ubuntu-latest
steps:
- 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
##
## 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
permissions:
contents: write
needs:
- rustfmt
runs-on: ubuntu-latest
outputs:
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/release/check-release@main
with:
tag: ${{ github.ref_name }}
######################################################################################
## Create a tagged github release
##
## Runs when:
## - it is either a node release or a signer release
create-release:

Check failure on line 92 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 92, Col: 3): Error calling workflow 'TenkiCloud/stacks-core/.github/workflows/github-release.yml@f9b670543d212c30e63b1c7c27d77b0b6b50e49c'. The nested job 'build-binaries' is requesting 'attestations: write, id-token: write', but is only allowed 'attestations: none, id-token: none'. .github/workflows/ci.yml (Line: 92, Col: 3): Error calling workflow 'TenkiCloud/stacks-core/.github/workflows/github-release.yml@f9b670543d212c30e63b1c7c27d77b0b6b50e49c'. The nested job 'create-release' is requesting 'contents: write', but is only allowed 'contents: read'.
if: |
needs.check-release.outputs.is_node_release == 'true' ||
needs.check-release.outputs.is_signer_release == 'true'
name: Create Release(s)
needs:
- rustfmt
- check-release
secrets: inherit
uses: ./.github/workflows/github-release.yml
with:
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 }}
## Create a reusable cache for tests
##
## Runs when:
## - 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_node_release == 'true' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request' ||
github.event_name == 'merge_group'
name: Create Test Cache
needs:
- rustfmt
- check-release
uses: ./.github/workflows/create-cache.yml
## Tests to run regularly
##
## Runs when:
## - 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'
name: Stacks Core Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/stacks-core-tests.yml
## Validate constants dumped by stacks-inspect
##
## Runs when:
## - 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
constants-check:
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'
name: Constants Check
needs:
- rustfmt
- check-release
uses: ./.github/workflows/constants-check.yml
## Checks to run on built binaries
##
## Runs when:
## - 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
cargo-hack-check:
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'
name: Cargo Hack Check
needs:
- rustfmt
- check-release
uses: ./.github/workflows/cargo-hack-check.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'
name: Bitcoin Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/bitcoin-tests.yml
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'
name: P2P Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/p2p-tests.yml
## Test to run on a tagged release
##
## Runs when:
## - it is a node release run
atlas-tests:
if: needs.check-release.outputs.is_node_release == 'true'
name: Atlas Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/atlas-tests.yml
epoch-tests:
if: needs.check-release.outputs.is_node_release == 'true'
name: Epoch Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/epoch-tests.yml
slow-tests:
if: needs.check-release.outputs.is_node_release == 'true'
name: Slow Tests
needs:
- rustfmt
- create-cache
- check-release
uses: ./.github/workflows/slow-tests.yml