build-manual flux-python #20
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
name: build-manual flux-python | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Pypi version' | |
release_version: | |
description: 'Version of flux to build' | |
default: "0.50.0" | |
rc: | |
description: 'Release candidate to build (for wheel)' | |
default: "0" | |
branch: | |
description: 'Branch to build from' | |
default: "master" | |
repo: | |
description: 'Repository to build from' | |
default: "https://github.com/flux-framework/flux-core" | |
jobs: | |
build-manual: | |
runs-on: ubuntu-latest | |
container: | |
image: fluxrm/testenv:focal | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 }} | |
shell: bash | |
run: | | |
echo "Flux Repo: ${FLUX_REPO}" | |
echo "Flux Branch: ${FLUX_BRANCH}" | |
if [[ "${FLUX_REPO}" == "" ]]; then | |
FLUX_REPO="https://github.com/flux-framework/flux-core" | |
fi | |
if [[ "${FLUX_BRANCH}" == "" ]]; then | |
FLUX_BRANCH="master" | |
fi | |
git clone -b ${FLUX_BRANCH} ${FLUX_REPO} /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: | | |
ls dist/ | |
twine upload --skip-existing dist/flux_python* | |