Skip to content

cargo clippy --fix --allow-dirty #191

cargo clippy --fix --allow-dirty

cargo clippy --fix --allow-dirty #191

Workflow file for this run

---
name: Tests
# Do this on every push, but don't double up on tags
on:
push:
tags-ignore:
- '**'
pull_request:
branches:
- '**'
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MWA_BEAM_FILE: /mwa_full_embedded_element_pattern.h5
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
tzdata \
build-essential \
pkg-config \
cmake \
curl \
git \
lcov \
libcfitsio-dev \
libhdf5-dev \
libfreetype-dev \
libexpat1-dev \
;
env:
DEBIAN_FRONTEND: noninteractive
- name: Install CUDA
uses: Jimver/cuda-toolkit@v0.2.5
with:
cuda: '11.5.1'
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Get the beam HDF5 file
run: sudo curl http://ws.mwatelescope.org/static/mwa_full_embedded_element_pattern.h5 -o $MWA_BEAM_FILE
# Test that building works. Build statically first so less compiling is
# needed when running tests.
- name: Debug build with static features
run: cargo test --locked --release --features=cuda,all-static --no-run
- name: Debug build
run: cargo test --locked --release --features=cuda --no-run
# Can't test with CUDA, no GPUs available in CI
- name: Run tests
run: cargo test --locked --release
- name: Run ignored tests
run: cargo test --locked --release -- --ignored
- name: Minimum-specified Rust version works
run: |
MIN_RUST=$(grep -m1 "rust-version" Cargo.toml | sed 's|.*\"\(.*\)\"|\1|')
~/.cargo/bin/rustup install $MIN_RUST --profile minimal
cargo clean
cargo +${MIN_RUST} test --locked
cargo +${MIN_RUST} test --locked --features=all-static
cargo +${MIN_RUST} test --locked --all-features --no-run