Skip to content

Commit

Permalink
Merge branch 'master' into chore/userlib-namespace-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aapoalas authored Oct 2, 2024
2 parents a21abd3 + a677a8d commit 633adda
Show file tree
Hide file tree
Showing 318 changed files with 5,567 additions and 2,053 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
app_toml: test/tests-stm32g0/app-g070.toml
image: default
- build: stm32f3
app_name: tests-stm32fx
app_name: tests-stm32fx-f3
app_toml: test/tests-stm32fx/app-f3.toml
image: default
- build: stm32f4
Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/build-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:

jobs:
build-one:
permissions:
id-token: write
attestations: write
name: "${{ inputs.app_name }}/${{ inputs.app_toml}}"
runs-on: ${{ inputs.os }}
env:
Expand All @@ -44,7 +47,7 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Cache vcpkg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: C:\vcpkg\downloads
key: ${{ runner.os }}-vcpkg-download-${{ inputs.os }}-${{ github.sha }}
Expand All @@ -60,19 +63,18 @@ jobs:

- name: Fetch Humility
uses: dsaltares/fetch-gh-release-asset@master
if: inputs.os == 'ubuntu-latest'
if: inputs.os == 'ubuntu-latest' || inputs.os == 'oxide-colo-builder-hubris'
with:
repo: "oxidecomputer/humility"
version: "59047694"
file: "humility"
target: "target/release/humility"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Test Humility manifest
# we need to chmod because all artifacts are marked as non-executable
if: inputs.os == 'ubuntu-latest'
if: inputs.os == 'ubuntu-latest' || inputs.os == 'oxide-colo-builder-hubris'
run: |
sudo apt-get update && sudo apt-get install libusb-1.0-0-dev libftdi1-dev
sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libftdi1-dev
sudo chmod +x target/release/humility
for image in `echo ${{ inputs.image }} | tr "," "\n"`; do \
mv target/${{ inputs.app_name }}/dist/$image/build-${{ inputs.app_name }}-image-$image.zip target/${{ inputs.app_name }}/dist/; \
Expand All @@ -84,10 +86,17 @@ jobs:
run: |
cargo xtask clippy ${{ inputs.app_toml}} -- --deny warnings
- name: Attestation
uses: actions/attest-build-provenance@v1
# Only attest if we're doing a colo build
if: inputs.os == 'oxide-colo-builder-hubris'
with:
subject-path: target/${{ inputs.app_name }}/dist/build-${{ inputs.app_name }}-image-*.zip

# upload the output of our build
- name: Upload build archive
uses: actions/upload-artifact@v3
if: inputs.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
if: inputs.os == 'ubuntu-latest' || inputs.os == 'oxide-colo-builder-hubris'
with:
name: dist-${{ inputs.os }}-${{ inputs.build }}
name: dist-${{ inputs.os }}-${{ inputs.app_name }}
path: target/${{ inputs.app_name }}/dist/build-${{ inputs.app_name }}-image-*.zip
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ jobs:
do-build:
uses: ./.github/workflows/build-boards.yml
with:
os: ubuntu-latest
os: oxide-colo-builder-hubris
board-set: ${{ inputs.board-set }}

