summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorBen Swift <ben@benswift.me>2020-06-12 07:11:29 +1000
committerBen Swift <ben@benswift.me>2020-06-12 07:14:49 +1000
commit85b94edfa4276c1f67ebb5ec29807cc41575bb7a (patch)
tree126068ec2eb8f2d89cbaae6a220fea33b23a750a /.github/workflows
parent87eff66b7d4af915a94c6d9d6500e51484714a58 (diff)
add CI: run tests suite with GitHub actions
currently this runs tests on the latest Ubuntu LTS and the latest macOS should be straightforward to run tests on any of the other [supported environments](https://github.com/actions/virtual-environments) or in a Docker container
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-and-test.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
new file mode 100644
index 0000000..3b3f6f2
--- /dev/null
+++ b/.github/workflows/build-and-test.yml
@@ -0,0 +1,39 @@
+name: Build & run tests
+
+on:
+ - push
+ - pull_request
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-latest
+ - macos-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - if: contains(matrix.os, 'ubuntu')
+ name: ubuntu-deps
+ run: |
+ sudo apt update
+ sudo apt-get install automake autoconf-archive autotools-dev libglib2.0-dev libxapian-dev libgmime-3.0-dev m4 make libtool pkg-config
+
+ - if: contains(matrix.os, 'macos')
+ name: macos-deps
+ run: |
+ brew install autoconf automake libgpg-error libtool pkg-config gettext glib gmime xapian
+
+ - name: configure
+ run: ./autogen.sh
+
+ - name: build
+ run: make
+
+ - name: test
+ run: make test