diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000000..8f55e3cb0d --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,45 @@ +name: linux + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Download SW + shell: cmake -P {0} + run: | + if (WIN32) + file(DOWNLOAD "https://software-network.org/client/sw-master-windows-client.zip" ./sw.zip) + elseif (APPLE) + file(DOWNLOAD "https://software-network.org/client/sw-master-macos-client.tar.gz" ./sw.zip) + else() + file(DOWNLOAD "https://software-network.org/client/sw-master-linux-client.tar.gz" ./sw.zip) + endif() + + - name: Unpack SW + run: | + cmake -E tar xvf sw.zip + chmod 755 sw + + - name: gcc + run: | + sudo add-apt-repository ppa:jonathonf/gcc-9.0 + sudo apt-get update + sudo apt-get install g++-9 + + - name: llvm + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' -y + sudo apt-get update -q + sudo apt-get install -y clang-9 lld-9 libc++-9-dev libc++abi-9-dev clang-tools-9 + + - name: build + run: ./sw -static -shared -config d,r build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..d23c63eea1 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,34 @@ +name: macos + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macOS-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Download SW + shell: cmake -P {0} + run: | + if (WIN32) + file(DOWNLOAD "https://software-network.org/client/sw-master-windows-client.zip" ./sw.zip) + elseif (APPLE) + file(DOWNLOAD "https://software-network.org/client/sw-master-macos-client.tar.gz" ./sw.zip) + else() + file(DOWNLOAD "https://software-network.org/client/sw-master-linux-client.tar.gz" ./sw.zip) + endif() + + - name: Unpack SW + run: cmake -E tar xvf sw.zip + + - name: chmod + run: chmod 755 sw + shell: sh + + - name: build + run: ./sw -static -shared -config d,r build diff --git a/.github/workflows/sw.yml b/.github/workflows/windows.yml similarity index 98% rename from .github/workflows/sw.yml rename to .github/workflows/windows.yml index 081e0c9254..423db742f0 100644 --- a/.github/workflows/sw.yml +++ b/.github/workflows/windows.yml @@ -1,4 +1,4 @@ -name: CI +name: windows on: [push] @@ -33,4 +33,3 @@ jobs: - name: build run: ./sw -static -shared -platform x86,x64 -config d,r build - diff --git a/README.md b/README.md index 739adb4c60..0e5c1c1962 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/tesseract-ocr/tesseract.svg?branch=master)](https://travis-ci.org/tesseract-ocr/tesseract) [![Build status](https://ci.appveyor.com/api/projects/status/miah0ikfsf0j3819/branch/master?svg=true)](https://ci.appveyor.com/project/zdenop/tesseract/) -![Build status](https://github.com/tesseract-ocr/tesseract/workflows/CI/badge.svg)
+![Build status](https://github.com/tesseract-ocr/tesseract/workflows/windows/badge.svg)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/tesseract-ocr/badge.svg)](https://scan.coverity.com/projects/tesseract-ocr) [![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/tesseract-ocr/tesseract.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tesseract-ocr/tesseract/context:cpp) [![Total Alerts](https://img.shields.io/lgtm/alerts/g/tesseract-ocr/tesseract.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tesseract-ocr/tesseract/alerts)