Skip to content

Commit

Permalink
Add build_whl job in GitHub actions to build DE whl
Browse files Browse the repository at this point in the history
  • Loading branch information
vitodb committed Dec 28, 2023
1 parent a50c98d commit 417cd39
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,45 @@ jobs:
cd doc
make rst html latexpdf
build_whl:
if: ${{ github.ref != 'refs/heads/1.7' }}
name: Build DE whl
runs-on: ubuntu-latest
needs: pytest
steps:
- name: make date tag
id: mkdatetag
run: echo "::set-output name=dtag::$(date +%Y%m%d_%H%M%S)"

- name: make ref tag case 1
id: mkreftag1
if: ${{ github.event.inputs.ref != '' }}
run: echo "::set-output name=reftag::${{github.event.inputs.ref}}"

- name: make ref tag case 2
id: mkreftag2
if: ${{ github.event.inputs.ref == '' }}
run: echo "::set-output name=reftag::${GITHUB_BASE_REF:+PR}"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF})

- name: checkout code tree
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{github.event.inputs.ref}}

- name: Run the build in a container (EL9/HEPCloud-CI)
uses: ./.github/actions/python-command-in-el9-container
with:
python-command: "setup.py bdist_wheel"
logfile: "rpmbuild.log"

- name: Archive whl
uses: actions/upload-artifact@v3
with:
name: whl-DE-EL9-${{steps.mkreftag1.outputs.reftag}}${{steps.mkreftag2.outputs.reftag}}-${{steps.mkdatetag.outputs.dtag}}
path: dist/*.whl
if-no-files-found: error

rpmbuild_el7:
if: ${{ github.ref == 'refs/heads/1.7' }}
name: Build an EL7 rpm
Expand Down

0 comments on commit 417cd39

Please sign in to comment.