Skip to content

Add standardized Makefile targets #68

Add standardized Makefile targets

Add standardized Makefile targets #68

Workflow file for this run

---
name: loopdev-3 ci
# yamllint disable-line rule:truthy
on:
push:
pull_request:
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
target:
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Cross
# yamllint disable rule:line-length
run: cargo install --git https://github.com/cross-rs/cross.git --rev bb3df1b cross
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
use-cross: true
command: check
args: --target=${{ matrix.target }}
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install bindgen dependencies
run: sudo apt-get install llvm-dev libclang-dev clang
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
run: make -f Makefile clippy
dependencies:
runs-on: ubuntu-latest
container:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: >
dnf install -y
curl
git
make
openssl-devel
python-requests
python-semantic_version
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- name: Check out ci repo
run: git clone https://github.com/stratis-storage/ci.git
- name: Run comparisons of version specs with available Fedora packages
# yamllint disable rule:line-length
run: |
COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=rawhide IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions
COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=f40 IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions
COMPARE_FEDORA_VERSIONS=./compare_fedora_versions MANIFEST_PATH=../../Cargo.toml FEDORA_RELEASE=f39 IGNORE_ARGS="--ignore-category low" make -f ../../Makefile check-fedora-versions
working-directory: ./ci/dependency_management
yamllint:
runs-on: ubuntu-20.04
container:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: dnf install -y make yamllint
- name: Run yamllint
run: make -f Makefile yamllint