Skip to content

Commit 592d8b3

Browse files
committed
CI publish
1 parent fb12b9f commit 592d8b3

File tree

6 files changed

+86
-131
lines changed

6 files changed

+86
-131
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,56 +16,6 @@ jobs:
1616
needs: call-test
1717
uses: ./.github/workflows/emscripten.yml
1818

19-
build-sdist:
20-
runs-on: ubuntu-latest
19+
call-wheel:
2120
needs: call-test
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: prefix-dev/[email protected]
25-
with:
26-
environments: dev
27-
cache: true
28-
- name: Re-install local
29-
run: |
30-
pixi reinstall -e dev --frozen fastcan
31-
- name: Build SDist
32-
run: |
33-
pixi run build-sdist
34-
- name: Store artifacts
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: cibw-sdist
38-
path: dist/*.tar.gz
39-
40-
build-wheels:
41-
strategy:
42-
fail-fast: false
43-
matrix:
44-
os: [ubuntu-latest, windows-latest, macos-latest]
45-
runs-on: ${{ matrix.os }}
46-
needs: call-test
47-
steps:
48-
- uses: actions/checkout@v4
49-
- name: Build wheels
50-
uses: pypa/[email protected]
51-
env:
52-
CIBW_BUILD: cp3*-*
53-
CIBW_SKIP: pp* *i686* *musllinux* *-macosx_universal2 *-manylinux_ppc64le *-manylinux_s390x
54-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
55-
CIBW_ARCHS_LINUX: auto64
56-
CIBW_ARCHS_MACOS: x86_64 arm64
57-
CIBW_ARCHS_WINDOWS: auto64
58-
CIBW_BEFORE_ALL_LINUX: yum install -y ninja-build python3-devel
59-
# Needed on Windows CI to compile with Visual Studio compiler
60-
# otherwise Meson detects a MINGW64 platform and use MINGW64
61-
# toolchain
62-
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
63-
# Include free-threaded support
64-
CIBW_ENABLE: cpython-freethreading
65-
# Numpy, scipy, Cython only have free-threaded wheels on scientific-python-nightly-wheels
66-
CIBW_BUILD_FRONTEND: 'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --only-binary :all:'
67-
- name: Upload package
68-
uses: actions/upload-artifact@v4
69-
with:
70-
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
71-
path: ./wheelhouse/*.whl
21+
uses: ./.github/workflows/wheel.yml

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
path: dist/
2323
merge-multiple: true
24+
pattern: cibw-*
2425

2526
- name: Publish distribution to PyPI
2627
uses: pypa/gh-action-pypi-publish@release/v1
@@ -36,4 +37,4 @@ jobs:
3637
with:
3738
files: |
3839
wasm/*.whl
39-
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
40+
prerelease: ${{ contains(github.ref, '-pre') }}

.github/workflows/wheel.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Wheel build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build-sdist:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: prefix-dev/[email protected]
12+
with:
13+
environments: dev
14+
cache: true
15+
- name: Re-install local
16+
run: |
17+
pixi reinstall -e dev --frozen fastcan
18+
- name: Build SDist
19+
run: |
20+
pixi run build-sdist
21+
- name: Store artifacts
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: cibw-sdist
25+
path: dist/*.tar.gz
26+
27+
build-wheels:
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
os: [ubuntu-latest, windows-latest, macos-latest]
32+
runs-on: ${{ matrix.os }}
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Build wheels
36+
uses: pypa/[email protected]
37+
env:
38+
CIBW_BUILD: cp3*-*
39+
CIBW_SKIP: pp* *i686* *musllinux* *-macosx_universal2 *-manylinux_ppc64le *-manylinux_s390x
40+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
41+
CIBW_ARCHS_LINUX: auto64
42+
CIBW_ARCHS_MACOS: x86_64 arm64
43+
CIBW_ARCHS_WINDOWS: auto64
44+
CIBW_BEFORE_ALL_LINUX: yum install -y ninja-build python3-devel
45+
# Needed on Windows CI to compile with Visual Studio compiler
46+
# otherwise Meson detects a MINGW64 platform and use MINGW64
47+
# toolchain
48+
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
49+
# Include free-threaded support
50+
CIBW_ENABLE: cpython-freethreading
51+
# Numpy, scipy, Cython only have free-threaded wheels on scientific-python-nightly-wheels
52+
CIBW_BUILD_FRONTEND: 'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --only-binary :all:'
53+
- name: Upload package
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
57+
path: ./wheelhouse/*.whl

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'fastcan',
33
'c', 'cython',
4-
version: '0.3.2',
4+
version: '0.4.0',
55
license: 'MIT',
66
meson_version: '>= 1.1.0',
77
default_options: [

pixi.lock

Lines changed: 23 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fastcan"
3-
version = "0.3.2"
3+
version = "0.4.0"
44
description = "A fast canonical-correlation-based feature selection method"
55
authors = [
66
{ name = "Matthew Sikai Zhang", email = "[email protected]" },

0 commit comments

Comments
 (0)