Skip to content

Log rustc version, just to be sure #190

Log rustc version, just to be sure

Log rustc version, just to be sure #190

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
name: Build
jobs:
# Define Rust versions dynamically
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.rust_versions }}
steps:
- id: set-matrix
run: |
echo 'rust_versions={"rust": ["stable", "1.85"]}' >> "$GITHUB_OUTPUT"
# Build the library
build:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Build
run: |
cargo build --examples
# Cross-Build the library with no_std
cross-build:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }}
target:
- thumbv7em-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
- name: Build
run: |
cargo build --manifest-path ./examples/no_std/Cargo.toml --target ${{ matrix.target }}
# Build the macro
build-macro:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Build
run: |
cd macro
cargo build
# Gather all the above build jobs together for the purposes of getting an overall pass-fail
build-all:
runs-on: ubuntu-latest
needs: [build, build-macro, cross-build]
steps:
- run: /bin/true
# Test the library - but only on one fixed version because we have
# expected errors, and they change between releases
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install 1.95
rustup default 1.95
- run: |
rustc --version

Check failure on line 95 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 95
cargo test
# Build the docs for the library
docs:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Build docs
run: |
cargo doc --examples
# Format the library
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install 1.95
rustup default 1.95
rustup component add rustfmt
- name: Format Check
run: |
cargo fmt --check
- name: Format Check for macro
run: |
cd macro
cargo fmt --check
# Run clippy on the library
clippy:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add clippy
- name: Clippy
run: |
cargo clippy --examples
- name: Clippy for the Macro
run: |
cd macro
cargo clippy
# Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail
all:
runs-on: ubuntu-latest
needs: [docs, build-all, test, fmt] # not gating on clippy-all
steps:
- run: /bin/true