Skip to content

Commit

Permalink
Different steps on PR and pushing to tags
Browse files Browse the repository at this point in the history
  • Loading branch information
atemerev committed Mar 4, 2024
1 parent fbf09d2 commit c95917b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_test_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Neurodamus Build / test wheels

on:
pull_request:

jobs:
build-wheel:
runs-on: ubuntu-22.04
strategy:
matrix:
python_version: [3.11]
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 500
fetch-tags: true
- name: Build Wheel
run: |
cd $GITHUB_WORKSPACE
python${{ matrix.python_version }} -m pip install --upgrade build
# build wheel
python${{ matrix.python_version }} -m build .
- name: Test Wheel
run: |
cd $GITHUB_WORKSPACE
pip3 install tox
DIST_FILE=`ls dist/*whl` && tox --installpkg=$DIST_FILE -e ${{ matrix.python_version }}
28 changes: 3 additions & 25 deletions .github/workflows/publish_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,11 @@ on:
workflow_dispatch:

jobs:
wheel:
runs-on: ubuntu-22.04
strategy:
matrix:
python_version: [3.11]
publish-wheel:
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 500
fetch-tags: true
- name: Build Wheel
run: |
cd $GITHUB_WORKSPACE
python${{ matrix.python_version }} -m pip install --upgrade build
# build wheel
python${{ matrix.python_version }} -m build .
- name: Test Wheel
run: |
cd $GITHUB_WORKSPACE
pip3 install tox
DIST_FILE=`ls dist/*whl` && tox --installpkg=$DIST_FILE -e ${{ matrix.python_version }}
- name: Upload Wheel
uses: BlueBrainProject/neurodamus/.github/workflows/build_test_wheels@v1
needs: build-wheel
env:
PYPI_URL: ${{ secrets.PYPI_URL }}
PYPI_USER: ${{ secrets.PYPI_USER }}
Expand Down

0 comments on commit c95917b

Please sign in to comment.