about summary refs log tree commit diff stats
path: root/.github/workflows
diff options
context:
space:
mode:
authorWilliam Wennerström <william@wstrm.dev>2020-12-17 14:07:07 +0100
committerWilliam Wennerström <william@wstrm.dev>2020-12-17 15:09:25 +0100
commit81c02d1231812389974532de69cbbc4d23c28aa7 (patch)
tree585a38531f52b40bfd3af6d91c818770d6fda730 /.github/workflows
parent881b99c0622af6b45bcd2faf1b0a5c5d5edcba36 (diff)
downloadprofani-tty-81c02d1231812389974532de69cbbc4d23c28aa7.tar.gz
Switch from Travis CI to GitHub Actions
Travis have been slow and the macOS runner is outdated (and a bunch of
other recurring issues).
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..952866f7
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,36 @@
+name: CI
+
+on:
+  push:
+    branches: [master]
+  pull_request:
+    branches: [master]
+
+jobs:
+  linux:
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        flavor: [arch, debian, fedora, tumbleweed, ubuntu]
+
+    name: Linux
+    steps:
+      - uses: actions/checkout@v2
+      - name: Run tests
+        run: |
+          docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
+          docker run profanity ./ci-build.sh
+
+  macos:
+    runs-on: macos-latest
+    name: macOS
+    steps:
+      - uses: actions/checkout@v2
+      - name: Run brew bundle
+        run: brew bundle
+      - name: Run tests
+        env:
+          # Ensure that "keg-only" Homebrew versions are used.
+          PKG_CONFIG_PATH: "/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH"
+        run: ./ci-build.sh