Skip to content

Commit

Permalink
Merge pull request #136 from supermihi/fix-ci
Browse files Browse the repository at this point in the history
CI: misc fixes and improvements
  • Loading branch information
supermihi authored Mar 17, 2024
2 parents d78443f + c225853 commit 39bcd7a
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
name: build & test
name: main

on: [push]

jobs:
build:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: install pip dependencies
run: |
python -m pip install --upgrade pip build
- name: sdist
run: python -m build --sdist
- name: upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
retention-days: 5
build_wheels:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
Expand All @@ -13,29 +32,11 @@ jobs:
CIBW_ARCHS: auto64
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: cache native build artifacts
uses: actions/cache@v4
with:
path: build
key: taglib-${{ matrix.os }}-${{ hashFiles('build_taglib.py') }}
- name: install pip dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
python -m pip install --upgrade pip build
- name: sdist (Linux)
if: ${{ runner.os == 'Linux' }}
run: python -m build --sdist
- name: upload sdist (Linux)
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' }}
with:
name: sdist
path: dist
retention-days: 5
- name: build binary wheels
uses: pypa/cibuildwheel@v2.17.0
- name: upload wheels
Expand All @@ -46,7 +47,7 @@ jobs:
retention-days: 5
publish:
runs-on: ubuntu-latest
needs: build
needs: [build_wheels, sdist]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: download source wheel
Expand Down

0 comments on commit 39bcd7a

Please sign in to comment.