Skip to content

Commit cbd720d

Browse files
author
Your Name
committed
add back .github
1 parent 31de087 commit cbd720d

File tree

3 files changed

+136
-0
lines changed

3 files changed

+136
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
ignore:
9+
# Offical actions have moving tags like v1
10+
# that are used, so they don't need updates here
11+
- dependency-name: "actions/*"

.github/workflows/pip.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Pip
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
name: Build with Pip
13+
runs-on: ${{ matrix.platform }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
platform: [windows-latest, macos-latest, ubuntu-latest]
18+
python-version: ["3.8", "3.11"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Set min macOS version
30+
if: runner.os == 'macOS'
31+
run: |
32+
echo "MACOS_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV
33+
34+
- name: Build and install Cholespy
35+
run: python -m pip install .
36+
37+
- name: Install test dependencies
38+
run: python -m pip install pytest numpy scipy
39+
40+
- name: Test
41+
run: python -m pytest tests

.github/workflows/wheels.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Wheels
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
9+
env:
10+
CIBW_TEST_COMMAND: pytest {project}/tests
11+
CIBW_TEST_REQUIRES: pytest numpy scipy
12+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
13+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
14+
CIBW_SKIP: "*-win32 *_i686 pp* *-musllinux* cp38-macosx_arm64 cp313*" # Skip PyPy, 32-bit builds, musl linux, Python 3.13
15+
CIBW_BEFORE_ALL_LINUX: "yum install -y lapack-devel"
16+
CIBW_ARCHS_WINDOWS: auto64
17+
CIBW_ARCHS_LINUX: auto64
18+
CIBW_ARCHS_MACOS: x86_64 arm64
19+
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.14
20+
21+
jobs:
22+
build_sdist:
23+
name: Build SDist
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
submodules: true
29+
30+
- name: Build SDist
31+
run: pipx run build --sdist
32+
33+
- name: Check metadata
34+
run: pipx run twine check dist/*
35+
36+
- uses: actions/upload-artifact@v2
37+
with:
38+
path: dist/*.tar.gz
39+
40+
build_wheels:
41+
name: Wheels on ${{ matrix.os }}
42+
runs-on: ${{ matrix.os }}
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
os: [ubuntu-latest, macos-latest, windows-latest]
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
with:
51+
submodules: true
52+
53+
- uses: pypa/[email protected]
54+
55+
- name: Verify clean directory
56+
run: git diff --exit-code
57+
shell: bash
58+
59+
- name: Check metadata
60+
run: pipx run twine check wheelhouse/*
61+
62+
- name: Upload wheels
63+
uses: actions/upload-artifact@v2
64+
with:
65+
path: wheelhouse/*.whl
66+
67+
upload_all:
68+
name: Upload if release
69+
needs: [build_wheels, build_sdist]
70+
runs-on: ubuntu-latest
71+
if: github.event_name == 'release' && github.event.action == 'published'
72+
73+
steps:
74+
- uses: actions/setup-python@v2
75+
76+
- uses: actions/download-artifact@v2
77+
with:
78+
name: artifact
79+
path: dist
80+
81+
- uses: pypa/[email protected]
82+
with:
83+
user: __token__
84+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)