From ff9efb4e3e798aa94dd2d3a20b11ae256a6704e7 Mon Sep 17 00:00:00 2001 From: ouuan Date: Fri, 31 Jan 2020 11:41:36 +0800 Subject: [PATCH] test: Use Github Actions instead of travis.ci It's easy to use Github Actions to test on multiple OSs and multiple versions of Qt, so use it instead of travis.ci. SingleApplication submodule URL is also modified in this commit, please change it back after itay-grudev/SingleApplication#90 is merged. --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ .gitmodules | 2 +- .travis.yml | 19 ------------------- README.md | 2 +- third_party/singleapplication | 2 +- 5 files changed, 33 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..4a56e0fa1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: "CI: Build Test" + +on: [push, pull_request] + +jobs: + build: + + strategy: + matrix: + qt_version: [5.12.6, 5.13.2, 5.14.0] + platform: [ubuntu-latest, windows-latest, macos-latest] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + + - name: Install Qt + uses: jurplel/install-qt-action@v2.3.0 + with: + version: ${{ matrix.qt_version }} + + - name: get submodules + run: git submodule update --init --recursive + + - name: cmake + run: cmake . + + - name: cmake build + run: cmake --build . \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 0ff8e89f9..ef4b858a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = https://github.com/ouuan/QCodeEditor.git [submodule "third_party/singleapplication"] path = third_party/singleapplication - url = https://github.com/itay-grudev/SingleApplication.git + url = https://github.com/ouuan/SingleApplication.git diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9107d4291..000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: cpp -dist: bionic -compiler: g++ -sudo: required - -before_install: - - sudo add-apt-repository ppa:beineri/opt-qt-5.14.0-bionic -y - - sudo apt-get update -qq - -install: - - sudo apt-get -y install qt514base libgl1-mesa-dev qt514svg qt514imageformats - - source /opt/qt*/bin/qt*-env.sh - - git submodule update --init --recursive - -script: - - mkdir build - - cd build - - cmake .. -DCMAKE_BUILD_TYPE=Release - - make -j$(nproc) diff --git a/README.md b/README.md index b1635675e..b52edd558 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CP Editor -[![Build Status](https://travis-ci.org/ouuan/cp-editor.svg?branch=master)](https://travis-ci.org/ouuan/cp-editor) +[![CI: Build Test](https://github.com/ouuan/cp-editor/workflows/CI:%20Build%20Test/badge.svg)](https://github.com/ouuan/cp-editor/actions) [![Latest Stable](https://img.shields.io/github/v/release/coder3101/cp-editor?label=latest%20stable)](https://github.com/coder3101/cp-editor/releases/latest) [![Latest Release](https://img.shields.io/github/v/release/coder3101/cp-editor?include_prereleases&label=latest%20release&sort=semver)](https://github.com/coder3101/cp-editor/releases) diff --git a/third_party/singleapplication b/third_party/singleapplication index a3472dc13..c2c83c92a 160000 --- a/third_party/singleapplication +++ b/third_party/singleapplication @@ -1 +1 @@ -Subproject commit a3472dc1338ece7809431fa57fd3cfd2f37f8914 +Subproject commit c2c83c92af7216999738c263cc1ccb5ed0997d89