From 308952d41e57c2041dc6857295e2fd3d9cd6cd17 Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 4 Dec 2025 19:38:25 +0100 Subject: Remove standalone CI steps --- embassy-mcxa/.github/DOCS.md | 23 --- embassy-mcxa/.github/codecov.yml | 21 -- embassy-mcxa/.github/dependabot.yml | 19 -- .../.github/workflows/cargo-vet-pr-comment.yml | 137 ------------- embassy-mcxa/.github/workflows/cargo-vet.yml | 53 ----- embassy-mcxa/.github/workflows/check.yml | 215 --------------------- embassy-mcxa/.github/workflows/nostd.yml | 38 ---- embassy-mcxa/.github/workflows/rolling.yml | 58 ------ 8 files changed, 564 deletions(-) delete mode 100644 embassy-mcxa/.github/DOCS.md delete mode 100644 embassy-mcxa/.github/codecov.yml delete mode 100644 embassy-mcxa/.github/dependabot.yml delete mode 100644 embassy-mcxa/.github/workflows/cargo-vet-pr-comment.yml delete mode 100644 embassy-mcxa/.github/workflows/cargo-vet.yml delete mode 100644 embassy-mcxa/.github/workflows/check.yml delete mode 100644 embassy-mcxa/.github/workflows/nostd.yml delete mode 100644 embassy-mcxa/.github/workflows/rolling.yml diff --git a/embassy-mcxa/.github/DOCS.md b/embassy-mcxa/.github/DOCS.md deleted file mode 100644 index e932784c7..000000000 --- a/embassy-mcxa/.github/DOCS.md +++ /dev/null @@ -1,23 +0,0 @@ -# Github config and workflows - -In this folder there is configuration for codecoverage, dependabot, and ci -workflows that check the library more deeply than the default configurations. - -This folder can be or was merged using a --allow-unrelated-histories merge -strategy from which provides a -reasonably sensible base for writing your own ci on. By using this strategy -the history of the CI repo is included in your repo, and future updates to -the CI can be merged later. - -To perform this merge run: - -```shell -git remote add ci https://github.com/jonhoo/rust-ci-conf.git -git fetch ci -git merge --allow-unrelated-histories ci/main -``` - -An overview of the files in this project is available at: -, which contains some -rationale for decisions and runs through an example of solving minimal version -and OpenSSL issues. diff --git a/embassy-mcxa/.github/codecov.yml b/embassy-mcxa/.github/codecov.yml deleted file mode 100644 index cd5ce8fc1..000000000 --- a/embassy-mcxa/.github/codecov.yml +++ /dev/null @@ -1,21 +0,0 @@ -# ref: https://docs.codecov.com/docs/codecovyml-reference -coverage: - # Hold ourselves to a high bar - range: 85..100 - round: down - precision: 1 - status: - # ref: https://docs.codecov.com/docs/commit-status - project: - default: - # Avoid false negatives - threshold: 1% - -# Test files aren't important for coverage -ignore: - - "tests" - -# Make comments less noisy -comment: - layout: "files" - require_changes: true diff --git a/embassy-mcxa/.github/dependabot.yml b/embassy-mcxa/.github/dependabot.yml deleted file mode 100644 index d0f091e7b..000000000 --- a/embassy-mcxa/.github/dependabot.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: daily - - package-ecosystem: cargo - directory: / - schedule: - interval: daily - ignore: - - dependency-name: "*" - # patch and minor updates don't matter for libraries as consumers of this library build - # with their own lockfile, rather than the version specified in this library's lockfile - # remove this ignore rule if your package has binaries to ensure that the binaries are - # built with the exact set of dependencies and those are up to date. - update-types: - - "version-update:semver-patch" - - "version-update:semver-minor" diff --git a/embassy-mcxa/.github/workflows/cargo-vet-pr-comment.yml b/embassy-mcxa/.github/workflows/cargo-vet-pr-comment.yml deleted file mode 100644 index 66f27ceab..000000000 --- a/embassy-mcxa/.github/workflows/cargo-vet-pr-comment.yml +++ /dev/null @@ -1,137 +0,0 @@ -# This workflow triggers after cargo-vet workflow has run. -# It adds a comment to the PR with the results of the cargo vet run. -# It first adds a comment if the cargo vet run fails, -# and updates the comment if the cargo vet run succeeds after having failed at least once. - -name: Cargo vet PR comment - -on: - workflow_run: - workflows: [cargo-vet] - types: - - completed - -permissions: - contents: read - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - - find-pr-comment: - # This job runs when the cargo-vet job fails or succeeds - # It will download the artifact from the failed job and post a comment on the PR - runs-on: ubuntu-latest - outputs: - comment-id: ${{ steps.get-comment-id.outputs.comment-id }} - pr-number: ${{ steps.get-pr-number.outputs.pr_number }} - if: github.event.workflow_run.event == 'pull_request' - steps: - - name: 'Download artifact' - uses: actions/download-artifact@v6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - name: pr - path: pr/ - run-id: ${{ github.event.workflow_run.id }} - - - name: 'Get PR number' - id: get-pr-number - run: echo "pr_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT - - - name: 'Find existing comment' - id: find-comment - uses: peter-evans/find-comment@v4 - with: - issue-number: ${{ steps.get-pr-number.outputs.pr_number }} - comment-author: 'github-actions[bot]' - body-includes: 'comment-tag: [cargo-vet]' - - - name: 'Get comment ID' - id: get-comment-id - if: ${{ steps.find-comment.outputs.comment-id != '' }} - run: echo "comment-id=${{ steps.find-comment.outputs.comment-id }}" >> $GITHUB_OUTPUT - - post-comment-failure: - # This job runs when the cargo-vet job fails - # It will download the artifact from the failed job and post a comment on the PR - runs-on: ubuntu-latest - needs: find-pr-comment - if: github.event.workflow_run.conclusion == 'failure' - steps: - - name: 'Comment on PR - Failure' - uses: peter-evans/create-or-update-comment@v5 - with: - comment-id: ${{ needs.find-pr-comment.outputs.comment-id }} - issue-number: ${{ needs.find-pr-comment.outputs.pr-number }} - body: | - # Cargo Vet Audit Failed - - `cargo vet` has failed in this PR. Please run `cargo vet --locked` locally to check for new or updated unvetted dependencies. - Details about the vetting process can be found in [supply-chain/README.md](../blob/main/supply-chain/README.md) - - ## If the unvetted dependencies are not needed - Please modify Cargo.toml file to avoid including the dependencies. - - ## If the unvetted dependencies are needed - Post a new comment with the questionnaire below to the PR to help the auditors vet the dependencies. - After the auditors have vetted the dependencies, the PR will need to be rebased to pick up the new audits and pass this check. - - ### Copy and paste the questionnaire as a new comment and provide your answers: - - **1. What crates (with version) need to be audited?** - - **2. How many of the crates are version updates vs new dependencies?** - - **3. To confirm none of the already included crates serve your needs, please provide a brief description of the purpose of the new crates.** - - **4. Any extra notes to the auditors to help with their audits.** - - - edit-mode: replace - - - name: 'Label PR' - uses: actions/github-script@v8 - with: - script: | - github.rest.issues.addLabels({ - issue_number: ${{ needs.find-pr-comment.outputs.pr-number }}, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['cargo vet'] - }) - - post-comment-success: - # This job runs when the cargo-vet job succeeds - # It will update the comment on the PR with a success message - runs-on: ubuntu-latest - needs: find-pr-comment - if: github.event.workflow_run.conclusion == 'success' - steps: - - name: 'Comment on PR - Success' - # Only update the comment if it exists - # This is to avoid creating a new comment if the cargo-vet job has never failed before - if: ${{ needs.find-pr-comment.outputs.comment-id }} - uses: peter-evans/create-or-update-comment@v5 - with: - comment-id: ${{ needs.find-pr-comment.outputs.comment-id }} - issue-number: ${{ needs.find-pr-comment.outputs.pr-number }} - body: | - # Cargo Vet Audit Passed - `cargo vet` has passed in this PR. No new unvetted dependencies were found. - - - edit-mode: replace diff --git a/embassy-mcxa/.github/workflows/cargo-vet.yml b/embassy-mcxa/.github/workflows/cargo-vet.yml deleted file mode 100644 index d585d1df5..000000000 --- a/embassy-mcxa/.github/workflows/cargo-vet.yml +++ /dev/null @@ -1,53 +0,0 @@ -# This workflow runs whenever a PR is opened or updated. It runs cargo vet to check for unvetted dependencies in the Cargo.lock file. -permissions: - contents: read -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -name: cargo-vet -jobs: - vet: - # cargo-vet checks for unvetted dependencies in the Cargo.lock file - # This is to ensure that new dependencies are vetted before they are added to the project - name: vet-dependencies - runs-on: ubuntu-latest - env: - CARGO_VET_VERSION: 0.10.1 - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - uses: actions/cache@v4 - with: - path: ${{ runner.tool_cache }}/cargo-vet - key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} - - - name: Add the tool cache directory to the search path - run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH - - - name: Ensure that the tool cache is populated with the cargo-vet binary - run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet - - - name: Invoke cargo-vet - run: cargo vet --locked - - - name: Save PR number - # PR number is saved as an artifact so it can be used to determine the PR to comment on by the vet-pr-comment workflow - # vet-pr-comment workflow is triggered by the workflow_run event so it runs in the context of the base branch and not the PR branch - if: ${{ failure() }} || ${{ success() }} - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/NR - - uses: actions/upload-artifact@v5 - # Need to upload the artifact in both success and failure cases so comment can be updated in either case - if: ${{ failure() }} || ${{ success() }} - with: - name: pr - path: pr/ - overwrite: true \ No newline at end of file diff --git a/embassy-mcxa/.github/workflows/check.yml b/embassy-mcxa/.github/workflows/check.yml deleted file mode 100644 index ad9f44428..000000000 --- a/embassy-mcxa/.github/workflows/check.yml +++ /dev/null @@ -1,215 +0,0 @@ -# This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs -# several checks: -# - fmt: checks that the code is formatted according to rustfmt -# - clippy: checks that the code does not contain any clippy warnings -# - doc: checks that the code can be documented without errors -# - hack: check combinations of feature flags -# - msrv: check that the msrv specified in the crate is correct -permissions: - contents: read - -# This configuration allows maintainers of this repo to create a branch and pull request based on -# the new branch. Restricting the push trigger to the main branch ensures that the PR only gets -# built once. -on: - - push: - branches: [main, main-nextgen] - pull_request: - -# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that -# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5 -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -name: check - -jobs: - - fmt: - runs-on: ubuntu-latest - name: nightly / fmt - - strategy: - fail-fast: false - matrix: - workdir: [ ".", "examples",] - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install nightly - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt - targets: thumbv8m.main-none-eabihf - - - name: cargo fmt --check - run: cargo fmt --check - working-directory: ${{ matrix.workdir }} - - clippy-examples: - runs-on: ubuntu-latest - name: ${{ matrix.toolchain }} / clippy - - permissions: - contents: read - checks: write - - strategy: - fail-fast: false - matrix: - # Get early warning of new lints which are regularly introduced in beta channels. - toolchain: [stable] - workdir: ["examples"] - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install ${{ matrix.toolchain }} - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - components: clippy - targets: thumbv8m.main-none-eabihf - - - name: cargo clippy - working-directory: ${{ matrix.workdir }} - run: | - cargo clippy --locked -- -Dwarnings -D clippy::suspicious -D clippy::correctness -D clippy::perf -D clippy::style - - # Enable once we have a released crate - # semver: - # runs-on: ubuntu-latest - # name: semver - # steps: - # - uses: actions/checkout@v6 - # with: - # submodules: true - # - name: Install stable - # uses: dtolnay/rust-toolchain@stable - # with: - # components: rustfmt - # - name: cargo-semver-checks - # uses: obi1kenobi/cargo-semver-checks-action@v2 - - doc: - # run docs generation on nightly rather than stable. This enables features like - # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an - # API be documented as only available in some specific platforms. - runs-on: ubuntu-latest - name: nightly / doc - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install nightly - uses: dtolnay/rust-toolchain@nightly - with: - targets: thumbv8m.main-none-eabihf - - - name: cargo doc - run: | - cargo doc --no-deps --all-features --locked - env: - RUSTDOCFLAGS: --cfg docsrs - - hack: - # cargo-hack checks combinations of feature flags to ensure that features are all additive - # which is required for feature unification - runs-on: ubuntu-latest - name: ubuntu / stable / features - - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install stable - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: clippy - targets: thumbv8m.main-none-eabihf - - - name: cargo install cargo-hack - uses: taiki-e/install-action@cargo-hack - - - name: cargo hack - run: cargo hack --feature-powerset check - - deny: - # cargo-deny checks licenses, advisories, sources, and bans for - # our dependencies. - runs-on: ubuntu-latest - name: ubuntu / stable / deny - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install stable - uses: dtolnay/rust-toolchain@stable - with: - targets: thumbv8m.main-none-eabihf - - - name: cargo install cargo-deny - uses: EmbarkStudios/cargo-deny-action@v2 - with: - log-level: warn - manifest-path: ./Cargo.toml - command: check - arguments: --all-features --locked - - msrv: - # check that we can build using the minimal rust version that is specified by this crate - runs-on: ubuntu-latest - # we use a matrix here just because env can't be used in job names - # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability - strategy: - fail-fast: false - matrix: - msrv: ["1.91"] # We're relying on namespaced-features, which - # was released in 1.60 - # - # We also depend on `fixed' which requires rust - # 1.71 - # - # Additionally, we depend on embedded-hal-async - # which requires 1.75 - # - # embassy-time requires 1.79 due to - # collapse_debuginfo - # - # embassy upstream switched to rust 1.85 - # - # unsigned_is_multiple_of requires 1.90, else we get clippy warnings - # - # mcxa-pac@0.1.0 requires rustc 1.91 - - name: ubuntu / ${{ matrix.msrv }} - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install ${{ matrix.msrv }} - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.msrv }} - targets: thumbv8m.main-none-eabihf - - - name: cargo +${{ matrix.msrv }} check - run: | - cargo check --all-features --locked diff --git a/embassy-mcxa/.github/workflows/nostd.yml b/embassy-mcxa/.github/workflows/nostd.yml deleted file mode 100644 index cf6629854..000000000 --- a/embassy-mcxa/.github/workflows/nostd.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow checks whether the library is able to run without the std library (e.g., embedded). -# This entire file should be removed if this crate does not support no-std. See check.yml for -# information about how the concurrency cancellation and workflow triggering works -permissions: - contents: read - -on: - push: - branches: [main, main-nextgen] - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -name: no-std - -jobs: - nostd: - runs-on: ubuntu-latest - name: ${{ matrix.target }} - - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - - name: Install stable - uses: dtolnay/rust-toolchain@stable - with: - targets: thumbv8m.main-none-eabihf - - - name: Show variable - run: echo ${{ env.TOKEN }} - - - name: cargo check - run: | - cargo check --target thumbv8m.main-none-eabihf --all-features --locked diff --git a/embassy-mcxa/.github/workflows/rolling.yml b/embassy-mcxa/.github/workflows/rolling.yml deleted file mode 100644 index 73b48484a..000000000 --- a/embassy-mcxa/.github/workflows/rolling.yml +++ /dev/null @@ -1,58 +0,0 @@ -# This workflow runs every morning at midnight. It will run cargo hack -# and a build with msrv. If any dependency breaks our crate, we will -# know ASAP. -# -# - check: build with all features -# - msrv: check that the msrv specified in the crate is correct -permissions: - contents: read - -on: - schedule: - - cron: '0 0 * * *' - -name: rolling -jobs: - - check: - runs-on: ubuntu-latest - name: ubuntu / stable / features - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - name: Install stable - uses: dtolnay/rust-toolchain@stable - with: - targets: thumbv8m.main-none-eabihf - - - name: cargo install cargo-hack - uses: taiki-e/install-action@cargo-hack - - name: cargo check - run: | - cargo update - cargo check --all-features - - msrv: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - msrv: ["1.91"] - - name: ubuntu / ${{ matrix.msrv }} (${{ matrix.commit }}) - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - name: Install ${{ matrix.msrv }} - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.msrv }} - targets: thumbv8m.main-none-eabihf - - name: cargo +${{ matrix.msrv }} check - run: | - cargo update - cargo check --all-features -- cgit