Skip to content

Commit

Permalink
Bump version, MSRV and update coverage CI.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cjordan committed Aug 9, 2022
1 parent d392aec commit 4b4099c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 39 deletions.
66 changes: 29 additions & 37 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"Christopher H. Jordan <[email protected]>"]
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"]
Expand Down

0 comments on commit 4b4099c

Please sign in to comment.