-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed python extension modules built for the wrong python version (#123)
* Test * Test * Test * Test * Test toml old setuptools * Test * Test min cp3.7 * Test build cp37 and cp38 * Added 3.9, 3.10 and 3.8 builds * Removed pp37 wheels * Updated wheels
- Loading branch information
Showing
8 changed files
with
138 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: Python Wheel Builds (TEST) | ||
|
||
on: | ||
push: | ||
branches: | ||
- fix_python_wheels | ||
env: | ||
CIBW_SKIP: cp36-manylinux_x86_64 cp36-win_amd64 cp36-macosx_x86_64 pp37-win_amd64 pp37-macosx_x86_64 pp37-manylinux_x86_64 | ||
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_24_x86_64:latest | ||
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: quay.io/pypa/manylinux_2_24_x86_64:latest | ||
jobs: | ||
build_sdist: | ||
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist --outdir wheelhouse | ||
|
||
- name: Check metadata | ||
run: pipx run twine check wheelhouse/* | ||
|
||
- name: Upload sdist | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: wheelhouse/*.tar.gz | ||
|
||
wheels: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- runs-on: ubuntu-latest | ||
cibw-arch: manylinux_x86_64 | ||
- runs-on: macos-latest | ||
cibw-arch: macosx_x86_64 | ||
- runs-on: windows-latest | ||
cibw-arch: win_amd64 | ||
|
||
name: Wheels � ${{ matrix.cibw-arch }} | ||
runs-on: ${{ matrix.runs-on }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
architecture: ${{ matrix.python-arch }} | ||
|
||
- name: Install conan | ||
shell: bash | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools | ||
python3 -m pip install conan | ||
- name: Setup CMake | ||
uses: jwlawson/actions-setup-cmake@v1.9 | ||
|
||
- name: Install requirements | ||
run: | | ||
python -m pip install cibuildwheel twine | ||
- name: Configure cibuildwheel | ||
shell: bash | ||
run: | | ||
CMAKE_ARCH="${{ matrix.cibw-arch == 'win32' && '-A Win32' || '' }}" | ||
CMAKE_OSX_ARCHITECTURES=${{ matrix.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.cibw-arch == 'macosx_universal2' && '"arm64;x86_64"' || '' }} | ||
echo "CIBW_BUILD=*-${{ matrix.cibw-arch }}" >> $GITHUB_ENV | ||
CIBW_ENVIRONMENT_COMMON="CMAKE_BUILD_PARALLEL_LEVEL=2" | ||
echo "CIBW_ENVIRONMENT=$CIBW_ENVIRONMENT_COMMON" >> $GITHUB_ENV | ||
echo "CIBW_ENVIRONMENT_LINUX=$CIBW_ENVIRONMENT_COMMON CFLAGS='-fPIC' CXXFLAGS='-fPIC'">> $GITHUB_ENV | ||
echo "CIBW_ENVIRONMENT_MACOS=$CIBW_ENVIRONMENT_COMMON MACOSX_DEPLOYMENT_TARGET=10.15 CMAKE_OSX_ARCHITECTURES=\"$CMAKE_OSX_ARCHITECTURES\"" >> $GITHUB_ENV | ||
CIBW_BEFORE_ALL_COMMON="" | ||
echo "CIBW_BEFORE_ALL=$CIBW_BEFORE_ALL_COMMON" >> $GITHUB_ENV | ||
echo "CIBW_BEFORE_ALL_MACOS=$CIBW_BEFORE_ALL_COMMON cmake -S . -B build_dependencies -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_STRATEGA_BINDINGS=ON $CMAKE_ARCH && cmake --build build_dependencies --config Release --target stratega -j 2" >> $GITHUB_ENV | ||
echo "CIBW_BEFORE_ALL_WINDOWS=$CIBW_BEFORE_ALL_COMMON cmake -S . -B build_dependencies -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_STRATEGA_BINDINGS=ON $CMAKE_ARCH && cmake --build build_dependencies --config Release --target stratega -j 2" >> $GITHUB_ENV | ||
echo "CIBW_BEFORE_ALL_LINUX=$CIBW_BEFORE_BUILD_COMMON pip install conan && apt-get update && apt-get -y install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype6-dev && cmake -S . -B build_dependencies -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_STRATEGA_BINDINGS=ON $CMAKE_ARCH && cmake --build build_dependencies --target stratega -j 2" >> $GITHUB_ENV | ||
echo "CIBW_BEFORE_BUILD_LINUX= pip install conan " >> $GITHUB_ENV | ||
- name: Run cibuildwheel | ||
run: | | ||
cibuildwheel | ||
- name: Check built wheels | ||
run: | | ||
twine check wheelhouse/* | ||
- name: Upload built wheels | ||
if: startsWith(github.ref, 'refs/heads/docs') != true | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: wheelhouse/*.whl | ||
if-no-files-found: error | ||
|
||
pypi: | ||
name: Upload to PyPI | ||
needs: [build_sdist, wheels] | ||
runs-on: ubuntu-20.04 | ||
# upload pypi wheels if commit is tagged with "v" | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Collect sdist and wheels | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: wheels | ||
path: wheelhouse | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PIPSTRATEGASECRETTEST }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
packages_dir: wheelhouse/ | ||
verbose: true |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(Stratega LANGUAGES CXX) | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61", | ||
"setuptools_scm>=6.2", | ||
"wheel", | ||
"cmake>=3.18", | ||
"pybind11~=2.6.1", | ||
"ninja; sys_platform != 'win32'", | ||
] | ||
build-backend = "setuptools.build_meta" |
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
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