release-build:
needs: do-build
runs-on: ubuntu-latest
runs-on: oxide-colo-builder-hubris
steps:
- name: grab binary
id: grab
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: out
- name: prep
run: |
VERSION=$(cut -d/ -f3- <<< "$GITHUB_REF")
VERSION=`echo $VERSION | awk -F- '{print $NF}'`
OUT=${{ steps.grab.outputs.download-path }}
for build in `ls $OUT`; do
for f in `ls $OUT/$build`; do
mv $OUT/$build/$f $OUT/`basename $f .zip`-$VERSION.zip
mv $OUT/$build/$f $OUT/$f
done
done
Expand All @@ -39,5 +37,6 @@ jobs:
with:
name: "${{ inputs.board-set }} release"
fail_on_unmatched_files: true
body: "These are UNVERSIONED hubris artifacts"
files: |
${{ steps.grab.outputs.download-path }}/*.zip
62 changes: 30 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ memoffset = { version = "0.6.5", default-features = false }
multimap = { version = "0.8.3", default-features = false }
nb = { version = "1", default-features = false }
num = { version = "0.4", default-features = false }
num-derive = { version = "0.3.3", default-features = false, features = ["full-syntax"] }
num-derive = { version = "0.4", default-features = false }
num-traits = { version = "0.2.12", default-features = false }
p256 = { version = "0.13.2", default-features = false, features = ["ecdsa"] }
panic-halt = { version = "0.2.0", default-features = false }
Expand Down Expand Up @@ -134,8 +134,24 @@ salty = { version = "0.3", default-features = false }
spd = { git = "https://github.com/oxidecomputer/spd", default-features = false }
tlvc = { git = "https://github.com/oxidecomputer/tlvc", default-features = false, version = "0.3.1" }
tlvc-text = { git = "https://github.com/oxidecomputer/tlvc", default-features = false, version = "0.3.0" }
transceiver-messages = { git = "https://github.com/oxidecomputer/transceiver-control/", default-features = false}
transceiver-messages = { git = "https://github.com/oxidecomputer/transceiver-control/", default-features = false }
vsc7448-pac = { git = "https://github.com/oxidecomputer/vsc7448", default-features = false }

[workspace.lints.rust]
elided_lifetimes_in_paths = "warn"

[workspace.lints.clippy]
wildcard_imports = "deny"
# TODO: turn this back on once we've fixed them :/
#wildcard_imports = "deny"

# TODO: should clean up the comments eventually and switch these back to warn.
too_long_first_doc_paragraph = "allow"
doc_lazy_continuation = "allow"

# TODO: these are currently allowed because it would be a giant pain to fix
# them, but we should make them warn in the future!
too_many_arguments = "allow"
identity_op = "allow"
missing_safety_doc = "allow"
manual_inspect = "allow"
single_match = "allow"
5 changes: 2 additions & 3 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ application described by the TOML file.
- `cargo xtask dist app/demo-stm32f4-discovery/app.toml` - stm32f4-discovery
- `cargo xtask dist app/demo-stm32f4-discovery/app-f3.toml` - stm32f3-discovery
- `cargo xtask dist app/lpc55xpresso/app.toml` - lpcxpresso55s69
- `cargo xtask dist app/demo-stm32g0-nucleo/app-g031.toml` - stm32g031
- `cargo xtask dist app/demo-stm32g0-nucleo/app-g070.toml` - stm32g070
- `cargo xtask dist app/demo-stm32g0-nucleo/app-g0b1.toml` - stm32g0b1
- `cargo xtask dist app/demo-stm32g0-nucleo/app-g031.toml` - stm32g031-nucleo
- `cargo xtask dist app/demo-stm32g0-nucleo/app-g070.toml` - stm32g070-nucleo
- `cargo xtask dist app/demo-stm32h7-nucleo/app-h743.toml` - nucleo-ih743zi2
- `cargo xtask dist app/demo-stm32h7-nucleo/app-h753.toml` - nucleo-ih753zi
- `cargo xtask dist app/gemini-bu/app.toml` - Gemini bringup board
Expand Down
3 changes: 3 additions & 0 deletions app/demo-stm32f4-discovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ name = "demo-stm32f4-discovery"
test = false
doctest = false
bench = false

[lints]
workspace = true
3 changes: 3 additions & 0 deletions app/demo-stm32g0-nucleo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ name = "demo-stm32g0-nucleo"
test = false
doctest = false
bench = false

[lints]
workspace = true
2 changes: 1 addition & 1 deletion app/demo-stm32g0-nucleo/app-g070-mini.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "demo-stm32g070-nucleo"
target = "thumbv6m-none-eabi"
chip = "../../chips/stm32g0"
memory = "memory-g070.toml"
board = "stm32g070"
board = "stm32g070-nucleo"
stacksize = 944

[kernel]
Expand Down
2 changes: 1 addition & 1 deletion app/demo-stm32g0-nucleo/app-g070.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "demo-stm32g070-nucleo"
target = "thumbv6m-none-eabi"
chip = "../../chips/stm32g0"
memory = "memory-g070.toml"
board = "stm32g070"
board = "stm32g070-nucleo"
stacksize = 944

[kernel]
Expand Down
3 changes: 3 additions & 0 deletions app/demo-stm32h7-nucleo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ name = "demo-stm32h7-nucleo"
test = false
doctest = false
bench = false

[lints]
workspace = true
3 changes: 3 additions & 0 deletions app/donglet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ name = "app-donglet"
test = false
doctest = false
bench = false

[lints]
workspace = true
Loading

0 comments on commit 633adda

Please sign in to comment.