3bd2fa71eb
Bumps the ci_dependencies group with 5 updates: | Package | From | To | | --- | --- | --- | | [benchmark-action/github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark) | `1.20.7` | `1.21.0` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `6.19.2` | `7.0.0` | | [docker/login-action](https://github.com/docker/login-action) | `3.7.0` | `4.0.0` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.2.0` | `6.3.0` | | [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `47.0.4` | `47.0.5` | Updates `benchmark-action/github-action-benchmark` from 1.20.7 to 1.21.0 - [Release notes](https://github.com/benchmark-action/github-action-benchmark/releases) - [Changelog](https://github.com/benchmark-action/github-action-benchmark/blob/master/CHANGELOG.md) - [Commits](https://github.com/benchmark-action/github-action-benchmark/compare/4bdcce38c94cec68da58d012ac24b7b1155efe8b...a7bc2366eda11037936ea57d811a43b3418d3073) Updates `docker/build-push-action` from 6.19.2 to 7.0.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/10e90e3645eae34f1e60eeb005ba3a3d33f178e8...d08e5c354a6adb9ed34480a06d141179aa583294) Updates `docker/login-action` from 3.7.0 to 4.0.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/c94ce9fb468520275223c153574b00df6fe4bcc9...b45d80f862d83dbcd57f89517bcf500b2ab88fb2) Updates `actions/setup-node` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/6044e13b5dc448c55e2357c09f80417699197238...53b83947a5a98c8d113130e565377fae1a50d02f) Updates `tj-actions/changed-files` from 47.0.4 to 47.0.5 - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/7dee1b0c1557f278e5c7dc244927139d78c0e22a...22103cc46bda19c2b464ffe86db46df6922fd323) --- updated-dependencies: - dependency-name: benchmark-action/github-action-benchmark dependency-version: 1.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci_dependencies - dependency-name: docker/build-push-action dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci_dependencies - dependency-name: docker/login-action dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci_dependencies - dependency-name: actions/setup-node dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci_dependencies - dependency-name: tj-actions/changed-files dependency-version: 47.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: ci_dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
253 lines
8.5 KiB
YAML
253 lines
8.5 KiB
YAML
# Checks that doesn't require heavy lifting, like formatting, linting, etc.
|
|
name: quick-checks
|
|
|
|
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
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
isdraft:
|
|
uses: ./.github/workflows/reusable-isdraft.yml
|
|
preflight:
|
|
needs: isdraft
|
|
uses: ./.github/workflows/reusable-preflight.yml
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
needs: [preflight]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: Cargo fmt
|
|
id: required
|
|
run: cargo fmt --all -- --check
|
|
check-dependency-rules:
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: check dependency rules
|
|
run: |
|
|
cd bizinikiwi/
|
|
../.gitlab/ensure-deps.sh
|
|
check-zepter:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
needs: [preflight]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: fetch deps
|
|
run: |
|
|
# Pull all dependencies eagerly:
|
|
time cargo metadata --format-version=1 --locked > /dev/null
|
|
- name: Install newer Zepter
|
|
run: |
|
|
cargo install zepter@1.82.1 --locked -q
|
|
- name: run zepter
|
|
run: |
|
|
zepter --version
|
|
time zepter run check
|
|
test-rust-features:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
needs: [preflight]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: run rust features
|
|
run: bash .gitlab/rust-features.sh .
|
|
check-toml-format:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
needs: [preflight]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: check toml format
|
|
run: |
|
|
taplo format --check --config .config/taplo.toml
|
|
echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues"
|
|
check-workspace:
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.0 (22. Sep 2023)
|
|
- name: install python deps
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y python3-pip python3
|
|
pip3 install toml "cargo-workspace>=1.2.6"
|
|
- name: check integrity
|
|
run: >
|
|
python3 .github/scripts/check-workspace.py .
|
|
--exclude
|
|
"bizinikiwi/pezframe/contracts/fixtures/build"
|
|
"bizinikiwi/pezframe/contracts/fixtures/contracts/common"
|
|
- name: deny git deps
|
|
run: python3 .github/scripts/deny-git-deps.py .
|
|
check-markdown:
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: "18.x"
|
|
- name: Install tooling
|
|
run: |
|
|
npm install -g markdownlint-cli
|
|
markdownlint --version
|
|
- name: Check Markdown
|
|
env:
|
|
CONFIG: .github/.markdownlint.yaml
|
|
run: |
|
|
echo "Checking markdown formatting. More info: docs/contributor/markdown_linting.md"
|
|
echo "To fix potential errors, you can run 'markdownlint --config .github/.markdownlint.yaml -f --ignore target --ignore vendor .' locally."
|
|
markdownlint --config "$CONFIG" --ignore target --ignore vendor .
|
|
check-umbrella:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
needs: [preflight]
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.0 (22. Sep 2023)
|
|
- name: install python deps
|
|
run: pip3 install "cargo-workspace>=1.2.4" toml
|
|
- name: Install newer Zepter
|
|
run: |
|
|
cargo install zepter@1.82.1 --locked -q && zepter --version
|
|
- name: check umbrella correctness
|
|
run: |
|
|
# Fixes "detected dubious ownership" error in the ci
|
|
git config --global --add safe.directory '*'
|
|
|
|
# Ensure jq is installed
|
|
if ! command -v jq &> /dev/null; then
|
|
echo "Installing jq..."
|
|
apt-get update && apt-get install -y jq
|
|
fi
|
|
|
|
# Extract the umbrella crate version dynamically from cargo metadata
|
|
UMBRELLA_VERSION=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.manifest_path | endswith("umbrella/Cargo.toml")) | .version')
|
|
|
|
if [ -z "$UMBRELLA_VERSION" ]; then
|
|
echo "Warning: Could not determine umbrella version from cargo metadata, using fallback version 0.1.0"
|
|
UMBRELLA_VERSION="0.1.0"
|
|
fi
|
|
|
|
echo "Using umbrella crate version: $UMBRELLA_VERSION"
|
|
|
|
python3 scripts/generate-umbrella.py --sdk . --version "$UMBRELLA_VERSION"
|
|
|
|
cargo +nightly fmt -p pezkuwi-sdk
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
cat <<EOF
|
|
👋 Hello developer! Apparently you added a new crate that is not part of the umbrella crate?
|
|
|
|
You can just apply the patch (git apply PATCH_NAME) that was printed to make this CI check succeed.
|
|
|
|
Otherwise feel free to ask in the Merge Request or in Matrix chat.
|
|
EOF
|
|
|
|
git diff
|
|
exit 1
|
|
fi
|
|
check-fail-ci:
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
steps:
|
|
- name: Fetch latest code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Install ripgrep
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y ripgrep
|
|
- name: Check
|
|
run: |
|
|
set +e
|
|
rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$?
|
|
if [ $exit_status -eq 0 ]; then
|
|
echo "$ASSERT_REGEX was found, exiting with 1";
|
|
exit 1;
|
|
else
|
|
echo "No $ASSERT_REGEX was found, exiting with 0";
|
|
exit 0;
|
|
fi
|
|
env:
|
|
ASSERT_REGEX: "FAIL-CI"
|
|
GIT_DEPTH: 1
|
|
check-readme:
|
|
runs-on: ubuntu-latest
|
|
needs: isdraft
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install prerequisites
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y protobuf-compiler
|
|
|
|
- name: Set rust version from env file
|
|
run: |
|
|
RUST_VERSION=$(cat .github/env | sed -E 's/.*ci-unified:([^-]+)-([^-]+).*/\2/')
|
|
echo $RUST_VERSION
|
|
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
|
|
|
|
- name: Install Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98 # v1.15.3
|
|
with:
|
|
cache: false
|
|
toolchain: ${{ env.RUST_VERSION }}
|
|
components: cargo, clippy, rust-docs, rust-src, rustfmt, rustc, rust-std
|
|
|
|
- name: Find README.docify.md files and check generated READMEs
|
|
run: .github/scripts/check-missing-readme-generation.sh
|
|
|
|
confirm-required-checks-quick-jobs-passed:
|
|
runs-on: ubuntu-latest
|
|
name: All quick checks passed
|
|
# If any new job gets added, be sure to add it to this array
|
|
needs:
|
|
- fmt
|
|
- check-dependency-rules
|
|
- check-zepter
|
|
- test-rust-features
|
|
- check-toml-format
|
|
- check-workspace
|
|
- check-markdown
|
|
- check-umbrella
|
|
- check-fail-ci
|
|
- check-readme
|
|
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
|