Skip to content

Commit

Permalink
Add GitHub action for continuous integration
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 13, 2023
1 parent 658b3a3 commit 994204a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Continuous integration for ocrd_kraken

name: CI

on:
push:

jobs:
ci_test:
name: CI build and test
# kraken code aborts on GitHub runner ubuntu-latest:
#
# terminate called after throwing an instance of 'std::runtime_error'
# what(): random_device could not be read
#
# Related issue: https://github.com/actions/runner-images/issues/672.
# runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
if test $(uname -s) = 'Linux'; then
sudo make deps-ubuntu
fi
- name: Build
run: |
python3 --version
python3 -m venv venv
source venv/bin/activate
make deps deps-test
make install
pip check
ocrd resmgr download ocrd-kraken-segment blla.mlmodel
ocrd resmgr download ocrd-kraken-recognize en_best.mlmodel
- name: Test
run: |
source venv/bin/activate
make test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

> OCR-D wrapper for the Kraken OCR engine
[![CI](https://github.com/OCR-D/ocrd_kraken/actions/workflows/ci.yml/badge.svg)](https://github.com/OCR-D/ocrd_kraken/actions/workflows/ci.yml)
[![Docker Automated build](https://img.shields.io/docker/automated/ocrd/kraken.svg)](https://hub.docker.com/r/ocrd/kraken/tags/)
[![image](https://circleci.com/gh/OCR-D/ocrd_kraken.svg?style=svg)](https://circleci.com/gh/OCR-D/ocrd_kraken)

Expand Down

0 comments on commit 994204a

Please sign in to comment.