Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions .github/actions/set-up-gh/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'install gh'
description: 'Install the gh cli in a debian based distro and switches to the PR branch.'
name: "install gh"
description: "Install the gh cli in a debian based distro and switches to the PR branch."
inputs:
pr-number:
description: "Number of the PR"
Expand All @@ -9,28 +9,20 @@ inputs:
required: true
outputs:
branch:
description: 'Branch name for the PR'
description: "Branch name for the PR"
value: ${{ steps.branch.outputs.branch }}
runs:
using: "composite"
steps:
- name: Instal gh cli
shell: bash
# Here it would get the script from previous step
run: |
(type -p wget >/dev/null || (apt update && apt-get install wget -y))
mkdir -p -m 755 /etc/apt/keyrings
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt update
apt install gh -y
git config --global --add safe.directory '*'
- run: gh pr checkout ${{ inputs.pr-number }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GH_TOKEN }}
- name: Export branch name
shell: bash
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
id: branch
- name: Set up git
shell: bash
# Here it would get the script from previous step
run: git config --global --add safe.directory '*'
- run: gh pr checkout ${{ inputs.pr-number }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GH_TOKEN }}
- name: Export branch name
shell: bash
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
id: branch
9 changes: 4 additions & 5 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ env:
TOOLCHAIN: nightly-2024-06-01

jobs:
preflight:
uses: ./.github/workflows/reusable-preflight.yml
check-semver:
runs-on: ubuntu-latest
needs: [preflight]
container:
image: docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
Expand All @@ -36,10 +39,6 @@ jobs:
run: |
echo "This is a backport into stable."

wget -q https://github.com/cli/cli/releases/download/v2.51.0/gh_2.51.0_linux_amd64.tar.gz -O gh.tar.gz && \
tar -xzf gh.tar.gz && mv gh_2.51.0_linux_amd64/bin/gh /usr/local/bin/gh && rm gh.tar.gz
chmod +x /usr/local/bin/gh

cat > msg.txt <<EOF
This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,41 @@ jobs:
if: ${{ matrix.partition == '1/3' }}
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api --cargo-quiet

# some tests do not run with `try-runtime` feature enabled
# https://github.com/paritytech/polkadot-sdk/pull/4251#discussion_r1624282143
#
# all_security_features_work and nonexistent_cache_dir are currently skipped
# becuase runners don't have the necessary permissions to run them
test-linux-stable-no-try-runtime:
needs: [preflight]
if: ${{ needs.preflight.outputs.changes_rust }}
runs-on: ${{ needs.preflight.outputs.RUNNER }}
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
strategy:
fail-fast: false
matrix:
partition: [1/2, 2/2]
env:
RUST_TOOLCHAIN: stable
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
forklift cargo nextest run --workspace \
--locked \
--release \
--no-fail-fast \
--cargo-quiet \
--features experimental,riscv,ci-only-tests \
--filter-expr " !test(/all_security_features_work/) - test(/nonexistent_cache_dir/)" \
--partition count:${{ matrix.partition }} \

confirm-required-jobs-passed:
runs-on: ubuntu-latest
name: All tests passed
Expand All @@ -107,6 +142,7 @@ jobs:
test-linux-stable-int,
test-linux-stable-runtime-benchmarks,
test-linux-stable,
test-linux-stable-no-try-runtime,
]
if: always() && !cancelled()
steps:
Expand Down
25 changes: 0 additions & 25 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,31 +110,6 @@ test-linux-stable-codecov:
codecovcli -v do-upload -f target/coverage/result/report-${CI_NODE_INDEX}.lcov --disable-search -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --git-service github;
fi

# some tests do not run with `try-runtime` feature enabled
# https://github.com/paritytech/polkadot-sdk/pull/4251#discussion_r1624282143
# Move to github after https://github.com/paritytech/ci_cd/issues/1056 is fixed
test-linux-stable-no-try-runtime:
stage: test
extends:
- .docker-env
- .common-refs
- .run-immediately
- .pipeline-stopper-artifacts
variables:
RUST_TOOLCHAIN: stable
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- >
time cargo nextest run \
--workspace \
--locked \
--release \
--no-fail-fast \
--cargo-quiet \
--features experimental,riscv,ci-only-tests

test-doc:
stage: test
extends:
Expand Down