mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-10 22:48:05 -05:00
* Fix build error: `src/Backends/IF97/IF97Backend.h:54:34: error: call of overloaded ‘abs(double)’ is ambiguous` Found with the manylinux_2_24_x86_64 gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 * Register MSVC 2019 and 2022 in setup.py * setup.py: when calling cmake, build in parallel * Enable using Env variables instead of passing them as args to setup.py * Github actions for linux: try 1 * use actions/checkout@v3 for submodules * mod setup.py:; typo * Random shot for cibuildwheel for all platforms * I thought package_dir was a flag, but it's positional * typo in cmake_compiler * add cython to setup_requires * try a pryproject.toml to install cython * try more requirements? * pywin32 only found on win32 I guess * Try with CIBW_BEFORE_BUILD instead * try to enable msvc via vcvarsall on windows, and pass MACOSX_DEPLOYMENT_TARGET * more tweaks for windoze * disable tests for now (fails on windows) * tweak mac again: it seems mac doesn't understand a C++ lambda, so like it's using pre C++11 * tweak * try 10.15 for mac... * try to force C++11 since mac picks up the path where lambdas are used... * Move back down to 10.9 now that C++11 is enabled and it works on mac, it should be enough * Try to debug win32 * Enable part of the upload step (minus the upload) to list the wheels * try to allow win32 to fail for now (instead of plain disabling) * Disable the python_linux.yml workflow, so cibuildwheels works fine. * Adjust the upload step to point to the right folder * make LGTM python happy
72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
name: Python Linux
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, develop, actions_pypi ]
|
|
# Sequence of patterns matched against refs/tags
|
|
tags:
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
python_bindings:
|
|
name: Build ${{ matrix.name }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.10.x
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install twine
|
|
|
|
- name: Build manylinux Python wheels
|
|
uses: RalfG/python-wheels-manylinux-build@v0.4.2
|
|
with:
|
|
package-path: wrappers/Python/
|
|
pre-build-command: 'export COOLPROP_CMAKE=default,64'
|
|
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
|
|
build-requirements: 'cython'
|
|
pip-wheel-args: '-w ./dist --verbose'
|
|
|
|
- name: Zip the wheels to maintain case sensitivy and file permissions
|
|
working-directory: ./wrappers/Python/
|
|
shell: bash
|
|
run: |
|
|
tar -cvzf CoolProp-Linux_wheels.tar.gz dist/
|
|
|
|
- name: Upload .whl to artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: CoolProp-Linux_wheels
|
|
path: ./wrappers/Python/CoolProp-Linux_wheels.tar.gz
|
|
|
|
- name: Publish wheels to (Test)PyPI
|
|
# TODO: for now I'm effectively disabling uploading to testpypi on each build
|
|
if: contains(github.ref, 'refs/tags')
|
|
working-directory: ./wrappers/Python/
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
run: |
|
|
|
|
if [[ "$GITHUB_REF" == *"refs/tags"* ]]; then
|
|
TWINE_REPOSITORY=pypi
|
|
TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
|
|
else
|
|
TWINE_REPOSITORY=testpypi
|
|
TWINE_PASSWORD=${{ secrets.TESTPYPI_TOKEN }}
|
|
fi;
|
|
echo "TWINE_REPOSITORY=$TWINE_REPOSITORY" >> $GITHUB_ENV
|
|
echo "TWINE_PASSWORD=$TWINE_PASSWORD" >> $GITHUB_ENV
|
|
|
|
twine upload dist/*-manylinux*.whl
|