Skip to content

updated documentation #60

updated documentation

updated documentation #60

Workflow file for this run

name: Publish new package
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*d'
jobs:
build_manylinux:
name: Build for manylinux
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
cp: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
container:
image: docker://quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
yum install libffi-devel -y
git clone https://gitlab.com/libeigen/eigen
cd eigen
git checkout tags/3.4.0
cd ..
mkdir include
mv eigen/Eigen/ include/
rm -rf eigen-git-mirror/
git clone https://github.com/bab2min/EigenRand
cd EigenRand
git checkout tags/v0.4.1
cd ..
mv EigenRand/EigenRand include/
git clone https://github.com/mapbox/variant
cd variant
git checkout tags/v1.1.3
cd ..
mv variant/include/mapbox include/
- name: Src Deploy
if: ${{ matrix.cp == 'cp38-cp38' }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
/opt/python/${{ matrix.cp }}/bin/python -m pip install twine wheel numpy==`/opt/python/${{ matrix.cp }}/bin/python .github/workflows/numpy_version.py`
/opt/python/${{ matrix.cp }}/bin/python setup.py sdist
/opt/python/${{ matrix.cp }}/bin/python -m twine upload dist/*.tar.gz
- name: Binary Deploy
continue-on-error: True
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
/opt/python/${{ matrix.cp }}/bin/python -m pip install twine wheel numpy==`/opt/python/${{ matrix.cp }}/bin/python .github/workflows/numpy_version.py`
/opt/python/${{ matrix.cp }}/bin/python setup.py build bdist_wheel
auditwheel repair dist/*-${{ matrix.cp }}-linux_x86_64.whl
/opt/python/${{ matrix.cp }}/bin/python -m twine upload wheelhouse/*.whl
build_linux_arm64:
name: Arm64-Centos7
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
cp: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
- uses: bab2min/run-on-arch-action@use-custom-image
id: runcmd
with:
image: quay.io/pypa/manylinux2014_aarch64
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/artifacts"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
run: |
yum install libffi-devel -y
git clone https://gitlab.com/libeigen/eigen
cd eigen
git checkout tags/3.4.0
cd ..
mkdir include
mv eigen/Eigen/ include/
rm -rf eigen-git-mirror/
git clone https://github.com/bab2min/EigenRand
cd EigenRand
git checkout tags/v0.4.1
cd ..
mv EigenRand/EigenRand include/
git clone https://github.com/mapbox/variant
cd variant
git checkout tags/v1.1.3
cd ..
mv variant/include/mapbox include/
/opt/python/${{ matrix.cp }}/bin/python -m pip install twine wheel numpy==`/opt/python/${{ matrix.cp }}/bin/python .github/workflows/numpy_version.py`
/opt/python/${{ matrix.cp }}/bin/python setup.py build bdist_wheel
auditwheel repair dist/*-${{ matrix.cp }}-linux_*.whl
TWINE_USERNAME=${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD=${{ secrets.PYPI_PASSWORD }} /opt/python/${{ matrix.cp }}/bin/python -m twine upload wheelhouse/*.whl
build_macos_11:
name: Build for macOS 11
runs-on: macOS-11
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]
cpu-arch: [x86_64, arm64]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
tar -zxvf eigen-3.4.0.tar.gz
rm eigen-3.4.0.tar.gz
mv eigen-* include
wget https://github.com/bab2min/EigenRand/archive/v0.4.1.tar.gz
tar -zxvf v0.4.1.tar.gz
mv EigenRand-0.4.1/EigenRand include/
wget https://github.com/mapbox/variant/archive/v1.1.3.tar.gz
tar -zxvf v1.1.3.tar.gz
mv variant-1.1.3/include/mapbox include/
- name: Deploy
continue-on-error: True
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
export AUDITWHEEL_PLAT=many
export MACOSX_DEPLOYMENT_TARGET=11.7
python -m pip install twine wheel numpy==`python .github/workflows/numpy_version.py`
TOMOTOPY_CPU_ARCH=${{ matrix.cpu-arch }} python setup.py bdist_wheel
twine upload dist/*
build_windows:
name: Build for Windows
runs-on: windows-2019
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
architecture: [x86, x64]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
Invoke-WebRequest -OutFile eigen-3.4.0.tar.gz https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
tar -zxvf eigen-3.4.0.tar.gz
rm eigen-3.4.0.tar.gz
mv eigen-* include
Invoke-WebRequest -OutFile v0.4.1.tar.gz https://github.com/bab2min/EigenRand/archive/v0.4.1.tar.gz
tar -zxvf v0.4.1.tar.gz
mv EigenRand-0.4.1/EigenRand include/
Invoke-WebRequest -OutFile v1.1.3.tar.gz https://github.com/mapbox/variant/archive/v1.1.3.tar.gz
tar -zxvf v1.1.3.tar.gz
mv variant-1.1.3/include/mapbox include/
- name: Deploy
continue-on-error: True
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine wheel numpy==$(python .github/workflows/numpy_version.py)
python setup.py bdist_wheel
twine upload dist/*