mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-26 07:52:20 +02:00
Build bare-metal examples in presubmit.
This commit is contained in:
parent
b670098ab1
commit
72ff50e60b
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -50,6 +50,42 @@ jobs:
|
|||||||
- name: Test Rust code
|
- name: Test Rust code
|
||||||
run: cargo test
|
run: cargo test
|
||||||
|
|
||||||
|
bare-metal:
|
||||||
|
name: Build bare-metal Rust examples
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- directory: src/bare-metal/alloc-example
|
||||||
|
target: aarch64-unknown-none
|
||||||
|
- directory: src/bare-metal/aps/examples
|
||||||
|
target: aarch64-unknown-none
|
||||||
|
- directory: src/bare-metal/microcontrollers/examples
|
||||||
|
target: thumbv7em-none-eabihf
|
||||||
|
- directory: src/exercises/bare-metal/compass
|
||||||
|
target: thumbv7em-none-eabihf
|
||||||
|
- directory: src/exercises/bare-metal/rtc
|
||||||
|
target: aarch64-unknown-none
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Rust cache
|
||||||
|
uses: ./.github/workflows/setup-rust-cache
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt update && sudo apt install gcc-aarch64-linux-gnu
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Build Rust code
|
||||||
|
working-directory: ${{ matrix.directory }}
|
||||||
|
run: cargo build
|
||||||
|
|
||||||
i18n-helpers:
|
i18n-helpers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -20,9 +20,9 @@ an on-board SWD debugger.
|
|||||||
To get started, install some tools we'll need later. On gLinux or Debian:
|
To get started, install some tools we'll need later. On gLinux or Debian:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install gdb-multiarch libudev-dev picocom qemu-system-arm
|
sudo apt install aarch64-linux-gnu-gcc gdb-multiarch libudev-dev picocom qemu-system-arm
|
||||||
rustup update
|
rustup update
|
||||||
rustup target add thumbv7em-none-eabihf aarch64-unknown-none
|
rustup target add aarch64-unknown-none thumbv7em-none-eabihf
|
||||||
cargo install cargo-binutils cargo-embed
|
cargo install cargo-binutils cargo-embed
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -38,8 +38,8 @@ On MacOS:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
brew install picocom qemu gdb
|
brew install gdb picocom qemu
|
||||||
rustup update
|
rustup update
|
||||||
rustup target add thumbv7em-none-eabihf aarch64-unknown-none
|
rustup target add aarch64-unknown-none thumbv7em-none-eabihf
|
||||||
cargo install cargo-binutils cargo-embed
|
cargo install cargo-binutils cargo-embed
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user