From 66fb43b17838c89241c63e90cee8e835da6e51bf Mon Sep 17 00:00:00 2001 From: Andrew Champion Date: Tue, 6 Dec 2022 09:14:23 +0000 Subject: [PATCH] CI: switch from travis to GitHub Actions and cargo-release --- .github/workflows/ci.yml | 17 +++++++++++++++++ .travis.yml | 36 ------------------------------------ CHANGELOG.md | 23 +++++++++++++++++++++++ README.md | 2 +- release.toml | 11 +++++++++++ 5 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100644 release.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..671017a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI +on: [push, pull_request] + +jobs: + test: + uses: aschampion/gh-actions/.github/workflows/rust-test.yml@v0 + with: + msrv: 1.39 + + semver-checks: + uses: aschampion/gh-actions/.github/workflows/rust-semver-checks.yml@v0 + + publish: + uses: aschampion/gh-actions/.github/workflows/rust-publish.yml@v0 + needs: [test] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v') + secrets: inherit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 39102b6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -notifications: - email: false -language: rust -sudo: required -rust: - - stable - - beta - - nightly -addons: - apt: - packages: - - libssl-dev -cache: cargo -matrix: - allow_failures: - - rust: nightly -before_cache: | - if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then - RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin - fi -before_script: - - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then - rustup component add clippy; - fi' -script: - - RUSTFLAGS="-D warnings" cargo build --verbose - - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then - cargo clippy --all -- -D warnings; - fi' - - cargo test --verbose - - cargo test --examples --verbose -after_success: | - if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then - cargo tarpaulin --out Xml --no-default-features --features=filesystem,use_ndarray,gzip,lz_pure --run-types Doctests Tests - bash <(curl -s https://codecov.io/bash) - fi diff --git a/CHANGELOG.md b/CHANGELOG.md index df603ec..0ef18a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [Unreleased] ## [0.7.6] - 2020-10-26 ### Added @@ -180,3 +183,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.1.0] - 2018-02-28 + + + +[Unreleased]: https://github.com/aschampion/rust-n5/compare/0.7.6...HEAD +[0.7.6]: https://github.com/aschampion/rust-n5/compare/0.7.5...0.7.6 +[0.7.5]: https://github.com/aschampion/rust-n5/compare/0.7.4...0.7.5 +[0.7.4]: https://github.com/aschampion/rust-n5/compare/0.7.3...0.7.4 +[0.7.3]: https://github.com/aschampion/rust-n5/compare/0.7.2...0.7.3 +[0.7.2]: https://github.com/aschampion/rust-n5/compare/0.7.1...0.7.2 +[0.7.1]: https://github.com/aschampion/rust-n5/compare/0.7.0...0.7.1 +[0.7.0]: https://github.com/aschampion/rust-n5/compare/0.6.1...0.7.0 +[0.6.1]: https://github.com/aschampion/rust-n5/compare/0.6.0...0.6.1 +[0.6.0]: https://github.com/aschampion/rust-n5/compare/0.5.0...0.6.0 +[0.5.0]: https://github.com/aschampion/rust-n5/compare/0.4.0...0.5.0 +[0.4.0]: https://github.com/aschampion/rust-n5/compare/0.3.0...0.4.0 +[0.3.0]: https://github.com/aschampion/rust-n5/compare/0.2.3...0.3.0 +[0.2.3]: https://github.com/aschampion/rust-n5/compare/0.2.2...0.2.3 +[0.2.2]: https://github.com/aschampion/rust-n5/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/aschampion/rust-n5/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/aschampion/rust-n5/compare/0.1.0...0.2.0 diff --git a/README.md b/README.md index bd7620e..4f6800a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# N5 [![Build Status](https://travis-ci.org/aschampion/rust-n5.svg?branch=master)](https://travis-ci.org/aschampion/rust-n5) [![Coverage](https://codecov.io/gh/aschampion/rust-n5/branch/master/graph/badge.svg)](https://codecov.io/gh/aschampion/rust-n5) +# N [![Build Status](https://github.com/aschampion/rust-n5/actions/workflows/ci.yml/badge.svg)](https://github.com/aschampion/rust-n5/actions/workflows/ci.yml/) [![Coverage](https://codecov.io/gh/aschampion/rust-n5/branch/master/graph/badge.svg)](https://codecov.io/gh/aschampion/rust-n5) A (mostly pure) rust implementation of the [N5 "Not HDF5" n-dimensional tensor file system storage format](https://github.com/saalfeldlab/n5) created by the Saalfeld lab at Janelia Research Campus. diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..7b2aee6 --- /dev/null +++ b/release.toml @@ -0,0 +1,11 @@ +publish = false +pre-release-commit-message = "Version {{version}}" +pre-release-replacements = [ + {file="CHANGELOG.md", search="^## \\[Unreleased\\]", replace="## [{{version}}] - {{date}}", exactly=1}, + {file="CHANGELOG.md", search="\\[Unreleased\\]", replace="[{{version}}]", min=1}, + {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, +] +post-release-replacements = [ + {file="CHANGELOG.md", search="", replace="\n## [Unreleased]\n\n", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/aschampion/rust-n5/compare/{{tag_name}}...HEAD", exactly=1}, +] \ No newline at end of file