2020-03-14 00:37:22 +08:00
|
|
|
name: sw
|
2020-01-06 08:18:47 +08:00
|
|
|
|
2020-03-14 00:37:22 +08:00
|
|
|
on: [push, pull_request]
|
2020-01-06 08:18:47 +08:00
|
|
|
|
|
|
|
jobs:
|
2021-01-03 18:29:54 +08:00
|
|
|
build:
|
2020-01-06 08:18:47 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
2020-03-30 06:53:41 +08:00
|
|
|
fail-fast: false
|
2020-01-06 08:18:47 +08:00
|
|
|
matrix:
|
2020-09-10 07:05:29 +08:00
|
|
|
os: [windows-latest, ubuntu-20.04, macOS-latest]
|
2020-01-06 08:18:47 +08:00
|
|
|
|
|
|
|
steps:
|
2021-01-03 03:52:06 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-01-03 08:01:22 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-03-14 04:45:38 +08:00
|
|
|
- uses: egorpugin/sw-action@master
|
2020-01-06 08:18:47 +08:00
|
|
|
|
|
|
|
- name: build
|
2020-03-14 00:37:22 +08:00
|
|
|
if: matrix.os == 'windows-latest'
|
2020-01-06 19:08:29 +08:00
|
|
|
run: ./sw -static -shared -platform x86,x64 -config d,r build
|
2020-03-14 00:37:22 +08:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
if: matrix.os != 'windows-latest'
|
2020-12-29 01:38:16 +08:00
|
|
|
run: ./sw -static -shared -config d,r build -Dwith-tests=1
|
2021-01-03 03:52:06 +08:00
|
|
|
|
2021-01-03 03:54:27 +08:00
|
|
|
- name: download test data
|
2021-01-04 22:02:33 +08:00
|
|
|
if: matrix.os != 'windows-latest'
|
2021-01-03 03:54:27 +08:00
|
|
|
run: git clone https://github.com/egorpugin/tessdata tessdata_unittest
|
2021-01-03 18:29:54 +08:00
|
|
|
|
2021-01-03 03:52:06 +08:00
|
|
|
- name: test
|
2021-01-04 22:02:33 +08:00
|
|
|
if: matrix.os != 'windows-latest'
|
2021-01-03 21:58:35 +08:00
|
|
|
run: ./sw -static -shared -config "d,r" test -Dwith-tests=1 "-Dskip-tests=lstm,lstm_recode"
|
2021-01-04 08:43:11 +08:00
|
|
|
continue-on-error: true
|
2021-01-03 03:52:06 +08:00
|
|
|
|
2021-01-03 07:50:59 +08:00
|
|
|
- name: Upload Unit Test Results
|
2021-01-05 01:38:27 +08:00
|
|
|
if: always() && matrix.os != 'windows-latest'
|
2021-01-03 07:50:59 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
2021-01-03 03:52:06 +08:00
|
|
|
with:
|
2021-01-04 18:57:24 +08:00
|
|
|
name: Test Results (${{ matrix.os }})
|
2021-01-03 07:50:59 +08:00
|
|
|
path: .sw/test/results.xml
|
|
|
|
|
2021-01-03 19:51:38 +08:00
|
|
|
- name: Publish Test Report
|
2021-01-05 01:38:27 +08:00
|
|
|
if: always() && matrix.os != 'windows-latest'
|
2021-01-03 19:51:38 +08:00
|
|
|
uses: mikepenz/action-junit-report@v1
|
2021-01-03 19:36:46 +08:00
|
|
|
with:
|
2021-01-04 08:43:11 +08:00
|
|
|
check_name: test (${{ matrix.os }})
|
2021-01-03 19:51:38 +08:00
|
|
|
report_paths: .sw/test/results.xml
|
2021-01-03 19:36:46 +08:00
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|