Skip to content

Commit 741866a

Browse files
chore: release v0.6.0rc1 (#71)
* chore: maintenance * fix: yaml indent * fix: ruff * fix: ruff * chore: update deps * feat: python3.13 support * fix: 3.8, 3.9 * fix: examples * fix: simple-structure * fix: windows tests, add codecov * fix: windows tests * fix: windows tests * fix: windows tests * fix: windows tests
1 parent eef506c commit 741866a

File tree

30 files changed

+740
-549
lines changed

30 files changed

+740
-549
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly

.github/workflows/build.yaml

Lines changed: 160 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,171 @@
11
name: build
22

33
on:
4-
push:
5-
tags:
6-
- v*
7-
branches:
8-
- main
4+
push:
5+
tags:
6+
- v*
7+
branches:
8+
- main
99

1010
permissions:
11-
contents: write
12-
id-token: write
11+
contents: write
12+
id-token: write
1313

1414
concurrency:
15-
group: ${{ github.workflow }}-${{ github.sha }}
16-
cancel-in-progress: true
15+
group: ${{ github.workflow }}-${{ github.sha }}
16+
cancel-in-progress: true
1717

1818
defaults:
19-
run:
20-
shell: bash
19+
run:
20+
shell: bash
2121

2222
jobs:
23-
validate:
24-
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
25-
runs-on: ${{ matrix.os }}
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
os: [ubuntu-latest, windows-latest, macos-latest]
30-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
31-
32-
steps:
33-
- uses: actions/checkout@v4
34-
35-
- name: Install llvm
36-
if: startsWith(matrix.os, 'macos')
37-
run: |
38-
brew remove --ignore-dependencies python
39-
rm -rf /usr/local/bin/2to3*
40-
rm -rf /usr/local/bin/idle3*
41-
rm -rf /usr/local/bin/pydoc3*
42-
rm -rf /usr/local/bin/python*
43-
brew cleanup
44-
brew update -f
45-
brew install libomp llvm
46-
echo "
47-
export PATH=\"$(brew --prefix)/opt/llvm/bin:\$PATH\"
48-
export DYLD_LIBRARY_PATH=\"$(brew --prefix)/lib:$DYLD_LIBRARY_PATH\"
49-
export LDFLAGS=\"-L$(brew --prefix)/opt/llvm/lib\"
50-
export CPPFLAGS=\"-I$(brew --prefix)/opt/llvm/include\"
51-
export LD=ld.lld
52-
export AR=llvm-ar
53-
export RANLIB=llvm-ranlib
54-
55-
" >> $HOME/.bash_profile
56-
57-
- uses: actions/setup-go@v5
58-
with:
59-
go-version: stable
60-
61-
- name: Install Task
62-
run: |
63-
go install github.com/go-task/task/v3/cmd/task@latest
64-
65-
- uses: hecrj/setup-rust-action@v2
66-
with:
67-
rust-version: stable
68-
69-
- uses: cargo-bins/cargo-binstall@main
70-
71-
- name: Install jaq
72-
run: |
73-
cargo binstall -y jaq
74-
75-
- name: Set up Python ${{ matrix.python-version }}
76-
uses: actions/setup-python@v5
77-
with:
78-
python-version: ${{ matrix.python-version }}
79-
80-
- name: Install Hatch
81-
run: |
82-
pip install --upgrade pip
83-
pip install --upgrade hatch
84-
85-
- name: Run tests
86-
run: hatch run cov
87-
88-
- name: Test src lib compilation
89-
shell: bash
90-
run: |
91-
task example
92-
93-
- name: Test simple lib compilation
94-
shell: bash
95-
run: |
96-
task simple-structure
97-
98-
- name: Test build target directives
99-
shell: bash
100-
run: |
101-
task only-included
102-
103-
sdist:
104-
needs: [validate]
105-
runs-on: ubuntu-latest
106-
steps:
107-
- uses: actions/checkout@v4
108-
- name: Set up Python
109-
uses: actions/setup-python@v5
110-
- name: Install dependencies
111-
run: |
112-
python -m pip install --upgrade pip
113-
pip install hatch
114-
- name: Build package
115-
run: hatch build -t sdist
116-
- name: Upload sdist
117-
uses: actions/upload-artifact@v4
118-
with:
119-
name: hatch-cython-sdist
120-
path: ./dist/
121-
122-
wheel:
123-
needs: [validate]
124-
runs-on: ${{ matrix.os }}
125-
strategy:
126-
matrix:
127-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
128-
os: [ubuntu-latest, windows-latest, macos-latest]
129-
steps:
130-
- uses: actions/checkout@v4
131-
- name: Set up Python ${{ matrix.python-version }}
132-
uses: actions/setup-python@v5
133-
with:
134-
python-version: ${{ matrix.python-version }}
135-
- name: Install dependencies
136-
run: |
137-
python -m pip install --upgrade pip
138-
pip install hatch
139-
- name: Build package
140-
run: hatch build -t wheel
141-
- name: Upload wheel
142-
uses: actions/upload-artifact@v4
143-
with:
144-
name: wheel-${{ matrix.python-version }}-${{ matrix.os }}
145-
path: ./dist/
146-
147-
release:
148-
needs: [sdist, wheel]
149-
runs-on: ubuntu-latest
150-
if: startsWith(github.ref, 'refs/tags/')
151-
environment:
152-
name: pypi
153-
url: https://pypi.org/p/hatch-cython
154-
steps:
155-
- name: Download all workflow run artifacts
156-
uses: actions/download-artifact@v4
157-
with:
158-
path: dist/
159-
merge-multiple: true
160-
- name: Display downloaded files
161-
run: ls -R ./dist
162-
- name: Release
163-
uses: softprops/action-gh-release@v2
164-
with:
165-
generate_release_notes: true
166-
fail_on_unmatched_files: true
167-
prerelease: ${{ contains(github.ref, 'rc') }}
168-
files: |-
169-
dist/*
170-
- name: Publish package
171-
uses: pypa/gh-action-pypi-publish@release/v1
23+
validate:
24+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
os: [ubuntu-latest, windows-latest, macos-latest]
30+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Install llvm
36+
if: startsWith(matrix.os, 'macos')
37+
run: |
38+
brew remove --ignore-dependencies python
39+
rm -rf /usr/local/bin/2to3*
40+
rm -rf /usr/local/bin/idle3*
41+
rm -rf /usr/local/bin/pydoc3*
42+
rm -rf /usr/local/bin/python*
43+
brew cleanup
44+
brew update -f
45+
brew install libomp llvm
46+
echo "
47+
export PATH=\"$(brew --prefix)/opt/llvm/bin:\$PATH\"
48+
export DYLD_LIBRARY_PATH=\"$(brew --prefix)/lib:$DYLD_LIBRARY_PATH\"
49+
export LDFLAGS=\"-L$(brew --prefix)/opt/llvm/lib\"
50+
export CPPFLAGS=\"-I$(brew --prefix)/opt/llvm/include\"
51+
export LD=ld.lld
52+
export AR=llvm-ar
53+
export RANLIB=llvm-ranlib
54+
55+
" >> $HOME/.bash_profile
56+
57+
- uses: actions/setup-go@v5
58+
with:
59+
go-version: stable
60+
61+
- name: Install Task
62+
run: |
63+
go install github.com/go-task/task/v3/cmd/task@latest
64+
65+
- uses: hecrj/setup-rust-action@v2
66+
with:
67+
rust-version: stable
68+
69+
- uses: cargo-bins/cargo-binstall@main
70+
71+
- name: Install jaq
72+
run: |
73+
cargo binstall -y jaq
74+
75+
- name: Set up Python ${{ matrix.python-version }}
76+
uses: actions/setup-python@v5
77+
with:
78+
python-version: ${{ matrix.python-version }}
79+
80+
- name: Install Hatch
81+
run: |
82+
pip install --upgrade pip
83+
pip install --upgrade hatch
84+
85+
- name: Run tests
86+
run: hatch run cov
87+
88+
- name: Test src lib compilation
89+
shell: bash
90+
run: |
91+
task example
92+
93+
- name: Test simple lib compilation
94+
shell: bash
95+
run: |
96+
task simple-structure
97+
98+
- name: Test build target directives
99+
shell: bash
100+
run: |
101+
task only-included
102+
103+
sdist:
104+
needs: [validate]
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Set up Python
109+
uses: actions/setup-python@v5
110+
- name: Install dependencies
111+
run: |
112+
python -m pip install --upgrade pip
113+
pip install hatch
114+
- name: Build package
115+
run: hatch build -t sdist
116+
- name: Upload sdist
117+
uses: actions/upload-artifact@v7
118+
with:
119+
name: hatch-cython-sdist
120+
path: ./dist/
121+
122+
wheel:
123+
needs: [validate]
124+
runs-on: ${{ matrix.os }}
125+
strategy:
126+
matrix:
127+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
128+
os: [ubuntu-latest, windows-latest, macos-latest]
129+
steps:
130+
- uses: actions/checkout@v4
131+
- name: Set up Python ${{ matrix.python-version }}
132+
uses: actions/setup-python@v5
133+
with:
134+
python-version: ${{ matrix.python-version }}
135+
- name: Install dependencies
136+
run: |
137+
python -m pip install --upgrade pip
138+
pip install hatch
139+
- name: Build package
140+
run: hatch build -t wheel
141+
- name: Upload wheel
142+
uses: actions/upload-artifact@v7
143+
with:
144+
name: wheel-${{ matrix.python-version }}-${{ matrix.os }}
145+
path: ./dist/
146+
147+
release:
148+
needs: [sdist, wheel]
149+
runs-on: ubuntu-latest
150+
if: startsWith(github.ref, 'refs/tags/')
151+
environment:
152+
name: pypi
153+
url: https://pypi.org/p/hatch-cython
154+
steps:
155+
- name: Download all workflow run artifacts
156+
uses: actions/download-artifact@v7
157+
with:
158+
path: dist/
159+
merge-multiple: true
160+
- name: Display downloaded files
161+
run: ls -R ./dist
162+
- name: Release
163+
uses: softprops/action-gh-release@v2
164+
with:
165+
generate_release_notes: true
166+
fail_on_unmatched_files: true
167+
prerelease: ${{ contains(github.ref, 'rc') }}
168+
files: |-
169+
dist/*
170+
- name: Publish package
171+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/coverage.yaml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
name: Coverage
22
on: [push, pull_request]
33
jobs:
4-
cov:
5-
runs-on: ubuntu-latest
6-
steps:
7-
- name: Checkout
8-
uses: actions/checkout@v4
9-
- name: Set up Python 3.11
10-
uses: actions/setup-python@v5
11-
with:
12-
python-version: '3.11'
13-
- name: Install dependencies
14-
run: pip install '.[test]'
15-
- name: Run tests and collect coverage
16-
run: pytest --cov --ignore=test_libraries
17-
- name: Upload coverage to Codecov
18-
uses: codecov/codecov-action@v3
19-
env:
20-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4+
cov:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
- name: Set up Python 3.11
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.11'
13+
- name: Install dependencies
14+
run: pip install '.[test]'
15+
- name: Run tests and collect coverage
16+
run: pytest --cov --junitxml=junit.xml -o junit_family=legacy --ignore=test_libraries
17+
- name: Upload coverage to Codecov
18+
if: ${{ !cancelled() }}
19+
uses: codecov/codecov-action@v5
20+
with:
21+
token: ${{ secrets.CODECOV_TOKEN }}
22+
- name: Upload test results to Codecov
23+
if: ${{ !cancelled() }}
24+
uses: codecov/test-results-action@v1
25+
with:
26+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)