Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
[CI] Build in the main release job, download in test job
Browse files Browse the repository at this point in the history
Makes more sense - this way we can control the version etc
  • Loading branch information
igiloh-pinecone committed Nov 1, 2023
1 parent 43d17f4 commit 611f634
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 42 deletions.
34 changes: 1 addition & 33 deletions .github/workflows/pre-release-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,8 @@ concurrency:
cancel-in-progress: true

jobs:
build:
name: Build python${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2

- name: Build wheel
run: |
poetry build
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-py${{ matrix.python-version }}
path: ./dist/


build-and-test:
test-installation:
name: Test on ${{ matrix.os }}-py${{ matrix.python-version }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
49 changes: 40 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,48 @@ env:

jobs:
build:
uses: ./.github/workflows/pre-release-CI.yml

publish:
needs: build
name: Build python${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9, '3.10', 3.11 ]

steps:
- name: download wheels
uses: actions/download-artifact@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
path: wheels
version: 1.3.2

- name: debug print wheels
- name: Build wheel
run: |
ls -lah wheels/
poetry build
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-py${{ matrix.python-version }}
path: ./dist/

test-all-OSes:
needs: build
uses: ./.github/workflows/pre-release-CI.yml

# publish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: download wheels
# uses: actions/download-artifact@v2
# with:
# path: wheels
#
# - name: debug print wheels
# run: |
# ls -lah wheels/

0 comments on commit 611f634

Please sign in to comment.