Skip to content

Commit

Permalink
👷 update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Oct 12, 2024
1 parent 7a9d304 commit ff49dd4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 32 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: .github/workflows
schedule:
interval: weekly
49 changes: 19 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types:
- opened
paths:
- 'src/tarina/_op.h'
- 'src/tarina/*_c.c'
- 'src/tarina/*_c.pyx'
release:
Expand All @@ -25,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
Expand All @@ -38,8 +39,9 @@ jobs:
- name: Build sdist
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pkg-sdist
path: dist/*.tar.gz

build_pure_wheel:
Expand All @@ -48,7 +50,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
Expand All @@ -62,42 +64,27 @@ jobs:
run: |
export TARINA_NO_EXTENSIONS=1
pipx run build --wheel
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pkg-pure-wheel
path: dist/*.whl

build_wheels:
name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }}
runs-on: ${{ matrix.os }}-latest
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu, windows, macos]
qemu: ['']
include:
- os: ubuntu
qemu: aarch64
- os: ubuntu
qemu: ppc64le
- os: ubuntu
qemu: s390x
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: ${{ matrix.qemu }}
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
id: qemu
- name: Prepare emulation
run: |
if [[ -n "${{ matrix.qemu }}" ]]; then
# Build emulated architectures only if QEMU is set,
# use default "auto" otherwise
echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV
fi
shell: bash
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
- name: Install cython
uses: py-actions/py-dependency-install@v4
with:
Expand All @@ -108,13 +95,14 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_ARCHS_LINUX: auto
CIBW_ARCHS_WINDOWS: auto x86
CIBW_ARCHS_MACOS: auto universal2
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
CIBW_ARCHS_WINDOWS: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
if: github.event_name != 'pull_request'
with:
name: pkg-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

release:
Expand All @@ -128,10 +116,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
pattern: pkg-*
merge-multiple: true
- name: Publish package
uses: pypa/[email protected]
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- main
paths-ignore:
- '.github/workflows/build.yml'
pull_request:

jobs:
Expand All @@ -13,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Ensure Python Runtime
with:
python-version: ${{matrix.py_ver}}
Expand All @@ -38,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Ensure Python Runtime
with:
python-version: ${{matrix.py_ver}}
Expand Down

0 comments on commit ff49dd4

Please sign in to comment.