Skip to content

Commit

Permalink
Merge branch 'buggy_libparam_refactor_misc' into page-output-with-int…
Browse files Browse the repository at this point in the history
…-coordinates
  • Loading branch information
GerHobbelt committed Jan 11, 2025
2 parents 238b46c + b188f65 commit 5aefdab
Show file tree
Hide file tree
Showing 186 changed files with 4,864 additions and 6,293 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/autotools-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
fail-fast: false
matrix:
config:
- { name: macos-12-clang-14-autotools, os: macos-12, cxx: clang++ }
#- { name: macos-12-gcc-11-autotools, os: macos-12, cxx: g++-11 }
- { name: macos-latest-clang-autotools, os: macos-latest, cxx: clang++ }

steps:
- uses: actions/checkout@v4
Expand All @@ -30,15 +29,11 @@ jobs:
- name: Install dependencies
run: |
brew install autoconf automake
brew install leptonica
brew install cairo pango icu4c
brew install cabextract
brew install libarchive curl
brew install autoconf automake cabextract libtool
brew install curl icu4c leptonica libarchive pango
- name: Setup Tesseract
run: |
mkdir -p m4
./autogen.sh
- name: Configure Tesseract
Expand Down Expand Up @@ -115,7 +110,7 @@ jobs:
fail-fast: false
matrix:
config:
- { name: macos-12-clang-14-autotools, os: macos-12, cxx: clang++ }
- { name: macos-latest-clang-autotools, os: macos-latest, cxx: clang++ }

steps:
- uses: actions/checkout@v4
Expand All @@ -130,7 +125,7 @@ jobs:
- name: Install Macports
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
curl -sSLO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
# --remove-brew does not remove the Homebrew entries in bin,
# so remove them now.
rm -v $(brew --prefix)/bin/*
Expand All @@ -145,7 +140,6 @@ jobs:
- name: Setup Tesseract
run: |
mkdir -p m4
./autogen.sh
- name: Configure Tesseract
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/autotools-openmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
config:
- { name: 20.04-openmp, os: ubuntu-20.04 }
- { name: 24.04-openmp, os: ubuntu-24.04 }
- { name: 22.04-openmp, os: ubuntu-22.04 }

steps:
Expand All @@ -37,7 +37,6 @@ jobs:
- name: Setup Tesseract
run: |
mkdir -p m4
./autogen.sh
- name: Configure Tesseract
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
fail-fast: false
matrix:
config:
# - { name: ubuntu-22.04-clang-15-autotools, os: ubuntu-22.04, cxx: clang++-15 } #installed
- { name: ubuntu-22.04-clang-15-autotools, os: ubuntu-22.04, cxx: clang++-15 } #installed

- { name: ubuntu-24.04-gcc-14-autotools, os: ubuntu-24.04, cxx: g++-14 } #installed
- { name: ubuntu-24.04-gcc-13-autotools, os: ubuntu-24.04, cxx: g++-13 } #installed

# - { name: ubuntu-24.04-gcc-13-autotools, os: ubuntu-24.04, cxx: g++-13 } #installed
# - { name: ubuntu-22.04-gcc-12-autotools, os: ubuntu-22.04, cxx: g++-12 } #installed
# - { name: ubuntu-22.04-gcc-11-autotools, os: ubuntu-22.04, cxx: g++-11 } #installed
# - { name: ubuntu-20.04-gcc-10-autotools, os: ubuntu-20.04, cxx: g++-10 } #installed
Expand Down Expand Up @@ -47,7 +48,6 @@ jobs:
- name: Setup Tesseract
run: |
mkdir -p m4
./autogen.sh
- name: Configure Tesseract
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cmake-win64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ name: cmake-win64
on:
#push:
schedule:
- cron: 0 23 * * *
- cron: 0 5 * * *
workflow_dispatch:

env:
ILOC: d:/a/local
png_ver: 1643
png_ver: 1644

jobs:
build:
Expand Down Expand Up @@ -37,9 +37,9 @@ jobs:
run: |
mkdir ${{env.ILOC}}
- name: Uninstall Perl
run: |
choco uninstall strawberryperl
#- name: Uninstall Perl
# run: |
# choco uninstall strawberryperl

- name: Build and Install zlib-ng
shell: cmd
Expand Down Expand Up @@ -117,8 +117,8 @@ jobs:
- name: Display Tesseract Version and Test Command Line Usage
shell: cmd
run: |
curl -L https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata --output ${{env.ILOC}}/share/tessdata/eng.traineddata
curl -L https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata --output ${{env.ILOC}}/share/tessdata/osd.traineddata
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata --output ${{env.ILOC}}/share/tessdata/eng.traineddata
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata --output ${{env.ILOC}}/share/tessdata/osd.traineddata
echo "Setting TESSDATA_PREFIX..."
set TESSDATA_PREFIX=${{env.ILOC}}/share/tessdata
echo "Setting PATH..."
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ jobs:
fail-fast: false
matrix:
config:

- { name: macos-12-clang-14-cmake, os: macos-12, cxx: clang++ } # default
- { name: macos-11-clang-13-cmake, os: macos-11, cxx: clang++ } # default

- { name: macos-11-gcc-12-cmake, os: macos-11, cxx: g++-12 } #installed
- { name: macos-14-clang-15-cmake, os: macos-14, cxx: clang++ } # default
- { name: macos-14-gcc-14-cmake, os: macos-14, cxx: g++-14 } #installed
- { name: macos-15-clang-cmake, os: macos-15, cxx: clang++ } # default

- { name: ubuntu-22.04-clang-15-cmake, os: ubuntu-22.04, cxx: clang++-15 } #installed

- { name: ubuntu-24.04-gcc-12-cmake, os: ubuntu-24.04, cxx: g++-14 } #installed
- { name: ubuntu-22.04-gcc-12-cmake, os: ubuntu-22.04, cxx: g++-12 } #installed
- { name: ubuntu-22.04-gcc-11-cmake, os: ubuntu-22.04, cxx: g++-11 } #installed
- { name: ubuntu-20.04-gcc-10-cmake, os: ubuntu-20.04, cxx: g++-10 } #installed
- { name: ubuntu-20.04-gcc-9-cmake, os: ubuntu-20.04, cxx: g++-9 } #installed

steps:
- name: Install compilers on Linux
Expand Down Expand Up @@ -55,6 +51,8 @@ jobs:
brew install ninja
ninja --version
cmake --version
clang++ --version
g++ --version
if: runner.os == 'macOS'

- name: Checkout Source
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/installer-for-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build Tesseract installer (64 bit)
run: .github/workflows/build.sh x86_64
run: nsis/build.sh x86_64
- uses: actions/upload-artifact@v4
with:
name: Tesseract Installer for Windows (64 bit)
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/msys2-4.1.1.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- name: Setup Tesseract
run: |
mkdir -p m4
./autogen.sh
- name: Configure Tesseract
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/pkg-config-crosswrapper

This file was deleted.

18 changes: 2 additions & 16 deletions .github/workflows/sw.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
name: sw

on:
push:
paths:
- '**.cpp'
- '**.h'
- '**/sw.yml'
- 'unittest/**.c'
- 'unittest/**.cc'
pull_request:
paths:
- '**.cpp'
- '**.h'
- '**/sw.yml'
- 'unittest/**.c'
- 'unittest/**.cc'
schedule:
# every day
- cron: 0 0 * * *
# every 3rd day
- cron: 0 0 */3 * *

