Private Equity metrics #204
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
tags: ['v*'] | |
workflow_dispatch: | |
inputs: | |
build: | |
description: 'Build' | |
required: true | |
default: true | |
jobs: | |
test: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dev-requirements | |
run: pip install -r dev-requirements.txt | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Test | |
run: cargo test --release | |
- name: Test no numpy installed works | |
run: | | |
pip uninstall numpy -y | |
cargo test --release --features nonumpy | |
build: | |
needs: test | |
runs-on: ${{ matrix.os.platform }} | |
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }} | |
strategy: | |
matrix: | |
python: | |
- version: '3.7' | |
- version: '3.8' | |
- version: '3.9' | |
- version: '3.10' | |
- version: '3.11' | |
- version: '3.12' | |
os: | |
- platform: ubuntu-latest | |
- platform: macos-latest | |
- platform: macos-latest | |
arch: aarch64 | |
- platform: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python.constraints || matrix.python.version }} | |
# allow-prereleases: ${{ matrix.python.version == "3.12" }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- run: rustup target list | |
- name: Build Wheels - Linux | |
if: matrix.os.platform == 'ubuntu-latest' | |
uses: messense/maturin-action@v1 | |
with: | |
maturin-version: v1.3.0 | |
manylinux: auto | |
args: -i python${{ matrix.python.version }} --release --strip --sdist | |
- name: Build Wheels - MacOS [aarch64] | |
if: ${{ matrix.os.platform == 'macos-latest' && matrix.os.arch == 'aarch64' }} | |
uses: messense/maturin-action@v1 | |
with: | |
maturin-version: v1.3.0 | |
args: -i python --release --target aarch64-apple-darwin --strip | |
- name: Build Wheels - MacOS [x86_64] | |
if: ${{ matrix.os.platform == 'macos-latest' && matrix.os.arch != 'aarch64' }} | |
uses: messense/maturin-action@v1 | |
with: | |
maturin-version: v1.3.0 | |
args: -i python --release --target universal2-apple-darwin --strip | |
- name: Build Wheels - Windows | |
if: matrix.os.platform == 'windows-latest' | |
uses: messense/maturin-action@v1 | |
with: | |
maturin-version: v1.3.0 | |
args: -i python --release --strip | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: target/wheels | |
linux-cross: | |
needs: test | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }} | |
strategy: | |
matrix: | |
python: | |
- version: '3.7' | |
abi: 'cp37-cp37m' | |
- version: '3.8' | |
abi: 'cp38-cp38' | |
- version: '3.9' | |
abi: 'cp39-cp39' | |
- version: '3.10' | |
abi: 'cp310-cp310' | |
- version: '3.11' | |
abi: 'cp311-cp311' | |
- version: '3.12' | |
abi: 'cp312-cp312' | |
target: [aarch64, armv7, s390x, ppc64le, ppc64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Wheels | |
uses: messense/maturin-action@v1 | |
env: | |
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib | |
with: | |
maturin-version: v1.3.0 | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: -i python3.9 --release --strip | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: target/wheels | |
linux-musl: | |
needs: test | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }} | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
- i686-unknown-linux-musl | |
- aarch64-unknown-linux-musl | |
- armv7-unknown-linux-musleabihf | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Wheels - musl | |
uses: messense/maturin-action@v1 | |
with: | |
maturin-version: v1.3.0 | |
target: ${{ matrix.target }} | |
manylinux: musllinux_1_2 | |
args: --release --strip -i 3.7 3.8 3.9 3.10 3.11 3.12 | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: target/wheels | |
publish: | |
needs: [build, linux-cross, linux-musl] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
- run: pip install maturin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: pyxirr*.whl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: PyPI publish | |
env: | |
MATURIN_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: find . -name 'pyxirr*' | xargs -l maturin upload --skip-existing --username __token__ |