Build #223
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: 0 1 * * 1 | |
name: Build | |
env: | |
RUSTFLAGS: '-D warnings' | |
DRIVERS: > | |
ads1x1x | |
apds9960 | |
bmi160 | |
ds1307 | |
ds323x | |
eeprom24x | |
embedded-ccs811 | |
hdc20xx | |
isl29125 | |
kxcj9 | |
lm75 | |
max170xx | |
max3010x | |
max44009 | |
mcp4x | |
mcp49xx | |
mcp794xx | |
mlx9061x | |
mma8x5x | |
opt300x | |
pcf857x | |
pwm-pca9685 | |
tcs3472 | |
tmp006 | |
tmp1x2 | |
veml6030 | |
veml6075 | |
xca9548a | |
# ad983x Git version is not compatible. Deactivated until a new version is released. | |
# lsm303agr Git version is not compatible. Deactivated until a new version is released. | |
# veml6040 Git version is not compatible. Deactivated until a new version is released. | |
# veml6070 Git version is not compatible. Deactivated until a new version is released. | |
jobs: | |
ci-bare-metal: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta] | |
SUBFOLDER: | |
- stm32f3-discovery | |
- stm32f1-bluepill | |
- microbit | |
VERSION: | |
- released | |
- git | |
include: | |
- SUBFOLDER: stm32f3-discovery | |
TARGET: thumbv7em-none-eabihf | |
- SUBFOLDER: stm32f1-bluepill | |
TARGET: thumbv7m-none-eabi | |
- SUBFOLDER: microbit | |
TARGET: thumbv6m-none-eabi | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
- ~/.cargo/bin/ | |
- ~/.cargo/registry/index/ | |
- ~/.cargo/registry/cache/ | |
- ~/.cargo/git/db/ | |
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.OS }}-cargo- | |
- name: Cache build output dependencies | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.OS }}-build- | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.TARGET }} | |
- name: Checkout CI scripts | |
uses: actions/checkout@v3 | |
with: | |
repository: 'eldruin/rust-driver-ci-scripts' | |
ref: 'master' | |
path: 'ci' | |
- run: ../ci/patch-no-std.sh | |
working-directory: ${{ matrix.SUBFOLDER }} | |
- run: ../ci/patch-git-drivers.sh | |
working-directory: ${{ matrix.SUBFOLDER }} | |
if: contains(matrix.VERSION, 'git') | |
- name: Build | |
working-directory: ${{ matrix.SUBFOLDER }} | |
run: cargo build --target=${{ matrix.TARGET }} --examples --release | |
ci-rpi: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta] | |
SUBFOLDER: | |
- raspberrypi | |
TARGET: | |
- armv7-unknown-linux-gnueabihf | |
VERSION: | |
- released | |
- git | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
- ~/.cargo/bin/ | |
- ~/.cargo/registry/index/ | |
- ~/.cargo/registry/cache/ | |
- ~/.cargo/git/db/ | |
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.OS }}-cargo- | |
- name: Cache build output dependencies | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.OS }}-build- | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
target: ${{ matrix.TARGET }} | |
- run: cargo install cross | |
- name: Checkout CI scripts | |
uses: actions/checkout@v2 | |
with: | |
repository: 'eldruin/rust-driver-ci-scripts' | |
ref: 'master' | |
path: 'ci' | |
- run: ../ci/patch-git-drivers.sh | |
working-directory: ${{ matrix.SUBFOLDER }} | |
if: contains(matrix.VERSION, 'git') | |
- name: Build | |
working-directory: ${{ matrix.SUBFOLDER }} | |
run: cross build --target=${{ matrix.TARGET }} --examples |