jobs:
build:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/unittest-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: unittest_cmake
# autotools build on ubuntu. unittests with address sanitizers. with openmp.
# ubuntu-20.04-gcc-unittest - CI runs out of diskspace.
on:
#push:
pull_request:
paths:
- '**.cpp'
- '**.h'
- '**Makefile.am'
- '/configure.ac'
- 'unittest/**.c'
- 'unittest/**.cc'
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
sanitizers:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: ubuntu-24.04-gcc-unittest, os: ubuntu-24.04, cxx: g++, cxxflags: '-g -O2 -fsanitize=address,undefined' }
- { name: ubuntu-22.04-clang-unittest, os: ubuntu-22.04, cxx: clang++, cxxflags: '-g -O2 -fsanitize=address,undefined -stdlib=libc++' }
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Remove Homebrew, Android and .NET to provide more disk space
run: |
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
sudo rm -rf /home/linuxbrew # will release Homebrew
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
- name: Install dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
sudo apt-get install cabextract -y
- name: Setup
run: |
./autogen.sh
- name: Configure (Linux)
run: |
cmake -S . -B build -DSW_BUILD=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TRAINING_TOOLS=ON -DBUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=${{ matrix.config.cxxflags }}'
- name: Make and Install Tesseract
run: |
${{ matrix.config.cxx }} --version
cmake --build build --config Release -j
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Make and run Unit Tests
run: |
cd build
ctest -C Release --output-on-failure -O test-suite.log -j 4
- name: Display Unit Tests Report and Compiler Version
run: |
cat test-suite.log
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
5 changes: 2 additions & 3 deletions .github/workflows/unittest-disablelegacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [ g++, clang++-15 ]
os: [ ubuntu-22.04 ]
compiler: [ g++, clang++-18 ]
os: [ ubuntu-24.04 ]

steps:
- uses: actions/checkout@v4
Expand All @@ -32,7 +32,6 @@ jobs:
- name: Setup
run: |
mkdir -p m4
./autogen.sh
- name: Configure
Expand Down
Loading

0 comments on commit 5aefdab

Please sign in to comment.