Skip to content

Commit

Permalink
Merge branch 'latest' into joss-ani
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Dec 19, 2022
2 parents 5111dbf + 1c8b165 commit 907ab31
Show file tree
Hide file tree
Showing 292 changed files with 52,008 additions and 10,971 deletions.
5 changes: 5 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.aarch64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]
8 changes: 7 additions & 1 deletion .ci/install_cargo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#! /bin/sh
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable
rustup show
export PATH="$HOME/.cargo/bin:$PATH"
rustc -V
rustup target add aarch64-apple-darwin

# update crates.io index without updating Cargo.lock
export CARGO_NET_GIT_FETCH_WITH_CLI=true
cargo update --dry-run
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ Please also be sure to note here if file formats, command-line
interface, and/or the top-level sourmash API will change because of
this PR.

If you are a new contributor, please provide
[your ORCID](https://orcid.org). If you don't have one, please
If you are a new contributor, please add your name and
[your ORCID](https://orcid.org) to the `pyproject.toml` author list
(maintaining alphabetical order by last name).
If you don't have an ORCID, please
[register for one](https://orcid.org/register).

Once the items above are done, and all checks pass, request a review!
13 changes: 9 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "13:00"
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "13:00"
interval: weekly
allow:
- dependency-type: "direct"
open-pull-requests-limit: 10
rebase-strategy: "disabled"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
8 changes: 4 additions & 4 deletions .github/workflows/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -22,10 +22,10 @@ jobs:
git checkout latest
git checkout -
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: "3.10"

- uses: actions-rs/toolchain@v1
with:
Expand Down
55 changes: 14 additions & 41 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,82 +16,55 @@ jobs:
matrix:
build: [
linux-x86_64,
linux-aarch64,
linux-ppc64le,
linux-s390x,
macos-x86_64,
macos-arm64,
]
include:
- build: linux-x86_64
os: ubuntu-18.04
os: ubuntu-20.04
arch: x86_64
macos_target: ''
- build: linux-aarch64
os: ubuntu-18.04
arch: aarch64
macos_target: ''
- build: linux-ppc64le
os: ubuntu-18.04
arch: ppc64le
macos_target: ''
- build: linux-s390x
os: ubuntu-18.04
arch: s390x
macos_target: ''
- build: macos-x86_64
os: macos-latest
arch: x86_64
macos_target: 'MACOSX_DEPLOYMENT_TARGET=10.11'
macos_target: 'MACOSX_DEPLOYMENT_TARGET=10.11 CARGO_BUILD_TARGET=x86_64-apple-darwin'
- build: macos-arm64
os: macos-latest
arch: arm64
macos_target: 'MACOSX_DEPLOYMENT_TARGET=11 CARGO_BUILD_TARGET=aarch64-apple-darwin'
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.8.0
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.3
env:
CIBW_BUILD: "cp39-*"
CIBW_SKIP: "*-win32 *-manylinux_i686"
CIBW_BEFORE_BUILD: 'source .ci/install_cargo.sh'
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_ENVIRONMENT_MACOS: ${{ matrix.macos_target }}
CIBW_BUILD_VERBOSITY: 3
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
run: |
python -m cibuildwheel --output-dir dist
ls -lR ./dist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: './dist/sourmash*.whl'
path: './wheelhouse/sourmash*.whl'

release:
name: Publish wheels
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
needs: build_wheels

steps:
- name: Fetch wheels from artifacts
id: fetch_artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: 'wheels/'

Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/build_wheel_all_archs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: cibuildwheel_ubuntu

on:
#pull_request: # use for testing modifications to this action
push:
branches: [latest]
tags: v*
schedule:
- cron: "0 0 * * *" # daily

jobs:
build_wheels:
name: Build wheels for ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [
linux-aarch64,
linux-ppc64le,
linux-s390x,
]
include:
- build: linux-aarch64
os: ubuntu-20.04
arch: aarch64
macos_target: ''
- build: linux-ppc64le
os: ubuntu-20.04
arch: ppc64le
macos_target: ''
- build: linux-s390x
os: ubuntu-20.04
arch: s390x
macos_target: ''
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'

# Added due to weird error when building inside docker container
# for other platforms...
# https://github.com/JonasAlfredsson/docker-nginx-certbot/issues/30
- name: Set Swap Space
if: runner.os == 'Linux'
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 10
- run: |
# Workaround for https://github.com/rust-lang/cargo/issues/8719
sudo mkdir -p /var/lib/docker
sudo mount -t tmpfs -o size=10G none /var/lib/docker
sudo systemctl restart docker
if: runner.os == 'Linux'
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.3
env:
CIBW_ENVIRONMENT_MACOS: ${{ matrix.macos_target }}
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
CARGO_NET_GIT_FETCH_WITH_CLI: true

- uses: actions/upload-artifact@v3
with:
path: './wheelhouse/sourmash*.whl'

release:
name: Publish wheels
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
needs: build_wheels

steps:
- name: Fetch wheels from artifacts
id: fetch_artifacts
uses: actions/download-artifact@v3
with:
path: 'wheels/'

# if it matches a Python release tag, upload to github releases
# TODO: In the future, use the create-release and upload-release-assets actions
- name: Release
uses: fnkr/github-action-ghr@v1
env:
GHR_PATH: ${{steps.fetch_artifacts.outputs.download-path}}/artifact
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 18 additions & 11 deletions .github/workflows/dev_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,39 @@ jobs:
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache nix store
id: cache-nix
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /nix/store
key: nix-${{ hashFiles('shell.nix') }}-${{ hashFiles('nix/**') }}
path: |
~/.nix-portable/store
~/bin/nix-portable
key: nix-${{ hashFiles('shell.nix') }}-${{ hashFiles('nix/**') }}-v009

- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-20.09
- name: Install nix-portable
if: steps.cache-nix.outputs.cache-hit != 'true'
run: |
mkdir ~/bin
wget -qO ~/bin/nix-portable https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable
chmod +x ~/bin/nix-portable
- run: ~/bin/nix-portable nix-shell --command "tox -e py39"

- run: nix-shell --command "tox -e py39"
- run: ~/bin/nix-portable nix run . -- --version

mamba:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: cache conda
uses: actions/cache@v1
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
Expand All @@ -41,7 +48,7 @@ jobs:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}

- name: setup conda
uses: conda-incubator/setup-miniconda@e23d871804685e8c52189e5bd45e9145019f10af
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
with:
auto-update-conda: true
python-version: 3.9
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/hypothesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/khmer.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Trigger new archival in software heritage on new tags
if: startsWith(github.ref, 'refs/tags/')
run: curl https://archive.softwareheritage.org/api/1/origin/save/git/url/https://github.com/dib-lab/sourmash.git/
run: curl https://archive.softwareheritage.org/api/1/origin/save/git/url/https://github.com/sourmash-bio/sourmash.git/
Loading

0 comments on commit 907ab31

Please sign in to comment.