Skip to content

Commit

Permalink
[ci] Add linux and macos sw builds to github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Jan 24, 2020
1 parent 60248f5 commit b0c2758
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions .github/workflows/sw.yml → .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: windows

on: [push]

Expand Down Expand Up @@ -33,4 +33,3 @@ jobs:

- name: build
run: ./sw -static -shared -platform x86,x64 -config d,r build

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)<br>
![Build status](https://github.com/tesseract-ocr/tesseract/workflows/windows/badge.svg)<br>
[![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)
Expand Down

0 comments on commit b0c2758

Please sign in to comment.