Skip to content

ci

ci #597

Workflow file for this run

# This file was originally generated by maturin v0.14.17
name: CI3
on:
push:
schedule:
- cron: '0 0 1 * *'
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
test_rust:
name: Test Rust
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Test Rust no-default-features
run: cargo test --verbose --no-default-features
- name: Test Rust default features
run: cargo test --verbose
macos:
runs-on: macos-13
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: |
3.9
3.10
3.11
3.12
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
linux:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: |
3.9
3.10
3.11
3.12
- name: Install cross-compilation dependencies
if: matrix.target == 'aarch64'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build wheels for aarch64
if: matrix.target == 'aarch64'
env:
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CFLAGS: -march=armv8-a
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
manylinux: auto
- name: Build wheels for x86_64
if: matrix.target == 'x86_64'
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: |
3.9
3.10
3.11
3.12
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
test:
name: Test
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install flake8, etc
run: |
cd bed_reader
pwd
python -m pip install --upgrade pip
pip install flake8 pytest black isort --upgrade
- name: Lint with flake8, etc
run: |
echo "flake8"
flake8 .
echo "black"
black --version
black --verbose --check .
echo "isort"
isort --check-only .
- name: Test Python - Non-Windows
if: runner.os != 'Windows'
run: |
pip install virtualenv
virtualenv vEnv; source vEnv/bin/activate
python -m pip install --upgrade pip maturin
maturin develop
pip install -r requirements-min-dev.txt
pytest bed_reader/tests/test_opt_dep.py
echo "requirements"
pip install -r requirements.txt
echo "requirements-dev"
pip install -r requirements-dev.txt
pytest bed_reader
- name: Test Python - Windows
if: runner.os == 'Windows'
run: |
pip install virtualenv
virtualenv vEnv; vEnv\Scripts\activate.ps1
echo "pwd"
pwd
python -m pip install --upgrade pip maturin
pip install -r requirements-min-dev.txt
pytest bed_reader/tests/test_opt_dep.py
echo "requirements"
pip install -r requirements.txt
echo "requirements-dev"
pip install -r requirements-dev.txt
echo "maturin"
maturin develop
echo "pytest"
pytest bed_reader