tesseract/.github/workflows/sw.yml
2021-01-04 01:13:05 +03:00

58 lines
1.4 KiB
YAML

name: sw
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-20.04, macOS-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: egorpugin/sw-action@master
- name: build
if: matrix.os == 'windows-latest'
run: ./sw -static -shared -platform x86,x64 -config d,r build
- name: build
if: matrix.os != 'windows-latest'
run: ./sw -static -shared -config d,r build -Dwith-tests=1
test:
runs-on: ${{ matrix.os }}
needs: build
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-20.04, macOS-latest]
steps:
- uses: egorpugin/sw-action@master
- name: download test data
run: git clone https://github.com/egorpugin/tessdata tessdata_unittest
- name: test
run: ./sw -static -shared -config "d,r" test -Dwith-tests=1 "-Dskip-tests=lstm,lstm_recode"
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test Results
path: .sw/test/results.xml
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v1
with:
check_name: test results (${{ matrix.os }})
report_paths: .sw/test/results.xml
github_token: ${{ secrets.GITHUB_TOKEN }}