Skip to content

R: use 'is_some_and' instead of 'map_or' #7

R: use 'is_some_and' instead of 'map_or'

R: use 'is_some_and' instead of 'map_or' #7

Workflow file for this run

name: build
on:
push:
branches:
- main
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '!**.md'
pull_request:
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '!**.md'
env:
TZ: Europe/Zurich
CARGO_TERM_COLOR: always
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
target: x86_64-unknown-linux-musl
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- run: cargo binstall -y cross
- run: cargo clippy
- name: run the tests for x86_64 and aarch64 builds
run: |
cross test --target x86_64-unknown-linux-musl
cargo clean
cross test --target aarch64-unknown-linux-musl