Add dailycmake workflow

This commit is contained in:
Shree Devi Kumar 2021-01-16 10:27:22 +00:00
parent 277cdfae73
commit 17ce3344b3
2 changed files with 91 additions and 3 deletions

87
.github/workflows/dailycmake.yml vendored Normal file
View File

@ -0,0 +1,87 @@
name: dailycmake
on:
schedule:
# every day at 2:15 AM UTC
- cron: 15 2 * * *
jobs:
gcc-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04 ]
gcc_version: [ 11, 10, 9, 8, 7, 6, 5 ]
steps:
- name: Install compiler
run: |
sudo apt-get install -y gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }}
- name: Install dependencies
run: sudo apt-get install libleptonica-dev libpango1.0-dev cabextract -y
- name: Checkout
uses: actions/checkout@v2
- name: Build and run
run: |
export CC=gcc-${{ matrix.gcc_version }}
export CXX=g++-${{ matrix.gcc_version }}
- name: Configure
run: |
mkdir build && cd build
cmake -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_BUILD_TYPE=Debug ..
- name: Build
run: cmake --build build --config Debug
clang-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
clang_version: [ 10, 9, 8, 7, 6 ]
steps:
- name: Install compiler
run: |
sudo apt-get install -y clang-${{ matrix.clang_version }}
- name: Checkout
uses: actions/checkout@v2
- name: Build and run
run: |
export CC=clang-${{ matrix.clang_version }}
export CXX=clang++-${{ matrix.clang_version }}
cmake -D BUILD_TESTS=ON ./
make
./test/etl_tests
steps:
- uses: actions/checkout@v2
- name: autoconf
run: ./autogen.sh
- name: configure
run: ./configure --enable-openmp --disable-shared --disable-debug --disable-opencl --disable-graphics --disable-legacy --with-tensorflow=no 'CXXFLAGS=-g -O2 -Wall -Wextra -Wpedantic -fsanitize=address,undefined -fstack-protector-strong -ftrapv'
- name: make
run: make training -j 8
- name: make check
run: make check -j 4
- name: display test report
run: git log -1 && cat unittest/test-suite.log
if: success() || failure()

View File

@ -11,7 +11,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest] os: [ ubuntu-20.04 ]
legacy: [ enable, disable ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -31,7 +32,7 @@ jobs:
run: ./autogen.sh run: ./autogen.sh
- name: configure - name: configure
run: ./configure --enable-openmp --disable-shared --disable-debug --disable-opencl --disable-graphics --disable-legacy --with-tensorflow=no 'CXXFLAGS=-g -O2 -Wall -Wextra -Wpedantic -fsanitize=address,undefined -fstack-protector-strong -ftrapv' run: ./configure --enable-openmp --disable-shared --disable-debug --disable-opencl --disable-graphics --${{ matrix.legacy }}-legacy --with-tensorflow=no 'CXXFLAGS=-g -O2 -Wall -Wextra -Wpedantic -fsanitize=address,undefined -fstack-protector-strong -ftrapv'
- name: make - name: make
run: make training -j 8 run: make training -j 8
@ -40,6 +41,6 @@ jobs:
run: make check -j 4 run: make check -j 4
- name: display test report - name: display test report
run: git log -1 && cat unittest/test-suite.log run: git log -1 && tesseract -v && cat unittest/test-suite.log
if: success() || failure() if: success() || failure()