-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial work on new wheel release mechanism
- Loading branch information
1 parent
04dbb37
commit e61cb84
Showing
118 changed files
with
1,433 additions
and
2,155 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
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,110 @@ | ||
name: Master merge | ||
|
||
# on: | ||
# push: | ||
# branches: [ master ] | ||
# workflow_dispatch: | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
MKN_COMPILE_THREADS: 2 | ||
MKN_GCC_PREFERRED: 1 | ||
MKN_LIB_LINK_LIB: 1 | ||
|
||
jobs: | ||
|
||
build_linux: | ||
runs-on: ubuntu-latest | ||
container: quay.io/pypa/manylinux2014_x86_64 | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312'] | ||
|
||
steps: | ||
- name: add Python dir to path | ||
run: | | ||
echo "/opt/python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Build for Python ${{ matrix.python-version }} | ||
run: | | ||
git config --global --add safe.directory '*' | ||
python3 -V | ||
python3 -m pip install -U pip | ||
python3 -m pip install -U build twine wheel | ||
python3 -m pip install -U -r requirements.txt | ||
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_manylinux | ||
chmod +x mkn | ||
PATH=$PWD:$PATH KLOG=3 mkn -C lib build -g 0 -dtOa "-fPIC -std=c++17" | ||
python3 -m build --wheel --no-isolation . | ||
python3 -m twine check dist/* | ||
rename 'linux_x86_64' 'manylinux_2_28_x86_64' dist/*.whl | ||
- name: Make wheels universal | ||
run: for wheel in $(ls dist/*.whl); do auditwheel repair $wheel; done | ||
- name: Save packages as artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: wheelhouse/*.whl | ||
|
||
|
||
test_wheels: | ||
needs: [build_linux] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] # ,macos-11, windows-latest | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
- name: install wheel (Unix) | ||
if: runner.os != 'Windows' | ||
run: | | ||
pip install --find-links $GITHUB_WORKSPACE/dist tick | ||
- name: install wheel (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
pip install --find-links $env:GITHUB_WORKSPACE\dist tick | ||
- uses: actions/checkout@v3 | ||
- name: run tests | ||
run: | # hide tick dir to avoid conflicts but still run tests | ||
python3 -V | ||
pip install -r requirements.txt | ||
mv tick _tick | ||
python3 -m unittest discover -v . "*_test.py" | ||
upload_test_pypi: | ||
needs: [test_wheels] | ||
runs-on: ubuntu-latest | ||
# upload to test PyPI on github pushes | ||
# if: github.event_name == 'push' && github.repository_owner == 'Tick' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
skip-existing: false |
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
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 |
---|---|---|
|
@@ -58,3 +58,5 @@ tools/benchmark/data | |
env*/ | ||
venv*/ | ||
tickf.yml | ||
dist | ||
tick.egg-info/ |
This file was deleted.
Oops, something went wrong.
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,8 +1,3 @@ | ||
# Setuptools is not aware of source headers, or non-module SWIG files, so we | ||
# grab them here | ||
global-include *.h | ||
global-include *.i | ||
global-include *.inl | ||
recursive-include tick * | ||
recursive-exclude lib * | ||
|
||
# Getting the Cereal header-only library | ||
recursive-include lib/third_party/cereal/include *.h *.hpp |
Oops, something went wrong.