Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub action for build and test on macOS #716

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/autotools-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: autotools-macos

# autotools build and unit tests of Leptonica on macOS Homebrew.

on:
pull_request:
branches: [ master ]
paths:
- '**.c'
- '**.h'
- 'm4/*.m4'
- 'Makefile.am'
- 'autogen.sh'
- 'configure.ac'

push:

# Trigger workflow in GitHub web frontend or from API.
workflow_dispatch:

jobs:

brew:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { os: macos-12, cc: clang }
- { os: macos-13, cc: clang }

steps:
- uses: actions/checkout@v3

- name: Display compiler version and latest Git history
run: |
${{ matrix.config.cc }} --version
git log -3 --pretty=format:'%h %ad %s | %an'

- name: Install dependencies
run: |
brew install autoconf automake gnuplot

- name: Setup Leptonica
run: |
./autogen.sh

- name: Configure Leptonica
run: |
./configure 'CC=${{ matrix.config.cc }}'

- name: Make and install Leptonica
run: |
make
sudo make install

- name: Make and run unit tests
run: |
make check
Loading