Skip to content

Commit

Permalink
[wheel build] One more test
Browse files Browse the repository at this point in the history
  • Loading branch information
q-posev committed Aug 17, 2024
1 parent 93f8136 commit 576c6f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
message: ${{ steps.commit_message.outputs.message }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791
# Gets the correct commit message for pull request
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -29,11 +29,7 @@ jobs:
run: |
set -xe
COMMIT_MSG=$(git log --no-merges -1 --oneline)
RUN="0"
if [[ "$COMMIT_MSG" == *"[wheel build]"* ]]; then
RUN="1"
fi
echo "message=$RUN" >> $GITHUB_OUTPUT
echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo github.ref ${{ github.ref }}
trexio_ubuntu:
Expand Down Expand Up @@ -102,7 +98,7 @@ jobs:
- name: publish Python API distribution as an artifact
if: >-
contains(needs.get_commit_message.outputs.message, '1') ||
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
github.event_name == 'release'
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
with:
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
message: ${{ steps.commit_message.outputs.message }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
# Gets the correct commit message for pull request
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -30,19 +30,14 @@ jobs:
run: |
set -xe
COMMIT_MSG=$(git log --no-merges -1 --oneline)
RUN="0"
if [[ "$COMMIT_MSG" == *"[wheel build]"* ]]; then
RUN="1"
fi
echo "message=$RUN" >> $GITHUB_OUTPUT
echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo github.ref ${{ github.ref }}
build_linux_wheels:
name: Build Linux wheels for different versions of CPython on manylinux_x86_64
needs: get_commit_message
if: >-
contains(needs.get_commit_message.outputs.message, '1') ||
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
(github.repository == 'TREX-CoE/trexio' && startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-22.04
strategy:
Expand All @@ -51,10 +46,10 @@ jobs:

steps:
- name: Checkout the branch
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.10'

Expand All @@ -70,7 +65,7 @@ jobs:
# Conventional download-artifact action does not work for artifact produced in a different workflow,
# which is the case here (TREXIO CI produced the Python API distribution tarball)
- name: Download the Python API distribution tarball
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
# Specify the name of the workflow file which uploaded the tarball
workflow: actions.yml
Expand All @@ -94,7 +89,7 @@ jobs:
working-directory: python

- name: Upload produced wheels as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: pytrexio-manylinux-${{ matrix.manylinux_tag }}
path: ./python/wheelhouse/*.whl
Expand All @@ -107,23 +102,23 @@ jobs:

steps:
- name: Checkout the branch
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
with:
python-version: '3.10'

- name: Install build dependencies
run: python -m pip install -U setuptools twine

- name: Download the build artifacts (wheels) of this workflow
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: dist

- name: Download the Python API distribution tarball
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
workflow: actions.yml
workflow_conclusion: success
Expand Down

0 comments on commit 576c6f7

Please sign in to comment.