-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add wheel build this wont work because pypi will not accept this build, but maybe someone else can help to use manylinuxl... Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
160 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: build-legacy flux-python | ||
|
||
on: | ||
pull_request: [] | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to build from' | ||
default: "master" | ||
rc: | ||
description: 'Release candiate to target for wheels' | ||
default: "0" | ||
repo: | ||
description: 'Repository to build from' | ||
default: "https://github.com/rse-ops/flux-core-python" | ||
|
||
jobs: | ||
build-legacy-wheels: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fluxrm/testenv:focal | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build Flux Core Branch | ||
env: | ||
FLUX_RELEASE_VERSION: ${{ inputs.release_version }} | ||
FLUX_VERSION: ${{ inputs.version }} | ||
run: /bin/bash .github/scripts/setup.sh | ||
|
||
- name: Build Python Bindings | ||
env: | ||
FLUX_BRANCH: ${{ inputs.branch }} | ||
FLUX_REPO: ${{ inputs.repo }} | ||
|
||
run: | | ||
git clone -b ${FLUX_BRANCH} ${FLUX_REPO} /tmp/flux-core || git clone https://github.com/flux-framework/flux-core /tmp/flux-core | ||
mv /tmp/flux-core/src/bindings/python/flux ./flux | ||
python3 setup.py sdist | ||
sudo ldconfig | ||
- name: Build Python Wheels | ||
env: | ||
build_number: ${{ inputs.rc }} | ||
run: | | ||
/bin/bash ./docker/install-mamba.sh | ||
/bin/bash ./docker/build-wheels.sh ${build_number} | ||
- name: Install dependencies | ||
if: (github.event_name != 'pull_request') | ||
run: python3 -m pip install setuptools wheel twine | ||
|
||
- name: Build and publish | ||
if: (github.event_name != 'pull_request') | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USER }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }} | ||
run: twine upload dist/* |
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
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,23 @@ | ||
#!/bin/bash | ||
|
||
here=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
version=${1} | ||
build_number=${2:-0} | ||
|
||
if [[ "${version}" == "" ]]; then | ||
echo "Version must be provided as script argument" | ||
exit | ||
fi | ||
|
||
# This is intended to run in the container | ||
echo "Building Python version ${version}" | ||
/opt/conda/bin/mamba create -y -p /tmp/py${version} python==${version} | ||
/opt/conda/bin/mamba install -y -q -p /tmp/py${version} cffi ply six pyyaml jsonschema | ||
export PATH=/tmp/py${version}/bin:$PATH | ||
export PYTHONPATH=/tmp/py${version}/lib/python3.6/site-packages | ||
|
||
# Build the bindings for this python version! | ||
python3 setup.py sdist | ||
python3 setup.py bdist_wheel --plat-name=any --build-number=${build_number} | ||
unset PYTHONPATH |
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,11 @@ | ||
#!/bin/bash | ||
|
||
here=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
build_number=${1:-0} | ||
|
||
# Create python environments for each version we want to release! | ||
# We wrap like this because this script can be used locally, but | ||
# in GitHub actions we want to do in a matrix | ||
for version in 3.6 3.7 3.8 3.9 3.10; do | ||
/bin/bash $here/build-wheel.sh ${version} ${build_number} | ||
done |
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 @@ | ||
#!/bin/bash | ||
|
||
# Install mamba for different python versions | ||
# Python - instead of a system python we install mamba | ||
curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh > mambaforge.sh | ||
chmod +x ./mambaforge.sh | ||
sudo bash mambaforge.sh -b -p /opt/conda | ||
rm mambaforge.sh | ||
/opt/conda/bin/pip install --upgrade --ignore-installed coverage cffi ply six pyyaml jsonschema | ||
sudo chown -R $(id -u) /opt/conda |