Skip to content

Commit

Permalink
Merge branch 'master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
brainstorm authored May 19, 2024
2 parents 9cd847d + 56ee2bd commit 4a51951
Show file tree
Hide file tree
Showing 43 changed files with 1,675 additions and 32,158 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,32 @@ jobs:
if: github.repository_owner == 'rust-bio'
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
with:
submodules: recursive


- uses: GoogleCloudPlatform/release-please-action@v3
id: release_sys
with:
release-type: rust
package-name: hts-sys
monorepo-tags: true
path: hts-sys

- uses: GoogleCloudPlatform/release-please-action@v3
id: release_main
with:
release-type: rust
package-name: rust-htslib
bump-minor-pre-major: true
monorepo-tags: true
path: "."

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }}
if: ${{ steps.release_main.outputs.release_created }}
with:
toolchain: stable
override: true

- name: Install system dependencies
if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }}
if: ${{ steps.release_main.outputs.release_created }}
run: |
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
- uses: Swatinem/[email protected]
if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }}

- name: Publish hts-sys
if: ${{ steps.release_sys.outputs.release_created }}
uses: actions-rs/cargo@v1
with:
command: publish
args: --manifest-path hts-sys/Cargo.toml --token ${{ secrets.CRATES_IO_TOKEN }}

if: ${{ steps.release_main.outputs.release_created }}

- name: Publish rust-htslib
if: ${{ steps.release_main.outputs.release_created }}
uses: actions-rs/cargo@v1
Expand Down
144 changes: 62 additions & 82 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
Formatting:
Expand All @@ -19,10 +19,10 @@ jobs:
toolchain: stable
override: true
components: rustfmt

- name: Check format
run: cargo fmt -- --check

Linting:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -52,29 +52,31 @@ jobs:
with:
submodules: recursive

- name: Install stable toolchain
- name: Install nightly toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
toolchain: nightly
override: true

- name: Install system dependencies
run: |
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
- uses: Swatinem/[email protected]

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: '--all-features --out Lcov --exclude-files hts-sys/*_prebuilt_bindings.rs -- --test-threads 1'
# TODO: update to latest tarpaulin once artefact download is fixed: https://github.com/actions-rs/tarpaulin/pull/23
version: "0.22.0"
args: "--all-features --run-types Tests,Doctests --out Lcov -- --test-threads 1"

- name: Upload coverage
uses: coverallsapp/github-action@v1.1.1
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info

Testing-Features:
needs: Formatting
runs-on: ubuntu-latest
Expand All @@ -83,9 +85,6 @@ jobs:
target:
- no-default-features
- all-features
- musl-release-no-default-features
- musl-release-all-features
- musl-all-features
include:
- target: no-default-features
args: --no-default-features
Expand All @@ -94,19 +93,7 @@ jobs:
args: --all-features
toolchain_target: x86_64-unknown-linux-musl
use_cross: false
- target: musl-release-no-default-features
args: --release --target x86_64-unknown-linux-musl --no-default-features
toolchain_target: x86_64-unknown-linux-musl
use_cross: true
- target: musl-release-all-features
args: --release --target x86_64-unknown-linux-musl --all-features --verbose
toolchain_target: x86_64-unknown-linux-musl
use_cross: true
- target: musl-all-features
args: --target x86_64-unknown-linux-musl --all-features --verbose
toolchain_target: x86_64-unknown-linux-musl
use_cross: true


steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -121,7 +108,7 @@ jobs:

- name: Install system dependencies
run: |
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
- uses: Swatinem/[email protected]

Expand All @@ -134,33 +121,32 @@ jobs:

Testing-MacOS:
needs: Formatting
runs-on: macOS-latest
runs-on: macos-latest
strategy:
matrix:
target:
- intel-catalina
- intel-bigsur
- m1-bigsur
- intel-monterey
- intel-ventura
- silicon-sonoma
include:
- target: intel-catalina
os: macOS-10.15
- target: intel-monterey
os: macOS-12.0
toolchain_target: x86_64-apple-darwin
toolchain: stable
aux_args: ""
default: false
- target: intel-bigsur
os: macOS-11.0
aux_args: --target x86_64-apple-darwin
default: true
- target: intel-ventura
os: macOS-13.0
toolchain_target: x86_64-apple-darwin
toolchain: stable
aux_args: --target x86_64-apple-darwin
default: true
- target: silicon-sonoma
os: macOS-14.0
toolchain_target: aarch64-apple-darwin
toolchain: stable
aux_args: ""
default: false
# TODO enable again and try to find out why this fails
# - target: m1-bigsur
# os: macOS-11.0
# toolchain_target: aarch64-apple-darwin
# toolchain: nightly
# aux_args: --target aarch64-apple-darwin
# default: true

steps:
- name: Checkout repository
Expand All @@ -171,55 +157,49 @@ jobs:
- name: Install stable toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.toolchain_target }}
override: true
default: ${{ matrix.default }}

- name: Install htslib dependencies
run: brew install bzip2 zlib xz curl-openssl

#- uses: actions-rs/[email protected]
# with:
# toolchain: ${{ matrix.toolchain }}
# target: ${{ matrix.toolchain_target }}
# #override: true
# default: ${{ matrix.default }}

- name: Test
uses: actions-rs/[email protected]
with:
use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
command: test
args: --release --all-features --verbose ${{ matrix.aux_args }}

# Testing-OSX-MUSL-BigSur:
# needs: Formatting
# runs-on: macOS-11.0
# steps:
# Test MUSL builds on OSX
#
# - uses: actions-rs/[email protected]
# with:
# toolchain: stable
# target: x86_64-unknown-linux-musl
# override: true

# - name: Install OSX musl-cross
# run: brew install FiloSottile/musl-cross/musl-cross

# # https://github.com/FiloSottile/homebrew-musl-cross/issues/16
# - name: Provide musl-gcc symlink for the right musl arch
# run: ln -sf /usr/local/opt/musl-cross/libexec/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc

# - name: Test musl build without default features
# uses: actions-rs/cargo@v1
# with:
# use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
# command: test
# args: --release --target x86_64-unknown-linux-musl --no-default-features

# - name: Test musl build with all features and debug symbols (non --release) on OSX
# uses: actions-rs/[email protected]
# with:
# use-cross: false
# command: test
# args: --target x86_64-unknown-linux-musl --all-features --verbose
# Test MUSL builds on OSX
#
# - uses: actions-rs/[email protected]
# with:
# toolchain: stable
# target: x86_64-unknown-linux-musl
# override: true

# - name: Install OSX musl-cross
# run: brew install FiloSottile/musl-cross/musl-cross

# # https://github.com/FiloSottile/homebrew-musl-cross/issues/16
# - name: Provide musl-gcc symlink for the right musl arch
# run: ln -sf /usr/local/opt/musl-cross/libexec/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc

# - name: Test musl build without default features
# uses: actions-rs/cargo@v1
# with:
# use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
# command: test
# args: --release --target x86_64-unknown-linux-musl --no-default-features

# - name: Test musl build with all features and debug symbols (non --release) on OSX
# uses: actions-rs/[email protected]
# with:
# use-cross: false
# command: test
# args: --target x86_64-unknown-linux-musl --all-features --verbose
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "htslib"]
path = hts-sys/htslib
url = https://github.com/samtools/htslib.git
Loading

0 comments on commit 4a51951

Please sign in to comment.