Skip to content

Commit

Permalink
reenable circle because docker failed to build on ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jan 30, 2024
1 parent ccf6d6b commit b94b185
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
version: 2

orbs:
python: circleci/[email protected]

jobs:

test-macos:
macos:
xcode: "12.5.1"
# resource_class: macos.x86.medium.gen2
working_directory: ~/ocrd-core
environment:
PIP: pip3
PYTHON: python3
PIP_INSTALL: pip3 install --user
steps:
- checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install imagemagick geos bash opencv
- run: $PIP_INSTALL -U pip setuptools
- run: make install
- run: export PATH="/Users/distiller/Library/Python/3.9/bin:$PATH"; make deps-test test benchmark

test-python37:
docker:
- image: cimg/python:3.7
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python38:
docker:
- image: cimg/python:3.8
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python39:
docker:
- image: cimg/python:3.9
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python310:
docker:
- image: cimg/python:3.10
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python311:
docker:
- image: cimg/python:3.11
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

deploy:
docker:
- image: circleci/buildpack-deps:stretch
steps:
- checkout
- setup_remote_docker: # https://circleci.com/docs/2.0/building-docker-images/
docker_layer_caching: true
- run: make docker
- run: make docker-cuda
- run:
name: Login to Docker Hub
command: echo "$DOCKERHUB_PASS" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- run: docker push ocrd/core:latest
- run: docker push ocrd/core-cuda:latest
- run: docker tag ocrd/core ocrd/core:$(git describe --tags --abbrev=0)
- run: docker tag ocrd/core-cuda ocrd/core-cuda:$(git describe --tags --abbrev=0)
- run: docker push ocrd/core:$(git describe --tags --abbrev=0)
- run: docker push ocrd/core-cuda:$(git describe --tags --abbrev=0)

workflows:
version: 2
build-master:
jobs:
- deploy:
filters:
branches:
only: master
tags:
only: /^v\d\.\d\d\.\d$/
test-pull-request:
jobs:
- test-python37
- test-python38
- test-python39
- test-python310
- test-python311
# - test-macos

0 comments on commit b94b185

Please sign in to comment.