83192b638a
tests-linux-stable.yml: - Add SKIP_WASM_BUILD=1 to test-linux-stable-int, test-linux-stable-runtime-benchmarks, test-linux-stable, and test-linux-stable-no-try-runtime jobs - Remove wasm32v1-none target from test-linux-stable-runtime-benchmarks (not needed with SKIP_WASM_BUILD) - Tracking: https://github.com/pezkuwichain/pezkuwi-sdk/issues/358 build-publish-images.yml: - Add git safe.directory configuration to build-linux-stable and build-linux-bizinikiwi jobs - Fixes "fatal: detected dubious ownership in repository" error that occurs when build-only-wasm.sh script runs git rev-parse
181 lines
6.3 KiB
YAML
181 lines
6.3 KiB
YAML
# GHA for test-linux-stable-int, test-linux-stable, test-linux-stable-oldkernel
|
|
name: tests linux stable
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
merge_group:
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
isdraft:
|
|
uses: ./.github/workflows/reusable-isdraft.yml
|
|
preflight:
|
|
needs: isdraft
|
|
uses: ./.github/workflows/reusable-preflight.yml
|
|
|
|
test-linux-stable-int:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER_NEW }}
|
|
timeout-minutes: 60
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
env:
|
|
RUSTFLAGS: "-C debug-assertions -D warnings"
|
|
RUST_BACKTRACE: 1
|
|
WASM_BUILD_NO_COLOR: 1
|
|
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
|
|
# Ensure we run the UI tests.
|
|
RUN_UI_TESTS: 1
|
|
# Temporary: Skip WASM build due to serde_core + Rust 1.88 + WASM bug
|
|
# Tracking: https://github.com/pezkuwichain/pezkuwi-sdk/issues/358
|
|
SKIP_WASM_BUILD: 1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Add wasm32v1-none target
|
|
run: rustup target add wasm32v1-none || true
|
|
- name: script
|
|
id: required
|
|
run: WASM_BUILD_NO_COLOR=1 cargo test -p pezstaging-node-cli --release --locked -- --ignored
|
|
|
|
# https://github.com/pezkuwichain/ci_cd/issues/864
|
|
test-linux-stable-runtime-benchmarks:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER_NEW }}
|
|
timeout-minutes: 60
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
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"
|
|
# Temporary: Skip WASM build due to serde_core + Rust 1.88 + WASM bug
|
|
# Tracking: https://github.com/pezkuwichain/pezkuwi-sdk/issues/358
|
|
SKIP_WASM_BUILD: 1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: script
|
|
id: required
|
|
run: cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
|
|
|
|
test-linux-stable:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER_NEW }}
|
|
timeout-minutes: 75
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Reduced from 3x2=6 jobs to 3 jobs (single runner type)
|
|
partition: [1/3, 2/3, 3/3]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
options: --privileged
|
|
env:
|
|
RUST_TOOLCHAIN: stable
|
|
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
|
CARGO_INCREMENTAL: 0
|
|
# Temporary: Skip WASM build due to serde_core + Rust 1.88 + WASM bug
|
|
# Tracking: https://github.com/pezkuwichain/pezkuwi-sdk/issues/358
|
|
SKIP_WASM_BUILD: 1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
|
|
with:
|
|
shared-key: linux-stable-${{ matrix.partition }}
|
|
cache-on-failure: true
|
|
|
|
- name: Add wasm32v1-none target
|
|
run: rustup target add wasm32v1-none || true
|
|
|
|
- name: script
|
|
id: required
|
|
run: |
|
|
git config --global --add safe.directory '*'
|
|
cargo nextest run \
|
|
--workspace \
|
|
--locked \
|
|
--release \
|
|
--no-fail-fast \
|
|
--cargo-quiet \
|
|
--features try-runtime,experimental,ci-only-tests \
|
|
--partition count:${{ matrix.partition }}
|
|
|
|
- name: runtime-api tests
|
|
if: ${{ matrix.partition == '1/3' }}
|
|
run: cargo nextest run -p pezsp-api-test --features enable-pez-staging-api --cargo-quiet
|
|
|
|
# some tests do not run with `try-runtime` feature enabled
|
|
# https://github.com/pezkuwichain/pezkuwi-sdk/pull/4251#discussion_r1624282143
|
|
test-linux-stable-no-try-runtime:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER_NEW }}
|
|
timeout-minutes: 60
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
options: --privileged
|
|
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"
|
|
# Temporary: Skip WASM build due to serde_core + Rust 1.88 + WASM bug
|
|
# Tracking: https://github.com/pezkuwichain/pezkuwi-sdk/issues/358
|
|
SKIP_WASM_BUILD: 1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Add wasm32v1-none target
|
|
run: rustup target add wasm32v1-none || true
|
|
- name: script
|
|
id: required
|
|
run: |
|
|
cargo nextest run --workspace \
|
|
--locked \
|
|
--release \
|
|
--no-fail-fast \
|
|
--cargo-quiet \
|
|
--features experimental,ci-only-tests \
|
|
--partition count:${{ matrix.partition }}
|
|
|
|
confirm-required-jobs-passed:
|
|
runs-on: ubuntu-latest
|
|
name: All tests passed
|
|
# If any new job gets added, be sure to add it to this array
|
|
needs:
|
|
[
|
|
test-linux-stable-int,
|
|
test-linux-stable-runtime-benchmarks,
|
|
test-linux-stable,
|
|
test-linux-stable-no-try-runtime,
|
|
]
|
|
if: always() && !cancelled()
|
|
steps:
|
|
- run: |
|
|
tee resultfile <<< '${{ toJSON(needs) }}'
|
|
FAILURES=$(cat resultfile | grep '"result": "failure"' | wc -l)
|
|
if [ $FAILURES -gt 0 ]; then
|
|
echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY
|
|
exit 1
|
|
else
|
|
echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY
|
|
fi
|