aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2020-03-23 14:44:01 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2020-03-24 09:35:31 +0100
commit08ff66f93b46b02a9be7983e341451303f1cf00f (patch)
treeb591627a3ea22e4db8110bfcd69ea715612b6a7f
parentbb47e1b9cd2926bed3e63f528e063e462c28975a (diff)
downloadqxmpp-08ff66f93b46b02a9be7983e341451303f1cf00f.tar.gz
[tests] run Linux and OS X tests using GitHub Actions
-rw-r--r--.github/workflows/tests.yml29
-rw-r--r--.travis.yml27
-rwxr-xr-xtests/travis/build-and-test9
-rwxr-xr-xtests/travis/install-build-depends3
4 files changed, 30 insertions, 38 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 00000000..89a6d2bb
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,29 @@
+name: tests
+
+on: [push, pull_request]
+
+jobs:
+
+ test:
+ runs-on: ${{ matrix.os }}
+ env:
+ CONFIG: ${{ matrix.config }}
+ strategy:
+ matrix:
+ config: [minimal, full, full-debug]
+ os: [ubuntu-latest, macos-latest]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v2
+ - name: Install extra packages
+ run: tests/travis/install-build-depends
+ - name: Disable OS X firewall
+ if: matrix.os == 'macos-latest'
+ run: |
+ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
+ - name: Run tests
+ run: tests/travis/build-and-test
+ - uses: codecov/codecov-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 154c8684..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-sudo: required
-dist: bionic
-language: cpp
-cache: apt
-compiler:
- - gcc
- - clang
-env:
- - CONFIG=minimal
- - CONFIG=full
- - CONFIG=full-debug
-install:
- - tests/travis/install-build-depends
-matrix:
- exclude:
- - os: osx
- compiler: gcc
-os:
- - linux
- - osx
-script:
- - tests/travis/build-and-test
-after_success:
- - |
- if [ "$CONFIG" = "full-debug" ]; then
- bash <(curl -s https://codecov.io/bash)
- fi
diff --git a/tests/travis/build-and-test b/tests/travis/build-and-test
index dc5342b2..2d47e075 100755
--- a/tests/travis/build-and-test
+++ b/tests/travis/build-and-test
@@ -16,15 +16,6 @@ case "$CONFIG" in
;;
esac
-if [ $HOST_SYSTEM = "Darwin" ]; then
- # pick up cmake files from homebrew
- CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"
-else
- # This hides all the paths that contain custom travis binaries like the
- # updated version of cmake.
- export PATH=/usr/sbin:/usr/bin:/sbin:/bin
-fi
-
# build with code coverage
if [ "$CONFIG" = "full-debug" ]; then
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
diff --git a/tests/travis/install-build-depends b/tests/travis/install-build-depends
index b4b48cf2..3e543d91 100755
--- a/tests/travis/install-build-depends
+++ b/tests/travis/install-build-depends
@@ -4,7 +4,6 @@ set -e
if [ "$(uname -s)" = "Darwin" ]; then
brew update
brew unlink python@2
- brew install qt
case "$CONFIG" in
full*)
@@ -13,7 +12,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
esac
else
sudo apt-get update -qq
- sudo apt-get install -qq clang cmake qtbase5-dev
+ sudo apt-get install -qq clang cmake
case "$CONFIG" in
full*)