From 4b4099c4a4e38c2aa93f2fdc9cc45dd3b326262d Mon Sep 17 00:00:00 2001 From: "Christopher H. Jordan" Date: Tue, 9 Aug 2022 11:20:59 +0800 Subject: [PATCH] Bump version, MSRV and update coverage CI. I don't like it, but this post (https://users.rust-lang.org/t/rust-version-requirement-change-as-semver-breaking-or-not/20980/65) suggests that it's fine to release a patch version from 0.x.y to 0.x.(y+1) when bumping the MSRV. I wouldn't normally do this, but it's unlikely to affect anyone, and we're doing it because someone else bumped MSRV when they probably shouldn't have. /shrug mwalib's CI was still using the nightly toolchain to generate coverage; it's now using the stable toolchain. --- .github/workflows/coverage.yml | 66 +++++++++++++++------------------- Cargo.toml | 4 +-- 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 7790966..d9b8b93 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -5,55 +5,47 @@ on: [push, pull_request] env: RUST_BACKTRACE: 1 -jobs: +jobs: generate_coverage: runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - - - name: Install nightly toolchain pinned at 2022-01-14 - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-01-14 - override: true - components: llvm-tools-preview - - - name: Install cargo-llvm-cov - run: rustup run nightly-2022-01-14 cargo install cargo-llvm-cov - - - name: Build cfitsio + + - name: Install dependencies run: | - # Install dependencies - curl "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" -o cfitsio.tar.gz - tar -xf cfitsio.tar.gz - rm cfitsio.tar.gz - cd cfitsio-3.49 - # Enabling SSE2/SSSE3 could cause portability problems, but it's unlikely that anyone - # is using such a CPU... - # https://stackoverflow.com/questions/52858556/most-recent-processor-without-support-of-ssse3-instructions - # Disabling curl just means you cannot fits_open() using a URL. - CFLAGS="-O3" ./configure --prefix=/usr/local --enable-reentrant --enable-sse2 --enable-ssse3 --disable-curl - make -j - sudo make install - sudo ldconfig - cd .. - - - name: Install OS packages - run: | - sudo apt-get update - sudo apt-get install -y lcov clang curl zip unzip libssl-dev jq + sudo apt update -y + sudo apt install -y \ + tzdata \ + build-essential \ + pkg-config \ + git \ + lcov \ + libcfitsio-dev \ + ; env: DEBIAN_FRONTEND: noninteractive - - - name: Generate test lcov coverage into coverage/ dir + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: llvm-tools-preview + + - name: install cargo-llvm-cov + run: cargo install cargo-llvm-cov + + - name: Generate test lcov coverage into coverage/ dir run: | mkdir -p coverage - rustup run nightly-2022-01-14 cargo llvm-cov --lib --ignore-filename-regex="test.rs" --lcov --output-path coverage/coverage.lcov + cargo llvm-cov --lib --lcov --output-path coverage/coverage.lcov + # this uses the result of the previous run to generate a text summary + cargo llvm-cov --no-run - name: Upload reports to codecov.io - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index 4614b11..718345b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "mwalib" -version = "0.15.0" +version = "0.15.1" homepage = "https://github.com/MWATelescope/mwalib" repository = "https://github.com/MWATelescope/mwalib" readme = "README.md" authors = ["Greg Sleap ", "Christopher H. Jordan "] edition = "2021" -rust-version = "1.56" +rust-version = "1.57" description = "A library to simplify reading Murchison Widefield Array (MWA) raw visibilities, voltages and metadata." license = "MPL-2.0" keywords = ["radioastronomy", "mwa", "astronomy"]