-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from bacpop/release
Prepare for first release
- Loading branch information
Showing
14 changed files
with
184 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,29 +17,28 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
toolchain: stable | ||
override: true | ||
components: llvm-tools-preview # Required for grcov | ||
|
||
- name: Build | ||
run: cargo build --verbose | ||
|
||
- name: Run tests | ||
run: cargo test --verbose --no-fail-fast | ||
- name: Install cargo-llvm-cov and run tests | ||
run: cargo install cargo-llvm-cov && cargo llvm-cov --lcov --output-path=./lcov.info | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage' | ||
RUSTDOCFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage' | ||
|
||
- name: Run grcov | ||
run: | | ||
cargo install grcov | ||
grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
- name: Codecov | ||
# You may pin to the exact commit or the version. | ||
uses: codecov/[email protected] | ||
with: | ||
# Repository upload token - get it from codecov.io. Required only for private repositories | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: true | ||
file: ./lcov.info | ||
# Specify whether the Codecov output should be verbose | ||
verbose: true | ||
fail_ci_if_error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Make release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
|
||
build-binaries: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: Release ${{ matrix.config.os }} (${{ matrix.config.toolchain }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, toolchain: 'stable'} | ||
- {os: ubuntu-latest, toolchain: 'stable'} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.config.toolchain }} | ||
override: true | ||
|
||
# NB see https://github.com/actions-rs/cargo if we ever want to try cross | ||
# e.g. for Mac M1/arm64 | ||
- name: Build and package binary | ||
shell: bash | ||
run: | | ||
cargo install --path . | ||
cp $HOME/.cargo/bin/sketchlib . | ||
tar czvf sketchlib-${{ github.ref_name }}-${{ matrix.config.os }}-${{ matrix.config.toolchain }}.tar.gz sketchlib LICENSE NOTICE README.md | ||
- name: Upload package | ||
if: success() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sketchlib-${{ github.ref_name }}-${{ matrix.config.os }}-${{ matrix.config.toolchain }} | ||
path: sketchlib-${{ github.ref_name }}-${{ matrix.config.os }}-${{ matrix.config.toolchain }}.tar.gz | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
needs: build-binaries | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: build | ||
|
||
- name: Organise files | ||
shell: bash | ||
run: | | ||
cp build/sketchlib-${{ github.ref_name }}-macOS-latest-stable/sketchlib-${{ github.ref_name }}-macOS-latest-stable.tar.gz . | ||
cp build/sketchlib-${{ github.ref_name }}-ubuntu-latest-stable/sketchlib-${{ github.ref_name }}-ubuntu-latest-stable.tar.gz . | ||
- name: Create release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Release ${{ github.ref_name }} | ||
draft: false | ||
prerelease: false | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
files: | | ||
sketchlib-*.tar.gz | ||
push_crate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: katyo/publish-crates@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
[package] | ||
name = "sketchlib" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
authors = [ | ||
"John Lees <[email protected]>", | ||
"Nicholas Croucher <[email protected]>" | ||
"Nicholas Croucher <[email protected]>", | ||
"Johanna von Wachsmann <[email protected]>", | ||
"Victor Rodriguez Bouza <[email protected]>", | ||
] | ||
edition = "2021" | ||
description = "Genome and amino-acid sketching" | ||
|
@@ -65,4 +67,4 @@ assert_fs = "1.0.10" | |
pretty_assertions = "1.3.0" | ||
|
||
[profile.release] | ||
debug = true | ||
lto = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//! Functions and traits for calculating and storing distances | ||
use std::cmp::Ordering; | ||
use std::fmt; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//! Methods to create single sample's sketch | ||
use std::cmp::Ordering; | ||
use std::fmt; | ||
use std::sync::mpsc; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//! Support for .pdb files and the 3di alphabet | ||
use anyhow::Error; | ||
use crate::io::InputFastx; | ||
|
||
|