Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
szczepanskiNicolas committed Oct 12, 2023
1 parent 1f99dcf commit e9121d5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

#on: [push]
on: [push]

jobs:
build_wheels:
Expand Down Expand Up @@ -30,4 +30,5 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
11 changes: 11 additions & 0 deletions publish_pypi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os

print("Please use the 'gh auth login' command to connect the github API.")
print("Type 'enter' to execute: 'gh auth login'")
input()

os.system("gh run download")

print("Type 'enter' to publish the wheels on pypi:")
input()
os.system("python3 -m twine upload --skip-existing *.whl")
32 changes: 32 additions & 0 deletions pypi/publish_pypi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os

versionFile = os.getcwd() + os.sep + "pyxai" + os.sep + "version.txt"
__version__ = open(versionFile, encoding='utf-8').read()

print("Type on the keyboard the new version number (current " + str(__version__) + ") ?")

new_version = input()
if new_version != "":
print("Write the new version ...")
with open(versionFile, "r+") as f:
data = f.read()
f.seek(0)
f.write(new_version)
f.truncate()

# print("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/")

os.system("sudo rm -rf build/ dist/ wheelhouse/ rm -rf dist/ build/ pyxai-experimental.egg-info/ pyxai.egg-info/")

# print("Type Enter to execute python3 setup.py sdist bdist_wheel")
# input()
# os.system("python3 setup.py sdist bdist_wheel")

print("Type Enter to execute the docker that build whells:")
input()

os.system("sudo docker run --rm -e PLAT=manylinux2014_x86_64 -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/travis/build-wheels.sh")

print("Type Enter to execute the publish on pypi the wheels:")
input()
os.system("python3 -m twine upload --skip-existing wheelhouse/*.whl")

0 comments on commit e9121d5

Please sign in to comment.