aboutsummaryrefslogtreecommitdiff
path: root/embassy-mcxa
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-12-04 19:38:25 +0100
committerJames Munns <[email protected]>2025-12-04 19:38:25 +0100
commit308952d41e57c2041dc6857295e2fd3d9cd6cd17 (patch)
treedde034026783f609cbfbf377319794a5a9f93f84 /embassy-mcxa
parent85b92010deb835d27ce30ec0870cdedadf4465ec (diff)
Remove standalone CI steps
Diffstat (limited to 'embassy-mcxa')
-rw-r--r--embassy-mcxa/.github/DOCS.md23
-rw-r--r--embassy-mcxa/.github/codecov.yml21
-rw-r--r--embassy-mcxa/.github/dependabot.yml19
-rw-r--r--embassy-mcxa/.github/workflows/cargo-vet-pr-comment.yml137
-rw-r--r--embassy-mcxa/.github/workflows/cargo-vet.yml53
-rw-r--r--embassy-mcxa/.github/workflows/check.yml215
-rw-r--r--embassy-mcxa/.github/workflows/nostd.yml38
-rw-r--r--embassy-mcxa/.github/workflows/rolling.yml58
8 files changed, 0 insertions, 564 deletions
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 @@
1# Github config and workflows
2
3In this folder there is configuration for codecoverage, dependabot, and ci
4workflows that check the library more deeply than the default configurations.
5
6This folder can be or was merged using a --allow-unrelated-histories merge
7strategy from <https://github.com/jonhoo/rust-ci-conf/> which provides a
8reasonably sensible base for writing your own ci on. By using this strategy
9the history of the CI repo is included in your repo, and future updates to
10the CI can be merged later.
11
12To perform this merge run:
13
14```shell
15git remote add ci https://github.com/jonhoo/rust-ci-conf.git
16git fetch ci
17git merge --allow-unrelated-histories ci/main
18```
19
20An overview of the files in this project is available at:
21<https://www.youtube.com/watch?v=xUH-4y92jPg&t=491s>, which contains some
22rationale for decisions and runs through an example of solving minimal version
23and 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 @@
1# ref: https://docs.codecov.com/docs/codecovyml-reference
2coverage:
3 # Hold ourselves to a high bar
4 range: 85..100
5 round: down
6 precision: 1
7 status:
8 # ref: https://docs.codecov.com/docs/commit-status
9 project:
10 default:
11 # Avoid false negatives
12 threshold: 1%
13
14# Test files aren't important for coverage
15ignore:
16 - "tests"
17
18# Make comments less noisy
19comment:
20 layout: "files"
21 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 @@
1version: 2
2updates:
3 - package-ecosystem: github-actions
4 directory: /
5 schedule:
6 interval: daily
7 - package-ecosystem: cargo
8 directory: /
9 schedule:
10 interval: daily
11 ignore:
12 - dependency-name: "*"
13 # patch and minor updates don't matter for libraries as consumers of this library build
14 # with their own lockfile, rather than the version specified in this library's lockfile
15 # remove this ignore rule if your package has binaries to ensure that the binaries are
16 # built with the exact set of dependencies and those are up to date.
17 update-types:
18 - "version-update:semver-patch"
19 - "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 @@
1# This workflow triggers after cargo-vet workflow has run.
2# It adds a comment to the PR with the results of the cargo vet run.
3# It first adds a comment if the cargo vet run fails,
4# and updates the comment if the cargo vet run succeeds after having failed at least once.
5
6name: Cargo vet PR comment
7
8on:
9 workflow_run:
10 workflows: [cargo-vet]
11 types:
12 - completed
13
14permissions:
15 contents: read
16 pull-requests: write
17
18concurrency:
19 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20 cancel-in-progress: true
21
22jobs:
23
24 find-pr-comment:
25 # This job runs when the cargo-vet job fails or succeeds
26 # It will download the artifact from the failed job and post a comment on the PR
27 runs-on: ubuntu-latest
28 outputs:
29 comment-id: ${{ steps.get-comment-id.outputs.comment-id }}
30 pr-number: ${{ steps.get-pr-number.outputs.pr_number }}
31 if: github.event.workflow_run.event == 'pull_request'
32 steps:
33 - name: 'Download artifact'
34 uses: actions/download-artifact@v6
35 with:
36 github-token: ${{ secrets.GITHUB_TOKEN }}
37 name: pr
38 path: pr/
39 run-id: ${{ github.event.workflow_run.id }}
40
41 - name: 'Get PR number'
42 id: get-pr-number
43 run: echo "pr_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT
44
45 - name: 'Find existing comment'
46 id: find-comment
47 uses: peter-evans/find-comment@v4
48 with:
49 issue-number: ${{ steps.get-pr-number.outputs.pr_number }}
50 comment-author: 'github-actions[bot]'
51 body-includes: 'comment-tag: [cargo-vet]'
52
53 - name: 'Get comment ID'
54 id: get-comment-id
55 if: ${{ steps.find-comment.outputs.comment-id != '' }}
56 run: echo "comment-id=${{ steps.find-comment.outputs.comment-id }}" >> $GITHUB_OUTPUT
57
58 post-comment-failure:
59 # This job runs when the cargo-vet job fails
60 # It will download the artifact from the failed job and post a comment on the PR
61 runs-on: ubuntu-latest
62 needs: find-pr-comment
63 if: github.event.workflow_run.conclusion == 'failure'
64 steps:
65 - name: 'Comment on PR - Failure'
66 uses: peter-evans/create-or-update-comment@v5
67 with:
68 comment-id: ${{ needs.find-pr-comment.outputs.comment-id }}
69 issue-number: ${{ needs.find-pr-comment.outputs.pr-number }}
70 body: |
71 # Cargo Vet Audit Failed
72
73 `cargo vet` has failed in this PR. Please run `cargo vet --locked` locally to check for new or updated unvetted dependencies.
74 Details about the vetting process can be found in [supply-chain/README.md](../blob/main/supply-chain/README.md)
75
76 ## If the unvetted dependencies are not needed
77 Please modify Cargo.toml file to avoid including the dependencies.
78
79 ## If the unvetted dependencies are needed
80 Post a new comment with the questionnaire below to the PR to help the auditors vet the dependencies.
81 After the auditors have vetted the dependencies, the PR will need to be rebased to pick up the new audits and pass this check.
82
83 ### Copy and paste the questionnaire as a new comment and provide your answers:
84
85 **1. What crates (with version) need to be audited?**
86
87 **2. How many of the crates are version updates vs new dependencies?**
88
89 **3. To confirm none of the already included crates serve your needs, please provide a brief description of the purpose of the new crates.**
90
91 **4. Any extra notes to the auditors to help with their audits.**
92
93 <!--
94 This comment is auto-generated by the cargo-vet workflow.
95 Please do not edit it directly.
96
97 comment-tag: [cargo-vet]
98 -->
99 edit-mode: replace
100
101 - name: 'Label PR'
102 uses: actions/github-script@v8
103 with:
104 script: |
105 github.rest.issues.addLabels({
106 issue_number: ${{ needs.find-pr-comment.outputs.pr-number }},
107 owner: context.repo.owner,
108 repo: context.repo.repo,
109 labels: ['cargo vet']
110 })
111
112 post-comment-success:
113 # This job runs when the cargo-vet job succeeds
114 # It will update the comment on the PR with a success message
115 runs-on: ubuntu-latest
116 needs: find-pr-comment
117 if: github.event.workflow_run.conclusion == 'success'
118 steps:
119 - name: 'Comment on PR - Success'
120 # Only update the comment if it exists
121 # This is to avoid creating a new comment if the cargo-vet job has never failed before
122 if: ${{ needs.find-pr-comment.outputs.comment-id }}
123 uses: peter-evans/create-or-update-comment@v5
124 with:
125 comment-id: ${{ needs.find-pr-comment.outputs.comment-id }}
126 issue-number: ${{ needs.find-pr-comment.outputs.pr-number }}
127 body: |
128 # Cargo Vet Audit Passed
129 `cargo vet` has passed in this PR. No new unvetted dependencies were found.
130
131 <!--
132 This comment is auto-generated by the cargo-vet workflow.
133 Please do not edit it directly.
134
135 comment-tag: [cargo-vet]
136 -->
137 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 @@
1# This workflow runs whenever a PR is opened or updated. It runs cargo vet to check for unvetted dependencies in the Cargo.lock file.
2permissions:
3 contents: read
4on:
5 pull_request:
6
7concurrency:
8 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9 cancel-in-progress: true
10
11name: cargo-vet
12jobs:
13 vet:
14 # cargo-vet checks for unvetted dependencies in the Cargo.lock file
15 # This is to ensure that new dependencies are vetted before they are added to the project
16 name: vet-dependencies
17 runs-on: ubuntu-latest
18 env:
19 CARGO_VET_VERSION: 0.10.1
20
21 steps:
22 - uses: actions/checkout@v6
23 with:
24 submodules: true
25
26 - uses: actions/cache@v4
27 with:
28 path: ${{ runner.tool_cache }}/cargo-vet
29 key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
30
31 - name: Add the tool cache directory to the search path
32 run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
33
34 - name: Ensure that the tool cache is populated with the cargo-vet binary
35 run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
36
37 - name: Invoke cargo-vet
38 run: cargo vet --locked
39
40 - name: Save PR number
41 # 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
42 # 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
43 if: ${{ failure() }} || ${{ success() }}
44 run: |
45 mkdir -p ./pr
46 echo ${{ github.event.number }} > ./pr/NR
47 - uses: actions/upload-artifact@v5
48 # Need to upload the artifact in both success and failure cases so comment can be updated in either case
49 if: ${{ failure() }} || ${{ success() }}
50 with:
51 name: pr
52 path: pr/
53 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 @@
1# This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs
2# several checks:
3# - fmt: checks that the code is formatted according to rustfmt
4# - clippy: checks that the code does not contain any clippy warnings
5# - doc: checks that the code can be documented without errors
6# - hack: check combinations of feature flags
7# - msrv: check that the msrv specified in the crate is correct
8permissions:
9 contents: read
10
11# This configuration allows maintainers of this repo to create a branch and pull request based on
12# the new branch. Restricting the push trigger to the main branch ensures that the PR only gets
13# built once.
14on:
15
16 push:
17 branches: [main, main-nextgen]
18 pull_request:
19
20# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
21# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
22concurrency:
23 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24 cancel-in-progress: true
25
26name: check
27
28jobs:
29
30 fmt:
31 runs-on: ubuntu-latest
32 name: nightly / fmt
33
34 strategy:
35 fail-fast: false
36 matrix:
37 workdir: [ ".", "examples",]
38
39 steps:
40 - uses: actions/checkout@v6
41 with:
42 submodules: true
43
44 - name: Install nightly
45 uses: dtolnay/rust-toolchain@nightly
46 with:
47 components: rustfmt
48 targets: thumbv8m.main-none-eabihf
49
50 - name: cargo fmt --check
51 run: cargo fmt --check
52 working-directory: ${{ matrix.workdir }}
53
54 clippy-examples:
55 runs-on: ubuntu-latest
56 name: ${{ matrix.toolchain }} / clippy
57
58 permissions:
59 contents: read
60 checks: write
61
62 strategy:
63 fail-fast: false
64 matrix:
65 # Get early warning of new lints which are regularly introduced in beta channels.
66 toolchain: [stable]
67 workdir: ["examples"]
68
69 steps:
70 - uses: actions/checkout@v6
71 with:
72 submodules: true
73
74 - name: Install ${{ matrix.toolchain }}
75 uses: dtolnay/rust-toolchain@master
76 with:
77 toolchain: ${{ matrix.toolchain }}
78 components: clippy
79 targets: thumbv8m.main-none-eabihf
80
81 - name: cargo clippy
82 working-directory: ${{ matrix.workdir }}
83 run: |
84 cargo clippy --locked -- -Dwarnings -D clippy::suspicious -D clippy::correctness -D clippy::perf -D clippy::style
85
86 # Enable once we have a released crate
87 # semver:
88 # runs-on: ubuntu-latest
89 # name: semver
90 # steps:
91 # - uses: actions/checkout@v6
92 # with:
93 # submodules: true
94 # - name: Install stable
95 # uses: dtolnay/rust-toolchain@stable
96 # with:
97 # components: rustfmt
98 # - name: cargo-semver-checks
99 # uses: obi1kenobi/cargo-semver-checks-action@v2
100
101 doc:
102 # run docs generation on nightly rather than stable. This enables features like
103 # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
104 # API be documented as only available in some specific platforms.
105 runs-on: ubuntu-latest
106 name: nightly / doc
107
108 steps:
109 - uses: actions/checkout@v6
110 with:
111 submodules: true
112
113 - name: Install nightly
114 uses: dtolnay/rust-toolchain@nightly
115 with:
116 targets: thumbv8m.main-none-eabihf
117
118 - name: cargo doc
119 run: |
120 cargo doc --no-deps --all-features --locked
121 env:
122 RUSTDOCFLAGS: --cfg docsrs
123
124 hack:
125 # cargo-hack checks combinations of feature flags to ensure that features are all additive
126 # which is required for feature unification
127 runs-on: ubuntu-latest
128 name: ubuntu / stable / features
129
130 strategy:
131 fail-fast: false
132
133 steps:
134 - uses: actions/checkout@v6
135 with:
136 submodules: true
137
138 - name: Install stable
139 uses: dtolnay/rust-toolchain@stable
140 with:
141 toolchain: stable
142 components: clippy
143 targets: thumbv8m.main-none-eabihf
144
145 - name: cargo install cargo-hack
146 uses: taiki-e/install-action@cargo-hack
147
148 - name: cargo hack
149 run: cargo hack --feature-powerset check
150
151 deny:
152 # cargo-deny checks licenses, advisories, sources, and bans for
153 # our dependencies.
154 runs-on: ubuntu-latest
155 name: ubuntu / stable / deny
156
157 steps:
158 - uses: actions/checkout@v6
159 with:
160 submodules: true
161
162 - name: Install stable
163 uses: dtolnay/rust-toolchain@stable
164 with:
165 targets: thumbv8m.main-none-eabihf
166
167 - name: cargo install cargo-deny
168 uses: EmbarkStudios/cargo-deny-action@v2
169 with:
170 log-level: warn
171 manifest-path: ./Cargo.toml
172 command: check
173 arguments: --all-features --locked
174
175 msrv:
176 # check that we can build using the minimal rust version that is specified by this crate
177 runs-on: ubuntu-latest
178 # we use a matrix here just because env can't be used in job names
179 # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
180 strategy:
181 fail-fast: false
182 matrix:
183 msrv: ["1.91"] # We're relying on namespaced-features, which
184 # was released in 1.60
185 #
186 # We also depend on `fixed' which requires rust
187 # 1.71
188 #
189 # Additionally, we depend on embedded-hal-async
190 # which requires 1.75
191 #
192 # embassy-time requires 1.79 due to
193 # collapse_debuginfo
194 #
195 # embassy upstream switched to rust 1.85
196 #
197 # unsigned_is_multiple_of requires 1.90, else we get clippy warnings
198 #
199 # [email protected] requires rustc 1.91
200
201 name: ubuntu / ${{ matrix.msrv }}
202 steps:
203 - uses: actions/checkout@v6
204 with:
205 submodules: true
206
207 - name: Install ${{ matrix.msrv }}
208 uses: dtolnay/rust-toolchain@master
209 with:
210 toolchain: ${{ matrix.msrv }}
211 targets: thumbv8m.main-none-eabihf
212
213 - name: cargo +${{ matrix.msrv }} check
214 run: |
215 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 @@
1# This workflow checks whether the library is able to run without the std library (e.g., embedded).
2# This entire file should be removed if this crate does not support no-std. See check.yml for
3# information about how the concurrency cancellation and workflow triggering works
4permissions:
5 contents: read
6
7on:
8 push:
9 branches: [main, main-nextgen]
10 pull_request:
11
12concurrency:
13 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14 cancel-in-progress: true
15
16name: no-std
17
18jobs:
19 nostd:
20 runs-on: ubuntu-latest
21 name: ${{ matrix.target }}
22
23 steps:
24 - uses: actions/checkout@v6
25 with:
26 submodules: true
27
28 - name: Install stable
29 uses: dtolnay/rust-toolchain@stable
30 with:
31 targets: thumbv8m.main-none-eabihf
32
33 - name: Show variable
34 run: echo ${{ env.TOKEN }}
35
36 - name: cargo check
37 run: |
38 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 @@
1# This workflow runs every morning at midnight. It will run cargo hack
2# and a build with msrv. If any dependency breaks our crate, we will
3# know ASAP.
4#
5# - check: build with all features
6# - msrv: check that the msrv specified in the crate is correct
7permissions:
8 contents: read
9
10on:
11 schedule:
12 - cron: '0 0 * * *'
13
14name: rolling
15jobs:
16
17 check:
18 runs-on: ubuntu-latest
19 name: ubuntu / stable / features
20 strategy:
21 fail-fast: false
22 steps:
23 - uses: actions/checkout@v6
24 with:
25 submodules: true
26 - name: Install stable
27 uses: dtolnay/rust-toolchain@stable
28 with:
29 targets: thumbv8m.main-none-eabihf
30
31 - name: cargo install cargo-hack
32 uses: taiki-e/install-action@cargo-hack
33 - name: cargo check
34 run: |
35 cargo update
36 cargo check --all-features
37
38 msrv:
39 runs-on: ubuntu-latest
40 strategy:
41 fail-fast: false
42 matrix:
43 msrv: ["1.91"]
44
45 name: ubuntu / ${{ matrix.msrv }} (${{ matrix.commit }})
46 steps:
47 - uses: actions/checkout@v6
48 with:
49 submodules: true
50 - name: Install ${{ matrix.msrv }}
51 uses: dtolnay/rust-toolchain@master
52 with:
53 toolchain: ${{ matrix.msrv }}
54 targets: thumbv8m.main-none-eabihf
55 - name: cargo +${{ matrix.msrv }} check
56 run: |
57 cargo update
58 cargo check --all-features