From 14031392ac63b59140a5e21abd5eeb5523b41433 Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Tue, 20 Aug 2024 20:59:47 +0200 Subject: [PATCH] Use GitHub actions instead of Travis --- .github/workflows/ci.yaml | 43 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 38 ---------------------------------- 2 files changed, 43 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7451b9b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,43 @@ +# https://docs.github.com/actions/reference/workflow-syntax-for-github-actions +# https://doc.qt.io/qt-6/supported-platforms.html +# https://ddalcino.github.io/aqt-list-server/ + +name: CI + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + qt: + - 5.9.9 + steps: + - uses: actions/checkout@v4 + - uses: jurplel/install-qt-action@v4 + with: + version: ${{ matrix.qt }} + archives: qtbase icu + tools: tools_cmake + arch: gcc_64 + host: linux + - run: | + qmake --version + cmake --version + gcc --version + g++ --version + - run: | + cmake -G "Unix Makefiles" + cmake --build . -- -j12 + cmake --build . --target test + - run: | + sudo apt-get install lcov > /dev/null + lcov --version + lcov --capture --directory . -o coverage.info + lcov -e coverage.info '**/src/**/*' -o coverage.info + - uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: coverage.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6b92a4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -sudo: required -dist: xenial -language: cpp -compiler: gcc - -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo add-apt-repository -y ppa:beineri/opt-qt563-xenial - - sudo apt-get update -qq - -install: - - sudo apt-get install -qq gcc-4.9 g++-4.9 - - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90 - - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90 - - sudo apt-get install -qq qt56base - - source /opt/qt56/bin/qt56-env.sh - - wget http://archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.13.orig.tar.gz - - tar xf lcov_1.13.orig.tar.gz - - cd lcov-1.13/ - - sudo make install - - cd .. - -before_script: - - cmake --version - - qmake --version - - gcc --version && g++ --version - - lcov --version && gcov --version - -script: - - cmake -G "Unix Makefiles" - - cmake --build . -- -j12 - - cmake --build . --target test - - lcov -capture --directory . --o coverage.info - - lcov -e coverage.info '**/src/**/*' -o coverage.info - -after_success: - - bash <(curl -s https://codecov.io/bash) -f coverage.info