Skip to content

Commit 9fcb43a

Browse files
committed
Update release system.
Build and upload the release binaries for all supported platforms. Also, build and upload Python wheels to PyPI.
1 parent 0482121 commit 9fcb43a

File tree

3 files changed

+103
-19
lines changed

3 files changed

+103
-19
lines changed

.github/workflows/publish_release_binaries.yaml

Lines changed: 68 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,27 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
Publish-Release-Binaries:
10-
runs-on: ubuntu-latest
9+
Build-Release-Binaries:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
include:
14+
- os: ubuntu-24.04
15+
label: linux.x86_64
16+
simd: true
17+
ext: ""
18+
- os: macos-13
19+
label: darwin.x86_64
20+
simd: true
21+
ext: ""
22+
- os: macos-14
23+
label: darwin.aarch64
24+
simd: false
25+
ext: ""
26+
- os: windows-2022
27+
label: windows.x86_64
28+
simd: true
29+
ext: ".exe"
1130

1231
steps:
1332
- name: Checkout the repository
@@ -16,50 +35,82 @@ jobs:
1635
fetch-depth: 1
1736
submodules: recursive
1837

19-
- name: Set reusable strings
38+
- name: Set reusable paths
2039
id: strings
2140
shell: bash
2241
run: |
2342
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
2443
echo "bin-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
44+
echo "release-dir=${{ github.workspace }}/bin/release" >> "$GITHUB_OUTPUT"
45+
46+
- name: Create release directory
47+
run: mkdir -p ${{ steps.strings.outputs.release-dir }}
2548

26-
- name: Configure CMake (w/ vector support)
49+
- name: Configure CMake (SIMD)
50+
if: matrix.simd == true
2751
run: >
2852
cmake -B ${{ steps.strings.outputs.build-dir }}
2953
-DQUICKED_NONATIVE=ON
54+
${{ matrix.os == 'macos-14' && '-DCMAKE_APPLE_SILICON_PROCESSOR=arm64' || '' }}
3055
-S ${{ github.workspace }}
3156
32-
- name: Build (w/ vector support)
57+
- name: Build (SIMD)
58+
if: matrix.simd == true
3359
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 4
3460

35-
- name: Move the target artifacts (w/ vector support)
61+
- name: Move artifacts (SIMD)
62+
if: matrix.simd == true
63+
shell: bash
3664
run: |
37-
mkdir -p ${{ steps.strings.outputs.bin-dir }}/release
38-
mv ${{ steps.strings.outputs.bin-dir }}/align_benchmark ${{ steps.strings.outputs.bin-dir }}/release/align_benchmark-x86_64-SIMD
39-
mv ${{ steps.strings.outputs.bin-dir }}/generate_dataset ${{ steps.strings.outputs.bin-dir }}/release/generate_dataset-x86_64-SIMD
65+
mv "${{ steps.strings.outputs.bin-dir }}/align_benchmark${{ matrix.ext }}" \
66+
"${{ steps.strings.outputs.release-dir }}/align_benchmark-${{ matrix.label }}-SIMD${{ matrix.ext }}"
67+
mv "${{ steps.strings.outputs.bin-dir }}/generate_dataset${{ matrix.ext }}" \
68+
"${{ steps.strings.outputs.release-dir }}/generate_dataset-${{ matrix.label }}-SIMD${{ matrix.ext }}"
4069
4170
- name: Clean
71+
if: matrix.simd == true
4272
run: cmake --build ${{ steps.strings.outputs.build-dir }} --target clean
4373

44-
- name: Configure CMake (w/o vector support)
74+
- name: Configure CMake (Scalar)
4575
run: >
4676
cmake -B ${{ steps.strings.outputs.build-dir }}
4777
-DQUICKED_NONATIVE=ON
4878
-DQUICKED_FORCESCALAR=ON
79+
${{ matrix.os == 'macos-14' && '-DCMAKE_APPLE_SILICON_PROCESSOR=arm64' || '' }}
4980
-S ${{ github.workspace }}
5081
51-
- name: Build (w/o vector support)
82+
- name: Build (Scalar)
5283
run: cmake --build ${{ steps.strings.outputs.build-dir }} --config Release --parallel 4
5384

54-
- name: Move the target artifacts (w/o vector support)
85+
- name: Move artifacts (Scalar)
86+
shell: bash
5587
run: |
56-
mkdir -p ${{ steps.strings.outputs.bin-dir }}/release
57-
mv ${{ steps.strings.outputs.bin-dir }}/align_benchmark ${{ steps.strings.outputs.bin-dir }}/release/align_benchmark-x86_64
58-
mv ${{ steps.strings.outputs.bin-dir }}/generate_dataset ${{ steps.strings.outputs.bin-dir }}/release/generate_dataset-x86_64
88+
mv "${{ steps.strings.outputs.bin-dir }}/align_benchmark${{ matrix.ext }}" \
89+
"${{ steps.strings.outputs.release-dir }}/align_benchmark-${{ matrix.label }}${{ matrix.ext }}"
90+
mv "${{ steps.strings.outputs.bin-dir }}/generate_dataset${{ matrix.ext }}" \
91+
"${{ steps.strings.outputs.release-dir }}/generate_dataset-${{ matrix.label }}${{ matrix.ext }}"
92+
93+
- name: Upload per-platform artifacts
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: release-${{ matrix.label }}
97+
path: ${{ steps.strings.outputs.release-dir }}/*
98+
99+
Upload-Release-Binaries:
100+
runs-on: ubuntu-latest
101+
needs: Build-Release-Binaries
102+
103+
steps:
104+
- name: Download all release artifacts
105+
uses: actions/download-artifact@v4
106+
with:
107+
pattern: release-*
108+
merge-multiple: true
109+
path: ./all_binaries
59110

60-
- name: Upload the artifacts
111+
- name: Upload the artifacts to the release
61112
uses: skx/github-action-publish-binaries@master
62113
env:
63114
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64115
with:
65-
args: '${{ steps.strings.outputs.bin-dir }}/release/*'
116+
args: './all_binaries/*'

.github/workflows/python_wheels.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,33 @@ jobs:
2727
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
2828
path: ./wheelhouse/*.whl
2929

30+
make_sdist:
31+
name: Make SDist
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Build SDist
39+
run: pipx run build --sdist
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: cibw-sdist
44+
path: dist/*.tar.gz
45+
46+
upload_all:
47+
needs: [build_wheels, make_sdist]
48+
environment: PyPI
49+
permissions:
50+
id-token: write
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/download-artifact@v4
54+
with:
55+
pattern: cibw-*
56+
path: dist
57+
merge-multiple: true
58+
59+
- uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ license = "MIT"
3030
license-files = ["LICENSE"]
3131
keywords = ["edit", "distance", "levenshtein", "align", "sequence", "bioinformatics"]
3232
classifiers = [
33-
"Development Status :: 4 - Beta",
33+
"Development Status :: 5 - Production/Stable",
3434
"Intended Audience :: Developers",
3535
"Intended Audience :: Science/Research",
3636
"Programming Language :: Python :: 3",
3737
"Topic :: Scientific/Engineering :: Bio-Informatics",
3838
]
39-
version = "1.1a1"
39+
version = "1.2"
4040
requires-python = ">= 3.8"
41+
dependencies = [
42+
"py-cpuinfo>=9.0.0",
43+
]
4144

4245
[project.urls]
4346
Homepage = "https://github.com/maxdoblas/QuickEd"

0 commit comments

Comments
 (0)