Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Oct 24, 2024
1 parent 62cc11b commit fd20079
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 47 deletions.
73 changes: 37 additions & 36 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,49 @@ env:
jobs:
build:
name: Build ${{ matrix.binary }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- binary: libtesseract.so.aarch64
steps:
- uses: actions/checkout@v4.1.6
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-10-aarch64-linux-gnu g++-10-aarch64-linux-gnu pkg-config-aarch64-linux-gnu binutils-aarch64-linux-gnu autoconf ninja-build
- name: Build Leptonica
run: |
echo "Building leptonica..."
git clone --depth 1 https://github.com/DanBloomberg/leptonica.git
cd leptonica
./autogen.sh
./configure '--host=aarch64-linux' '--with-pic' '--disable-shared' '--without-libpng' '--without-zlib' '--without-jpeg' '--without-libtiff' '--without-giflib' '--without-libwebp' '--without-libwebpmux' '--without-libopenjpeg' '--disable-programs' 'CC=aarch64-linux-gnu-gcc-10' 'CXX=aarch64-linux-gnu-g++-10' 'CFLAGS=-D DEFAULT_SEVERITY=L_SEVERITY_ERROR -g0 -O3'
make
sudo make install
- uses: actions/checkout@v4.1.7

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu binutils-aarch64-linux-gnu autoconf ninja-build
- name: Build Leptonica
run: |
echo "Building leptonica..."
git clone --depth 1 https://github.com/DanBloomberg/leptonica.git
cd leptonica
./autogen.sh
./configure '--host=aarch64-linux' '--with-pic' '--disable-shared' '--without-libpng' '--without-zlib' '--without-jpeg' '--without-libtiff' '--without-giflib' '--without-libwebp' '--without-libwebpmux' '--without-libopenjpeg' '--disable-programs' 'CC=aarch64-linux-gnu-gcc-11' 'CXX=aarch64-linux-gnu-g++-11' 'CFLAGS=-D DEFAULT_SEVERITY=L_SEVERITY_ERROR -g0 -O3'
make
sudo make install
- name: Build Tesseract
run: |
echo "Building Tesseract..."
git clone --depth 1 --branch ${{ env.TESSERACT_VERSION }} https://github.com/tesseract-ocr/tesseract.git
cd tesseract
./autogen.sh
./configure '--host=aarch64-linux' '--with-pic' '--enable-visibility' '--disable-shared' '--disable-legacy' '--disable-graphics' '--disable-openmp' '--without-curl' '--without-archive' '--disable-doc' 'CC=aarch64-linux-gnu-gcc-10' 'CXX=aarch64-linux-gnu-g++-10' 'CXXFLAGS=-g0 -O3 -ffast-math'
make
sudo make install install
- name: Build Tesseract
run: |
echo "Building Tesseract..."
git clone --depth 1 --branch ${{ env.TESSERACT_VERSION }} https://github.com/tesseract-ocr/tesseract.git
cd tesseract
./autogen.sh
./configure '--host=aarch64-linux' '--with-pic' '--enable-visibility' '--disable-shared' '--disable-legacy' '--disable-graphics' '--disable-openmp' '--without-curl' '--without-archive' '--disable-doc' 'CC=aarch64-linux-gnu-gcc-11' 'CXX=aarch64-linux-gnu-g++-11' 'CXXFLAGS=-g0 -O3 -ffast-math'
make
sudo make install install
- name: Build Library
run: |
mkdir -p build
cmake -S . -B build -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/aarch64-linux-gnu-g++-10 -G Ninja
cmake --build build --config Release
mv build/libtesseract64.so build/libtesseract.so.aarch64
- name: Build Library
run: |
mkdir -p build
cmake -S . -B build -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc-11 -DCMAKE_CXX_COMPILER=/usr/bin/aarch64-linux-gnu-g++-11 -G Ninja
cmake --build build --config Release
mv build/libtesseract64.so build/libtesseract.so.aarch64
- uses: actions/upload-artifact@v4.3.3
with:
name: ${{ matrix.binary }}
path: build/${{ matrix.binary }}
retention-days: 5
- uses: actions/upload-artifact@v4.3.3
with:
name: ${{ matrix.binary }}
path: build/${{ matrix.binary }}
retention-days: 5
10 changes: 5 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ env:
jobs:
build:
name: Build ${{ matrix.binary }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- binary: libtesseract64.so
steps:
- uses: actions/checkout@v4.1.6
- uses: actions/checkout@v4.1.7
- name: Install Dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

test:
name: Test ${{ matrix.binary }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: build
strategy:
fail-fast: false
Expand All @@ -71,13 +71,13 @@ jobs:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/fpc-src_3.2.2-210709_amd64.deb
steps:
- uses: actions/checkout@v4.1.6
- uses: actions/checkout@v4.1.7
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.binary }}

- name: Install Lazarus
uses: ollydev/setup-lazarus@v3.2
uses: ollydev/setup-lazarus@v3.3
with:
laz-url: ${{ matrix.laz-url }}
fpc-url: ${{ matrix.fpc-url }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
include:
- binary: libtesseract.dylib.aarch64
steps:
- uses: actions/checkout@v4.1.6

- uses: actions/checkout@v4.1.7
- name: Install Dependencies
run: |
brew install autoconf automake ninja libtool
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
name: ${{ matrix.binary }}

- name: Install Lazarus
uses: ollydev/setup-lazarus@v3.2
uses: ollydev/setup-lazarus@v3.3
with:
laz-url: ${{ matrix.laz-url }}
fpc-url: ${{ matrix.fpc-url }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4.1.6
- uses: actions/checkout@v4.1.7

- uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -97,13 +97,13 @@ jobs:
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.2.4/lazarus-2.2.4-fpc-3.2.2-win32.exe

steps:
- uses: actions/checkout@v4.1.6
- uses: actions/checkout@v4.1.7
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.binary }}

- name: Install Lazarus
uses: ollydev/setup-lazarus@v3.2
uses: ollydev/setup-lazarus@v3.3
with:
laz-url: ${{ matrix.laz-url }}
fpc-url: ${{ matrix.fpc-url }}
Expand Down

0 comments on commit fd20079

Please sign in to comment.