Skip to content

Commit 1a1c0b4

Browse files
Updates to CI/CD
1 parent 276dcfe commit 1a1c0b4

6 files changed

Lines changed: 31 additions & 21 deletions

File tree

.github/workflows/docker-publish.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ jobs:
4747
username: ${{ vars.BATBOT_DOCKERHUB_USERNAME }}
4848
password: ${{ secrets.BATBOT_DOCKERHUB_TOKEN }}
4949

50+
- name: Login to GitHub Container Registry
51+
uses: docker/login-action@v3
52+
with:
53+
registry: ghcr.io
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
5057
# Push tagged image (version tag + latest) to registries
5158
- name: Tagged Docker Hub
5259
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
@@ -71,6 +78,7 @@ jobs:
7178
run: |
7279
docker buildx build \
7380
-t kitware/batbot:${{ env.IMAGE_TAG }} \
81+
-t ghcr.io/Kitware/batbot:${{ env.IMAGE_TAG }} \
7482
--platform linux/amd64 \
7583
--push \
7684
.
@@ -81,6 +89,7 @@ jobs:
8189
run: |
8290
docker buildx build \
8391
-t kitware/batbot:latest \
92+
-t ghcr.io/Kitware/batbot:latest \
8493
--platform linux/amd64 \
8594
--push \
8695
.

.github/workflows/python-publish.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
python-version: [3.8]
17+
python-version: [3.12]
1818

1919
steps:
2020
- name: Checkout code
@@ -35,6 +35,7 @@ jobs:
3535
3636
- uses: actions/upload-artifact@v6
3737
with:
38+
name: artifact-wheel-${{ matrix.os }}-${{ matrix.python-version }}
3839
path: ./dist/*.whl
3940

4041
build_sdist:
@@ -59,6 +60,7 @@ jobs:
5960
6061
- uses: actions/upload-artifact@v6
6162
with:
63+
name: artifact-sdist
6264
path: ./dist/*.tar.gz
6365

6466
test_wheel:
@@ -75,7 +77,6 @@ jobs:
7577

7678
- uses: actions/download-artifact@v7
7779
with:
78-
name: artifact
7980
path: dist
8081

8182
- name: Install wheel

.github/workflows/testing.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ jobs:
3636
pip install -r requirements/runtime.txt
3737
pip install -r requirements/optional.txt
3838
39-
- name: Lint with flake8
39+
- name: Check with pre-commit
4040
run: |
41-
# stop the build if there are Python syntax errors or undefined names
42-
flake8 . --count --show-source --statistics
43-
# exit-zero treats all errors as warnings.
44-
flake8 . --count --exit-zero --max-complexity=10 --statistics
41+
pre-commit
42+
pre-commit run --all-files
4543
4644
- name: Run tests
4745
run: |

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ RUN python3 -m venv /venv
3030

3131
# hadolint ignore=DL3003,DL3013
3232
RUN /venv/bin/pip install --no-cache-dir -r requirements/runtime.txt \
33-
&& /venv/bin/pip install --no-cache-dir -r requirements/optional.txt \
3433
&& cd tpl/pyastar2d/ \
3534
&& /venv/bin/pip install --no-cache-dir -e . \
3635
&& cd ../.. \
37-
&& /venv/bin/pip install --no-cache-dir -e . \
38-
&& if [ "$(uname -m)" != "aarch64" ] \
39-
; then \
40-
/venv/bin/pip uninstall -y onnxruntime \
41-
/venv/bin/pip install --no-cache-dir onnxruntime-gpu \
42-
; fi
36+
&& /venv/bin/pip install --no-cache-dir -e .
37+
38+
# && /venv/bin/pip install --no-cache-dir -r requirements/optional.txt \
39+
# && if [ "$(uname -m)" != "aarch64" ] \
40+
# ; then \
41+
# /venv/bin/pip uninstall -y onnxruntime \
42+
# /venv/bin/pip install --no-cache-dir onnxruntime-gpu \
43+
# ; fi
4344

4445
CMD [".", "/venv/bin/activate", "&&", "exec", "python", "app.py"]

requirements/optional.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ black
22
codecov
33
coverage
44
flake8
5+
gradio
56
imageio
67
ipython
8+
isort
79
line_profiler
810
onnx
11+
onnxruntime
912
pre-commit
1013
pytest
1114
pytest-benchmark[histogram]
@@ -15,7 +18,12 @@ pytest-profiling
1518
pytest-random-order
1619
pytest-sugar
1720
pytest-xdist
21+
pyupgrade
1822
pyyaml
23+
rstcheck
24+
rstcheck[sphinx]
1925
Sphinx>=5,<6
2026
sphinx_rtd_theme
27+
torch
28+
torchvision
2129
xdoctest

requirements/runtime.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
click
2-
codecov
3-
coverage
42
cryptography
53
cython
6-
gradio
7-
imgaug
84
librosa
95
matplotlib
106
numpy
11-
onnxruntime
127
opencv-python-headless
138
Pillow
149
pooch
1510
rich
1611
sphinx-click
17-
torch
18-
torchvision
1912
tqdm

0 commit comments

Comments
 (0)