Sync submodule cmake #149
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: Release on PyPI [Windows, Mac] | |
on: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build-wheel: | |
runs-on: ${{ matrix.os }} | |
name: Build ${{ matrix.os }} ${{ matrix.python-version }} | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
os: [macos-latest, self-hosted-arm64, windows-2019, windows-latest] | |
include: | |
- os: windows-2019 | |
toolset: ClangCl | |
- os: windows-latest | |
toolset: v143 | |
exclude: | |
- os: self-hosted-arm64 | |
python-version: 3.7 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set ownership | |
run: | | |
# Workaround for https://github.com/actions/runner/issues/2033 | |
# this is to fix GIT not liking owner of the checkout dir | |
chown -R $(id -u):$(id -g) $PWD | |
git submodule update | |
- name: Setup conda | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
channels: conda-forge | |
python-version: ${{ matrix.python-version }} | |
activate-environment: proxsuite | |
- name: Install dependencies [Conda] | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
shell: bash -l {0} | |
run: | | |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186 | |
conda config --remove channels defaults | |
mamba install doxygen graphviz eigen simde cmake compilers | |
- name: Print environment [Conda] | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
shell: bash -l {0} | |
run: | | |
conda info | |
mamba list | |
env | |
- name: Build wheel | |
if: contains(matrix.os, 'macos') | |
shell: bash -l {0} | |
run: | | |
pip wheel . -w dist | |
- name: Build wheel on windows | |
if: contains(matrix.os, 'windows') | |
shell: bash -l {0} | |
env : | |
CMEEL_CMAKE_ARGS: "-T${{ matrix.toolset }} -DBUILD_PYTHON_INTERFACE=ON -DBUILD_WITH_VECTORIZATION_SUPPORT=ON -DINSTALL_DOCUMENTATION=OFF" | |
CMEEL_RUN_TESTS: False | |
CMEEL_JOBS: 1 | |
CMEEL_LOG_LEVEL: Debug | |
run: | | |
pip wheel . -w dist | |
- name: Build wheel on self-hosted | |
if: contains(matrix.os, 'self-hosted') | |
env : | |
CMEEL_CMAKE_ARGS: "-DBUILD_TESTING=OFF -DBUILD_PYTHON_INTERFACE=ON -DBUILD_WITH_VECTORIZATION_SUPPORT=OFF -DINSTALL_DOCUMENTATION=OFF" | |
shell: bash -l {0} | |
run: | | |
conda activate proxarm-py${{ matrix.python-version }} | |
conda info | |
mamba list | |
env | |
pip wheel . -w dist | |
- name: Move proxsuite to specific dist folder | |
shell: bash -l {0} | |
run: | | |
mkdir -p dist_proxsuite | |
mv dist/proxsuite*.whl dist_proxsuite | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist_proxsuite | |
release: | |
needs: "build-wheel" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: actions/download-artifact@v3 | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: | | |
github.repository == 'Simple-Robotics/proxsuite' && | |
(github.event_name == 'release' && github.event.action == 'published') | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
check: | |
if: always() | |
name: release-osx-win | |
needs: | |
- build-wheel | |
runs-on: Ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |