diff --git a/.github/workflows/qt.yml b/.github/workflows/qt.yml new file mode 100644 index 0000000..25998da --- /dev/null +++ b/.github/workflows/qt.yml @@ -0,0 +1,152 @@ +name: CI build + +on: [push] + +jobs: + build: + strategy: + fail-fast: false + matrix: + version: + - 5.15.0 + platform: + - gcc_64 + - android + - msvc2019 + - msvc2019_64 + - winrt_x64_msvc2019 + - winrt_x86_msvc2019 + - winrt_armv7_msvc2019 + - mingw81_64 + - mingw81_32 + - clang_64 + - ios + + include: + - platform: gcc_64 + os: ubuntu-latest + - platform: android + os: ubuntu-latest + - platform: msvc2019_64 + os: windows-latest + - platform: msvc2019 + os: windows-latest + - platform: winrt_x64_msvc2019 + os: windows-latest + - platform: winrt_x86_msvc2019 + os: windows-latest + - platform: winrt_armv7_msvc2019 + os: windows-latest + - platform: mingw81_64 + os: windows-latest + - platform: mingw81_32 + os: windows-latest + - platform: clang_64 + os: macos-latest + - platform: ios + os: macos-latest + + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: actions/setup-python@v1 + - uses: Skycoder42/action-setup-qt@master + id: qt + with: + version: ${{matrix.version}} + platform: ${{matrix.platform}} + packages: qt.tools.ifw.32 + - name: install packagekit + if: matrix.platform == 'gcc_64' + run: | + sudo apt-get -qq install packagekit + export PKG_CONFIG_PATH=${{steps.qt.outputs.qtdir}}/lib/pkgconfig/:$PKG_CONFIG_PATH + echo "::set-env name=PKG_CONFIG_PATH::$PKG_CONFIG_PATH" + - name: build PackageKit-Qt + if: steps.cache-qt.outputs.cache-hit != 'true' && matrix.platform == 'gcc_64' + run: | + sed -i 's/set(BUILD_SHARED_LIBS ON)/set(BUILD_SHARED_LIBS OFF)/g' CMakeLists.txt + export CMAKE_PREFIX_PATH=${{steps.qt.outputs.qtdir}}:$CMAKE_PREFIX_PATH + mkdir build && cd build + cmake \ + "-DCMAKE_INSTALL_PREFIX=$(qmake -query QT_INSTALL_PREFIX)" \ + "-DCMAKE_INSTALL_LIBDIR=$(qmake -query QT_INSTALL_LIBS)" \ + "-DCMAKE_INSTALL_INCLUDEDIR=$(qmake -query QT_INSTALL_HEADERS)" \ + ".." + ${{steps.qt.outputs.make}} + ${{steps.qt.outputs.make}} install + pkg-config --exists packagekitqt5 + working-directory: src/3rdparty/PackageKit-Qt + - name: qmake + run: | + qmake CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}} "QT_TOOL_PATH=${{steps.qt.outputs.qtdir}}/Tools" + ${{steps.qt.outputs.make}} qmake_all + - name: make module + run: | + ${{steps.qt.outputs.make}} + ${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install + - name: make tests + if: steps.qt.outputs.tests == 'true' && !contains(matrix.platform, 'mingw') + run: | + ${{steps.qt.outputs.make}} all + ${{steps.qt.outputs.make}} ${{steps.qt.outputs.testflags}} run-tests + - name: make examples + if: matrix.platform == 'gcc_64' + run: | + ${{steps.qt.outputs.make}} sub-examples + cd examples && ${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install + - name: make doc + if: matrix.platform == 'gcc_64' + run: | + ${{steps.qt.outputs.make}} doxygen + cd doc && ${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install + - name: upload examples to releases + uses: Skycoder42/action-upload-release@master + if: matrix.platform == 'gcc_64' && startsWith(github.ref, 'refs/tags/') + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + directory: ${{steps.qt.outputs.outdir}} + platform: examples + asset_name: qtautoupdater-examples-${{matrix.version}} + tag: ${{github.ref}} + overwrite: true + - name: upload doc to releases + uses: Skycoder42/action-upload-release@master + if: matrix.platform == 'gcc_64' && startsWith(github.ref, 'refs/tags/') + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + directory: ${{steps.qt.outputs.outdir}} + platform: doc + asset_name: qtautoupdater-doc-${{matrix.version}} + tag: ${{github.ref}} + overwrite: true + - name: upload module to releases + uses: Skycoder42/action-upload-release@master + if: startsWith(github.ref, 'refs/tags/') + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + directory: ${{steps.qt.outputs.outdir}} + platform: ${{matrix.platform}} + asset_name: qtautoupdater-${{matrix.platform}}-${{matrix.version}} + tag: ${{github.ref}} + overwrite: true + + deploy: + if: startsWith(github.ref, 'refs/tags/') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + path: source + - uses: actions/setup-python@v1 + - uses: Skycoder42/action-deploy-qt@master + with: + token: ${{secrets.GITHUB_TOKEN}} + version: 5.15.0 + host: ${{secrets.SSHFS_HOST}} + key: ${{secrets.SSHFS_KEY}} + port: ${{secrets.SSHFS_PORT}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33819c8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,79 +0,0 @@ -#Based on https://github.com/pcolby/libqtaws/blob/master/.travis.yml -language: cpp - -branches: - only: - - master - -os: - - linux - - osx - -dist: trusty - -compiler: - - clang - - gcc - -env: - matrix: - - QT=59 BREW=ex PPA=beineri/opt-qt591-trusty - - QT=59 BREW=ex PPA=beineri/opt-qt592-trusty - - QT=59 BREW=ex PPA=beineri/opt-qt593-trusty - - QT=59 BREW=ex PPA=beineri/opt-qt594-trusty - - QT=59 BREW=ex PPA=beineri/opt-qt595-trusty - - QT=59 BREW=ex PPA=beineri/opt-qt596-trusty - - QT=510 BREW=ex PPA=beineri/opt-qt-5.10.1-trusty - -matrix: - exclude: - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt591-trusty } - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt592-trusty } - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt593-trusty } - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt594-trusty } - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt595-trusty } - - { os: osx, env: QT=59 BREW=ex PPA=beineri/opt-qt596-trusty } - - { os: osx, env: QT=510 BREW=ex PPA=beineri/opt-qt-5.10.1-trusty } - -addons: - coverity_scan: - project: - name: "HamedMasafi/Nut" - description: "Build submitted via Travis CI" - # notification_email: em@h - build_command_prepend: > - cp -a "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR-scan" && - pushd "$TRAVIS_BUILD_DIR-scan" && - qmake -qt=qt5 -Wall -Wlogic -Wparser CONFIG+=debug_and_release - build_command: make all - #branch_pattern: coverity - -before_install: - - '[[ "$TRAVIS_OS_NAME" != linux || -z "$PPA" ]] || sudo add-apt-repository -y ppa:$PPA' - - '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-get -qy update' - - '[ "$TRAVIS_OS_NAME" != osx ] || brew update' - -install: - - '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-get -qy install cppcheck doxygen graphviz lcov' - - '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" != */opt-* ]] || sudo apt-get -qy install qt${QT}base qt${QT}xmlpatterns' - - '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" == */opt-* ]] || sudo apt-get -qy install qt5-qmake qtbase5-dev libqt5xmlpatterns5-dev' - - '[ "$TRAVIS_OS_NAME" != linux ] || gem install lcoveralls' - - '[ "$TRAVIS_OS_NAME" != osx ] || brew install cppcheck doxygen graphviz qt$BREW' - - '[ "$TRAVIS_OS_NAME" != osx ] || brew link --force qt$BREW' - - qmake -v - -before_script: - - '[[ "$TRAVIS_OS_NAME" != linux || "$CXX" != clang++ ]] || export QMAKESPEC=linux-clang' - - '[[ "$TRAVIS_OS_NAME" != linux || "$CXX" != g++ ]] || export QMAKESPEC=linux-g++' - - '[[ "$TRAVIS_OS_NAME" != osx || "$CXX" != clang++ ]] || export QMAKESPEC=macx-clang' - - '[[ "$TRAVIS_OS_NAME" != osx || "$CXX" != g++ ]] || export QMAKESPEC=macx-g++' - - '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" != */opt-* ]] || . /opt/qt$QT/bin/qt$QT-env.sh' - - '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" == */opt-* ]] || export QT_SELECT=qt5' - - mkdir -p "$TRAVIS_BUILD_DIR-build" - - cd "$TRAVIS_BUILD_DIR-build" - - echo 'QT -= gui' >> "$TRAVIS_BUILD_DIR/ci-test-init.pri" - - qmake -r -Wall -Wlogic -Wparser CONFIG+=debug_and_release "$TRAVIS_BUILD_DIR/nut.pro" - -script: - - make -C "$TRAVIS_BUILD_DIR-build" all - - make -C "$TRAVIS_BUILD_DIR-build" -j2 check TESTARGS=-silent diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d850a8d..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,55 +0,0 @@ -version: '{branch}-{build}' - -clone_depth: 50 - -branches: - only: - - master - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - QTDIR: C:\Qt\5.13.0\msvc2017 - VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat - PLATFORM: - VER_SUFFIX: win32 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - QTDIR: C:\Qt\5.13.0\msvc2017_64 - VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat - PLATFORM: - VER_SUFFIX: win64 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - QTDIR: C:\Qt\5.11\msvc2015 - VCVARS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat - PLATFORM: x86 - VER_SUFFIX: win32 - - - QTDIR: C:\Qt\5.13.0\mingw73_64 - - QTDIR: C:\Qt\5.13.0\mingw73_32 - - QTDIR: C:\Qt\5.11.3\mingw53_32 - -clone_script: - - cmd: git clone -q --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER% - - cmd: git checkout -qf %APPVEYOR_REPO_COMMIT% - -install: - - git submodule update --init --recursive - - set PATH=%PATH%;%QTDIR%\bin - - call "%QTDIR%\bin\qtenv2.bat" - - if %QTDIR:msvc=%==%QTDIR% set make=mingw32-make.exe - - if not %QTDIR:msvc=%==%QTDIR% set make=nmake.exe - - if defined VCVARS call "%VCVARS%" - - qmake -v - -before_build: - # Prepare the out-of-source build directory. - - mkdir %APPVEYOR_BUILD_FOLDER%-build - - qmake -o %APPVEYOR_BUILD_FOLDER%-build -r -Wall -Wlogic -Wparser %APPVEYOR_BUILD_FOLDER% - -build_script: - - cd %APPVEYOR_BUILD_FOLDER%-build - - echo 'QT -= gui' >> %APPVEYOR_BUILD_FOLDER%\ci-test-init.pri - - '%make%' - -#test_script: -# - if not %CONFIGURATION%==debug %make% check TESTARGS=-silent