Skip to content

Commit a89d71d

Browse files
authored
Building wheels using GitHub Artifacts (#157)
1 parent 05ea705 commit a89d71d

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

.github/workflows/coverage.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313

1414
jobs:
1515
build:
16+
if: github.repository == 'john-science/mazelib'
1617

1718
runs-on: ubuntu-24.04
1819

.github/workflows/wheels.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build wheels
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
if: github.repository == 'john-science/mazelib'
14+
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: "3.13"
23+
- name: Update package index
24+
run: sudo apt-get update
25+
- name: Install PIP Packages
26+
run: |
27+
pip install -U pip
28+
pip install -e .
29+
- name: Build Wheels
30+
run: |
31+
pip install -U wheel
32+
mkdir dist
33+
pip wheel . -w dist/
34+
rm dist/Cython*.whl
35+
rm dist/numpy*.whl
36+
- name: Archive PIP wheel artifacts
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: mazelib-wheels
40+
path: |
41+
dist/mazelib*.whl
42+
retention-days: 5

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
.PHONY: all clean uninstall install benchmark lint test wheel twine
1+
##########################################
2+
# Just a handy set of dev shortcuts #
3+
##########################################
4+
.PHONY: all clean uninstall install lint test benchmark wheel twine
25

36
all:
47
@grep -Ee '^[a-z].*:' Makefile | cut -d: -f1 | grep -vF all
@@ -16,15 +19,18 @@ install: uninstall
1619
pip install -U pip
1720
pip install .
1821

19-
benchmark:
20-
python benchmarks/benchmarks.py
22+
lint:
23+
black .
2124

2225
test:
2326
python test/test_maze.py
2427
python test/test_generators.py
2528
python test/test_solvers.py
2629
python test/test_transmuters.py
2730

31+
benchmark:
32+
python benchmarks/benchmarks.py
33+
2834
wheel:
2935
pip install -U pip
3036
pip install -U wheel
@@ -36,6 +42,3 @@ wheel:
3642

3743
twine: wheel
3844
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
39-
40-
lint:
41-
black .

0 commit comments

Comments
 (0)