Skip to content

release

release #22

Workflow file for this run

name: release
on:
release:
types: [published]
jobs:
# test-linux:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Install
# run: |
# sudo apt-get update
# sudo apt-get install libboost-all-dev
# - name: Configure
# run: |
# mkdir build
# cd build
# cmake ..
# - name: Build
# working-directory: ./build
# run: |
# cmake --build .
# - name: Test
# working-directory: ./build
# run: |
# ctest --output-on-failure
# upload-linux:
# needs: test-linux
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Configuration
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# architecture: x64
# - name: Install
# run: |
# pip install .[pypi]
# # - name: Setup manylinux build environment
# # env:
# # DOCKER_IMAGE=quay.io/pypa/manylinux_2_28_x86_64
# # PLAT=manylinux_2_28
# # install:
# # - docker pull $DOCKER_IMAGE
# # - name: Build with manylinux
# # run: |
# # docker run --rm -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/travis/build-wheels.sh
# - name: Build
# run: |
# python -m build --wheel --no-isolation
# - name: Upload
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# user: __token__
# password: ${{ secrets.pypi_token }}
test-windows:
runs-on: windows-latest
strategy:
matrix:
config: ['Release', 'Debug']
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: |
mkdir build
cd build
cmake .. -G "NMake Makefiles"
- name: Build
working-directory: ./build
run: |
cmake --build . --config "${{ matrix.config }}"
- name: Test
working-directory: ./build
run: |
ctest --build-config "${{ matrix.config }}" --output-on-failure
upload-windows:
needs: test-windows
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: ilammy/msvc-dev-cmd@v1
- name: Configuration
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install
run: |
pip install .[pypi]
- name: Build
run: |
python -m build --wheel --no-isolation
- name: Upload
run: |
python -m twine upload --repository testpypi dist/* --username __token__ --password "${{ secrets.pypi_token }}"
# test-macos:
# runs-on: macos-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Configure
# run: |
# mkdir build
# cd build
# cmake ..
# - name: Build
# working-directory: ./build
# run: |
# cmake --build .
# - name: Test
# working-directory: ./build
# run: |
# ctest --output-on-failure
# upload-macos:
# needs: test-macos
# runs-on: macos-latest
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Configuration
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# architecture: x64
# - name: Install
# run: |
# pip install .[pypi]
# - name: Build
# run: |
# python -m build --wheel --no-isolation
# - name: Upload
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# user: __token__
# password: ${{ secrets.pypi_token }}
upload-source:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Configuration
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Install
run: |
pip install .[pypi]
- name: Build
run: |
python -m build --sdist --no-isolation
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.pypi_token }}