Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/build-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,19 @@ jobs:
run: |
rustup show active-toolchain || rustup toolchain install
rustup show
rustup component add clippy
# Add clippy to the active toolchain
TOOLCHAIN=$(rustup show active-toolchain | cut -d' ' -f1)
rustup component add --toolchain "$TOOLCHAIN" clippy

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install libusb libftdi

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libftdi1-dev

- name: Cache build output
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -106,15 +118,21 @@ jobs:
RUST_BACKTRACE: 1

- name: Fetch Humility
if: runner.os == 'Linux'
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
curl -fLo target/release/humility https://github.com/oxidecomputer/humility/releases/download/nightly/humility
chmod +x target/release/humility
if [[ "$RUNNER_OS" == "macOS" ]]; then
# Build from source on macOS until pre-built binaries are available
cargo install --git https://github.com/oxidecomputer/humility.git --locked humility-bin
mkdir -p target/release
cp ~/.cargo/bin/humility target/release
else
curl -fLo target/release/humility https://github.com/oxidecomputer/humility/releases/download/nightly/humility
chmod +x target/release/humility
fi

- name: Test Humility manifest
if: runner.os == 'Linux'
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libftdi1-dev
for image in ${images}; do
mv "target/${name}/dist/${image}/build-${name}-image-${image}.zip" "target/${name}/dist/";
target/release/humility -a "target/${name}/dist/build-${name}-image-${image}.zip" manifest;
Expand All @@ -124,7 +142,7 @@ jobs:
images: ${{ matrix.image }}

- name: Clippy
if: runner.os == 'Linux'
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
cargo xtask clippy ${{ matrix.app_toml }} -- --deny warnings

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
name: Linux
- os: windows-latest
name: Windows
- os: macos-latest
name: macOS
uses: ./.github/workflows/build-boards.yml
with:
os: ${{ matrix.os }}
Expand Down
36 changes: 32 additions & 4 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ The repo is laid out as follows.

# Developing

We currently support Linux and Windows as first-tier platforms. macOS is also
used on a daily basis by Oxide employees, but is not tested in CI. The build
probably also works on Illumos; if anyone would like to step up to maintain
support and a continuous build for Illumos or macOS, we'd love the help.
We currently support Linux, Windows, and macOS as first-tier platforms with continuous integration testing.
The build probably also works on Illumos; if anyone would like to step up to maintain
support and a continuous build for Illumos, we'd love the help.

To submit changes for review, push them to a branch in a fork and submit a pull
request to merge that branch into `master`. For details, see
Expand Down Expand Up @@ -93,6 +92,35 @@ You will need:
- `cargo install --git https://github.com/oxidecomputer/humility.git --locked humility-bin`
- Requires `cargo-readme` as a dependency: `cargo install cargo-readme`

### macOS

Install dependencies using Homebrew:

```console
$ brew install libusb libftdi
```

If you will be running GDB, you can install ARM GDB tools:

```console
$ brew install arm-none-eabi-gdb
```

Note: The `gcc-arm-embedded` cask may have checksum mismatches. If you encounter issues, `arm-none-eabi-gdb` is a reliable alternative.

To install Humility:

```console
$ cargo install cargo-readme
$ cargo install --git https://github.com/oxidecomputer/humility.git --locked humility-bin
```

Note: When building Hubris, rustup will automatically install the required nightly toolchain. You'll also need to add clippy to that toolchain:

```console
$ rustup component add clippy
```

### Windows

There are three alternative ways to install OpenOCD:
Expand Down