Skip to content

Commit

Permalink
Fix for releases CI so rust docs get generated in crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Oct 23, 2024
1 parent 391858b commit fc610fb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,34 @@ jobs:
with:
toolchain: stable

# We install cfitsio because when releasing to crates.io, it runs
# the rust docs generation which fails if our code does any
# writing. With feature cfitsio-static, it has to build cfitsio which
# involves writing so have to build without that feature when pushing
# to crates.io
- name: Install cfitsio 3.49
run: |
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: Build on latest stable rust
run: cargo build --release --features cfitsio-static,examples
run: cargo build --release --features examples

- name: Run tests on latest stable rust
run: cargo test --release --features cfitsio-static,examples
run: cargo test --release --features examples

- uses: katyo/publish-crates@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Changes in each release are listed below.

## 1.7.1 23-Oct-2024

* Release to fix issue generating Rust docs.

## 1.7.0 23-Oct-2024

* Bumped MSRV to 1.65.
Expand Down
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mwalib"
version = "1.7.0"
version = "1.7.1"
homepage = "https://github.com/MWATelescope/mwalib"
repository = "https://github.com/MWATelescope/mwalib"
readme = "README.md"
Expand All @@ -26,8 +26,6 @@ required-features = ["python"]
crate-type = ["rlib", "staticlib", "cdylib"]

[features]
# default
default = ["cfitsio-static", "examples"]
# Compile cfitsio from source and link it statically.
cfitsio-static = ["fitsio-sys/fitsio-src"]
# Enable optional features needed by examples.
Expand Down

0 comments on commit fc610fb

Please sign in to comment.