├── .github
└── workflows
│ ├── android.yml
│ ├── ios.yml
│ ├── macos.yml
│ ├── ubuntu.yml
│ └── windows.yml
├── .travis.yml
├── Appveyor.png
├── HelloCI.pro
├── README.md
├── appveyor.yml
├── main.cpp
├── main.qml
├── ppa-binner.png
└── qml.qrc
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | name: Android
2 | on:
3 | push:
4 | paths-ignore:
5 | - 'README.md'
6 | - 'LICENSE'
7 | pull_request:
8 | paths-ignore:
9 | - 'README.md'
10 | - 'LICENSE'
11 | jobs:
12 | build:
13 | name: Build
14 | runs-on: ${{ matrix.os }}
15 | strategy:
16 | matrix:
17 | os: [ubuntu-latest]
18 | # 5.9.8 版本低,需要额外设置工具链。这里暂不支持。
19 | qt_ver: [5.12.6]
20 | qt_target: [android]
21 | # android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
22 | # qt_arch: [android_x86,android_armv7,android_arm64_v8a]
23 | qt_arch: [android_x86,android_armv7]
24 | # exclude:
25 | # - qt_ver: 5.9.8
26 | # qt_arch: android_arm64_v8a
27 | steps:
28 | - name: Install Qt
29 | # if: steps.cacheqt.outputs.cache-hit != 'true'
30 | uses: jurplel/install-qt-action@v2.0.0
31 | with:
32 | # Version of Qt to install
33 | version: ${{ matrix.qt_ver }}
34 | # Target platform for build
35 | target: ${{ matrix.qt_target }}
36 | # Architecture for Windows/Android
37 | arch: ${{ matrix.qt_arch }}
38 | - uses: actions/checkout@v1
39 | with:
40 | fetch-depth: 1
41 | - name: build android
42 | run: |
43 | export PATH=$PATH:$Qt5_Dir
44 | export ANDROID_SDK_ROOT=$ANDROID_HOME
45 | export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
46 | qmake
47 | make
48 | # - name: CacheQt
49 | # uses: actions/cache@v1
50 | # with:
51 | # path: ${{ env.Qt5_Dir }}
52 | # key: ${{ runner.OS }}-Qt
--------------------------------------------------------------------------------
/.github/workflows/ios.yml:
--------------------------------------------------------------------------------
1 | name: IOS
2 | on:
3 | push:
4 | paths-ignore:
5 | - 'README.md'
6 | pull_request:
7 | paths-ignore:
8 | - 'README.md'
9 | jobs:
10 | build:
11 | name: Build
12 | runs-on: ${{ matrix.os }}
13 | strategy:
14 | matrix:
15 | os: [macos-latest]
16 | qt_ver: [5.12.6]
17 | qt_target: [ios]
18 | steps:
19 | - name: Install Qt
20 | # if: steps.cacheqt.outputs.cache-hit != 'true'
21 | uses: jurplel/install-qt-action@v2.0.0
22 | with:
23 | # Version of Qt to install
24 | version: ${{ matrix.qt_ver }}
25 | # Target platform for build
26 | target: ${{ matrix.qt_target }}
27 | - uses: actions/checkout@v1
28 | with:
29 | fetch-depth: 1
30 | - name: build ios
31 | run: |
32 | export PATH=$PATH:$Qt5_Dir
33 | qmake -r -spec macx-ios-clang CONFIG+=release CONFIG+=iphoneos
34 | make
35 | # - name: CacheQt
36 | # uses: actions/cache@v1
37 | # with:
38 | # path: ${{ env.Qt5_Dir }}
39 | # key: ${{ runner.OS }}-Qt
--------------------------------------------------------------------------------
/.github/workflows/macos.yml:
--------------------------------------------------------------------------------
1 | name: MacOS
2 | on:
3 | push:
4 | paths-ignore:
5 | - 'README.md'
6 | - 'LICENSE'
7 | pull_request:
8 | paths-ignore:
9 | - 'README.md'
10 | - 'LICENSE'
11 | jobs:
12 | build:
13 | name: Build
14 | runs-on: ${{ matrix.os }}
15 | strategy:
16 | matrix:
17 | os: [macos-latest]
18 | qt_ver: [5.9.8,5.12.6]
19 | steps:
20 | - name: Install Qt
21 | if: steps.cacheqt.outputs.cache-hit != 'true'
22 | uses: jurplel/install-qt-action@v2.0.0
23 | with:
24 | # Directory to install Qt
25 | #dir: # optional
26 | # Version of Qt to install
27 | version: ${{ matrix.qt_ver }}
28 | # optional, default is 5.12.6
29 | # Host platform
30 | #host: # optional
31 | # Target platform for build
32 | #target: # optional, default is desktop
33 | # Architecture for Windows/Android
34 | #arch: # optional
35 | - uses: actions/checkout@v1
36 | with:
37 | fetch-depth: 1
38 | - name: build macos
39 | run: |
40 | export PATH=$PATH:$Qt5_Dir
41 | qmake
42 | make
43 | - name: CacheQt
44 | uses: actions/cache@v1
45 | if: matrix.qt_ver == '5.12.6'
46 | with:
47 | path: ${{ env.Qt5_Dir }}
48 | key: ${{ runner.OS }}-Qt-${{ matrix.qt_ver }}
--------------------------------------------------------------------------------
/.github/workflows/ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: Ubuntu
2 | # Qt官方没有linux平台的x86包
3 | on:
4 | push:
5 | paths-ignore:
6 | - 'README.md'
7 | - 'LICENSE'
8 | pull_request:
9 | paths-ignore:
10 | - 'README.md'
11 | - 'LICENSE'
12 | jobs:
13 | build:
14 | name: Build
15 | runs-on: ${{ matrix.os }}
16 | strategy:
17 | matrix:
18 | os: [ubuntu-16.04,ubuntu-18.04]
19 | qt_ver: [5.9.8,5.12.6]
20 | steps:
21 | - name: Install Qt
22 | if: steps.cacheqt.outputs.cache-hit != 'true'
23 | uses: jurplel/install-qt-action@v2.0.0
24 | with:
25 | # Directory to install Qt
26 | #dir: # optional
27 | # Version of Qt to install
28 | version: ${{ matrix.qt_ver }}
29 | # optional, default is 5.12.6
30 | # Host platform
31 | #host: # optional
32 | # Target platform for build
33 | #target: # optional, default is desktop
34 | # Architecture for Windows/Android
35 | #arch: # optional
36 | - name: ubuntu install GL library
37 | run: sudo apt-get install -y libglew-dev libglfw3-dev
38 | - uses: actions/checkout@v1
39 | with:
40 | fetch-depth: 1
41 | - name: build ubuntu
42 | run: |
43 | export PATH=$PATH:$Qt5_Dir
44 | qmake
45 | make
46 | - name: CacheQt
47 | uses: actions/cache@v1
48 | if: matrix.qt_ver == '5.12.6'
49 | with:
50 | path: ${{ env.Qt5_Dir }}
51 | key: ${{ runner.OS }}-Qt-${{ matrix.qt_ver }}
--------------------------------------------------------------------------------
/.github/workflows/windows.yml:
--------------------------------------------------------------------------------
1 | name: Windows
2 | on:
3 | # push代码时触发workflow
4 | push:
5 | # 忽略README.md
6 | paths-ignore:
7 | - 'README.md'
8 | - 'LICENSE'
9 | # pull_request时触发workflow
10 | pull_request:
11 | # 忽略README.md
12 | paths-ignore:
13 | - 'README.md'
14 | - 'LICENSE'
15 | jobs:
16 | build:
17 | name: Build
18 | # 运行平台, windows-latest目前是windows server 2019
19 | runs-on: windows-latest
20 | strategy:
21 | # 矩阵配置
22 | matrix:
23 | qt_ver: [5.9.8,5.12.6]
24 | qt_target: [desktop]
25 | # mingw用不了
26 | # qt_arch: [win64_msvc2017_64, win32_msvc2017, win32_mingw53,win32_mingw73]
27 | qt_arch: [win64_msvc2017_64, win32_msvc2017]
28 | # 从矩阵中除外的配置
29 | exclude:
30 | # 不存在5.9.8-win32_msvc2017的版本
31 | - qt_ver: 5.9.8
32 | qt_arch: win32_msvc2017
33 | # mingw用不了
34 | # - qt_ver: 5.9.8
35 | # qt_arch: win32_mingw73
36 | # - qt_ver: 5.12.6
37 | # qt_arch: win32_mingw53
38 | # 步骤
39 | steps:
40 | # 安装Qt
41 | - name: Install Qt
42 | # 缓存未命中时才安装
43 | if: steps.cacheqt.outputs.cache-hit != 'true'
44 | # 使用外部action。这个action专门用来安装Qt
45 | uses: jurplel/install-qt-action@v2.0.0
46 | with:
47 | # Version of Qt to install
48 | version: ${{ matrix.qt_ver }}
49 | # Target platform for build
50 | target: ${{ matrix.qt_target }}
51 | # Architecture for Windows/Android
52 | arch: ${{ matrix.qt_arch }}
53 | # 拉取代码
54 | - uses: actions/checkout@v1
55 | with:
56 | fetch-depth: 1
57 | # 条件编译msvc-x64
58 | - name: build-msvc-x64
59 | if: contains(matrix.qt_arch,'msvc') && contains(matrix.qt_arch,'win64')
60 | shell: cmd
61 | run: |
62 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
63 | qmake
64 | nmake
65 | # 条件编译msvc-x86
66 | - name: build-msvc-x86
67 | if: contains(matrix.qt_arch,'msvc') && contains(matrix.qt_arch,'win32')
68 | shell: cmd
69 | run: |
70 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
71 | qmake
72 | nmake
73 | # 条件编译mingw(用不了)
74 | - name: build-mingw
75 | if: contains(matrix.qt_arch,'mingw')
76 | shell: cmd
77 | run: |
78 | qmake
79 | mingw32-make
80 | # 条件缓存
81 | - name: CacheQt
82 | uses: actions/cache@v1
83 | # cache有大小限制,单个缓存不超过400M,整个仓库的缓存不超过2G。所以这里只缓存一个特定版本。
84 | if: matrix.qt_ver == '5.12.6' && matrix.qt_arch == 'win64_msvc2017_64'
85 | with:
86 | path: ${{ env.Qt5_Dir }}
87 | key: ${{ runner.OS }}-Qt-${{ matrix.qt_ver }}-${{ matrix.qt_target }}-${{ matrix.qt_arch }}
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | #指定语言为cpp
2 | language: cpp
3 | #需要sudu权限
4 | sudo: required
5 | #编译器为gcc
6 | compiler: gcc
7 | #环境变量
8 | #env: QT_BASE="512"
9 |
10 | matrix:
11 | include:
12 | #ubuntu 16.04 LTS(xenial)
13 | - os: linux
14 | dist: xenial
15 | env:
16 | targetFile=HelloCI
17 | releaseName=HelloCI_ubuntu_xenial_x64
18 | qtppa="ppa:beineri/opt-qt-5.12.3-xenial"
19 | #缓存, 指定qt安装路径,可以避免重复安装,节约CI时间
20 | cache:
21 | bundler: true
22 | apt: true
23 | directories:
24 | - /opt/qt*/
25 | #ubuntu 18.04 LTS(bionic)
26 | - os: linux
27 | dist: bionic
28 | env:
29 | targetFile=HelloCI
30 | releaseName=HelloCI_ubuntu_bionic_x64
31 | qtppa="ppa:beineri/opt-qt-5.12.3-bionic"
32 | cache:
33 | bundler: true
34 | apt: true
35 | directories:
36 | - /opt/qt*/
37 | #macOS 10.13 with xcode 9.4
38 | - os: osx
39 | osx_image: xcode9.4
40 | env:
41 | targetFile=HelloCI
42 | releaseName=HelloCI_macos10-13_xcode9-4.dmg
43 | qtDir=/usr/local/opt/qt
44 | cache:
45 | bundler: true
46 | directories:
47 | - /usr/local/Cellar/qt/
48 | - /usr/local/opt/qt/
49 | #macOS 10.14 with xcode 10.3
50 | - os: osx
51 | osx_image: xcode10.3
52 | env:
53 | targetFile=HelloCI
54 | releaseName=HelloCI_macos10-14_xcode10-2.dmg
55 | qtDir=/usr/local/opt/qt
56 | cache:
57 | bundler: true
58 | directories:
59 | - /usr/local/Cellar/qt/
60 | - /usr/local/opt/qt/
61 | #macOS 10.14 with xcode 11
62 | - os: osx
63 | osx_image: xcode11
64 | env:
65 | targetFile=HelloCI
66 | releaseName=HelloCI_macos10-14_xcode10-2.dmg
67 | qtDir=/usr/local/opt/qt
68 | cache:
69 | bundler: true
70 | directories:
71 | - /usr/local/Cellar/qt/
72 | - /usr/local/opt/qt/
73 | #组
74 | group: deprecated-2019Q1
75 |
76 | # travis默认系统为ubuntu,并提供一些基础的命令。但是没有安装Qt,需要通过ubuntu源进行安装。
77 | # 关于ubuntu源 在这个网站上查看细节 https://launchpad.net/~beineri
78 | # 当然也可以通过qt安装包 +一些命令的方式来安装,这里以源的方式为主。
79 | #安装前的设置
80 | #添加qt的源
81 | before_install:
82 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install qt; brew link qt --force; fi
83 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ${qtppa} -y; sudo apt-get update -qq; sudo apt-get install -y libglew-dev libglfw3-dev; sudo apt-get install -y qt512-meta-minimal; fi
84 | # 单独安装qt3d模块的示例
85 | # - sudo apt-get install -y qt5123d
86 |
87 | before_script:
88 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt512/bin/qt512-env.sh; fi
89 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=${qtDir}/bin:${PATH} ; fi
90 | script:
91 | - qmake
92 | - make
93 | before_deploy:
94 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then macdeployqt bin/${targetFile}.app -qmldir=${qtDir}/qml -verbose=1 -dmg ; mv bin/${targetFile}.dmg bin/${releaseName} ; fi
95 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/${targetFile} bin/${releaseName} ; fi
96 | deploy: # 部署
97 | provider: releases # 部署到 GitHub Release,除此之外,Travis CI 还支持发布到 fir.im、AWS、Google App Engine 等
98 | api_key: $GITHUB_OAUTH_TOKEN # 填写 GitHub 的 token (Settings -> Personal access tokens -> Generate new token)
99 | file: bin/${releaseName} # 部署文件路径
100 | skip_cleanup: true # 设置为 true 以跳过清理,不然 apk 文件就会被清理
101 | on: # 发布时机
102 | tags: true # tags 设置为 true 表示只有在有 tag 的情况下才部署
103 | notifications:
104 | email: false
105 |
106 |
--------------------------------------------------------------------------------
/Appveyor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaredtao/HelloCI/2ae8a519981a0058b9804b1d8faf24501dab683e/Appveyor.png
--------------------------------------------------------------------------------
/HelloCI.pro:
--------------------------------------------------------------------------------
1 | QT += quick
2 | CONFIG += c++11
3 | TARGET= HelloCI
4 |
5 | # The following define makes your compiler emit warnings if you use
6 | # any feature of Qt which as been marked deprecated (the exact warnings
7 | # depend on your compiler). Please consult the documentation of the
8 | # deprecated API in order to know how to port your code away from it.
9 | DEFINES += QT_DEPRECATED_WARNINGS
10 |
11 | # You can also make your code fail to compile if you use deprecated APIs.
12 | # In order to do so, uncomment the following line.
13 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
14 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
15 |
16 | SOURCES += main.cpp
17 |
18 | RESOURCES += qml.qrc
19 |
20 | # Additional import path used to resolve QML modules in Qt Creator's code model
21 | QML_IMPORT_PATH =
22 |
23 | # Additional import path used to resolve QML modules just for Qt Quick Designer
24 | QML_DESIGNER_IMPORT_PATH =
25 |
26 | DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/bin/)
27 |
28 | # Default rules for deployment.
29 | qnx: target.path = /tmp/$${TARGET}/bin
30 | else: unix:!android: target.path = /opt/$${TARGET}/bin
31 | !isEmpty(target.path): INSTALLS += target
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HelloCI
2 |
3 | ## 简介
4 |
5 | 演示github中的Qt项目,使用CI持续集成(主要是Travis和Appveyor)
6 |
7 | ***
8 |
9 | 此项目已失去价值,github的actions更加强大,建议移步:
10 |
11 | https://github.com/jaredtao/HelloActions-Qt
12 |
13 | ## 原理
14 |
15 | 可以参考这个博客:
16 |
17 | [Qt工程持续集成系列之一 - 自动化编译](https://jaredtao.github.io/2019/04/30/Qt%E8%87%AA%E5%8A%A8%E5%8C%96%E7%BC%96%E8%AF%91/)
18 |
19 | [Qt工程持续集成系列之二 - 自动化发行](https://jaredtao.github.io/2019/04/30/Qt%E8%87%AA%E5%8A%A8%E5%8C%96%E5%8F%91%E8%A1%8C/)
20 |
21 | 如果图裂了,可到知乎专栏
22 |
23 | https://zhuanlan.zhihu.com/p/64154823
24 |
25 | https://zhuanlan.zhihu.com/p/64154979
26 |
27 | ## status
28 | | [Ubuntu/MacOS][lin-link] | [Windows][win-link] |[License][license-link] | [Release][release-link]|[Download][download-link]|
29 | | :---------------: | :-----------------: | :-----------------:|:-----------------: |:-----------------: |
30 | | ![lin-badge] | ![win-badge] | ![license-badge] |![release-badge] | ![download-badge]|
31 |
32 | [lin-badge]: https://travis-ci.org/jaredtao/HelloCI.svg?branch=master "Travis build status"
33 | [lin-link]: https://travis-ci.org/jaredtao/HelloCI "Travis build status"
34 | [win-badge]: https://ci.appveyor.com/api/projects/status/yykx4xufxtrax1hi?svg=true "AppVeyor build status"
35 | [win-link]: https://ci.appveyor.com/project/jiawentao/helloci "AppVeyor build status"
36 | [release-link]: https://github.com/jaredtao/HelloCI/releases "Release status"
37 | [release-badge]: https://img.shields.io/github/release/jaredtao/HelloCI.svg?style=flat-square" "Release status"
38 | [download-link]: https://github.com/jaredtao/HelloCI/releases/latest "Download status"
39 | [download-badge]: https://img.shields.io/github/downloads/jaredtao/HelloCI/total.svg?style=flat-square "Download status"
40 | [license-link]: https://github.com/jaredtao/HelloCI/blob/master/LICENSE "LICENSE"
41 | [license-badge]: https://img.shields.io/badge/license-MIT-blue.svg "MIT"
42 | ## support
43 | [](https://github.com/jaredtao/HelloCI/issues)
44 | [](https://github.com/jaredtao/HelloCI/wiki)
45 | ## Appveyor
46 | Appveyor 支持 Qt5.9 至 5.12 包含vs2015/vs2017 x86/x64
47 |
48 | 可以参考官方链接https://www.appveyor.com/docs/windows-images-software/#qt
49 |
50 | 当前项目配置可参考下图:
51 |
52 | 
53 |
54 | ## Travis
55 |
56 | Travis 包括Ubuntu和MacOS两个系统
57 |
58 | Ubuntu使用 https://launchpad.net/~beineri 提供的源来安装Qt
59 |
60 | 支持版本可参考下图:
61 |
62 | 
63 |
64 | 目前配置中包括
65 |
66 | ubuntu 16.04 LTS(xenial)
67 |
68 | ubuntu 18.04 LTS(bionic)
69 |
70 | MacOS 使用brew安装Qt, Qt版本未作指定, 使用默认版本(brew没有直接的功能支持)。
71 |
72 | 目前配置中包括:
73 |
74 | macOS 10.13 with xcode 9.4
75 |
76 | macOS 10.14 with xcode 10.3
77 |
78 | macOS 10.14 with xcode 11
79 |
80 | ## 开发环境
81 |
82 | * Qt 5.12.x Windows/Ubuntu
83 |
84 |
85 | ### 联系方式:
86 |
87 | ***
88 |
89 | | 作者 | 涛哥 |
90 | | ---- | -------------------------------- |
91 | |开发理念 | 传承工匠精神 |
92 | | QQ | 759378563 |
93 | | 微信 | xsd2410421 |
94 | | 邮箱 | jared2020@163.com |
95 | | blog | https://jaredtao.github.io |
96 |
97 | ***
98 |
99 | QQ(TIM)、微信二维码
100 |
101 | 
102 |
103 |
104 | ###### 请放心联系我,乐于提供咨询服务,也可洽谈有偿技术支持相关事宜。
105 |
106 | ***
107 | #### **打赏**
108 | 
109 |
110 | ###### 觉得分享的内容还不错, 就请作者喝杯奶茶吧~~
111 | ***
112 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: '{build}'
2 |
3 | branches:
4 | except:
5 | - project/travis
6 | environment:
7 | matrix:
8 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
9 | platform: x86
10 | qt: 5.9
11 | releaseName: HelloCI_qt59_vs2015_x86
12 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
13 | platform: x64
14 | qt: 5.9
15 | releaseName: HelloCI_qt59_vs2015_x64
16 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
17 | platform: x64
18 | qt: 5.12
19 | releaseName: HelloCI_qt512_vs2015_x64
20 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
21 | platform: x64
22 | qt: 5.9
23 | releaseName: HelloCI_qt59_vs2017_x64
24 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
25 | platform: x64
26 | qt: 5.12
27 | releaseName: HelloCI_qt512_vs2017_x64
28 | before_build:
29 | - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set msvc=msvc2015
30 | - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set vs=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
31 | - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set msvc=msvc2017
32 | - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set vs=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
33 | - if "%platform%"=="x86" set QTDIR=C:\Qt\%qt%\%msvc%
34 | - if "%platform%"=="x64" set QTDIR=C:\Qt\%qt%\%msvc%_64
35 | - set PATH=%PATH%;%QTDIR%\bin;
36 | - if "%platform%"=="x86" set vcvarsall=%vs%\vcvarsall.bat
37 | - if "%platform%"=="x64" set vcvarsall=%vs%\vcvarsall.bat
38 | - if "%platform%"=="x86" call "%vcvarsall%" x86
39 | - if "%platform%"=="x64" call "%vcvarsall%" x64
40 | build_script:
41 | - qmake
42 | - nmake
43 | after_build:
44 | - if "%APPVEYOR_REPO_TAG%"=="true" windeployqt bin\HelloCI.exe --qmldir %QTDIR%\qml
45 | artifacts:
46 | - path: bin
47 | name: $(releaseName)
48 | deploy:
49 | provider: GitHub
50 | auth_token: $(GITHUB_OAUTH_TOKEN)
51 | description: 'HelloCI Release'
52 | draft: false
53 | prerelease: false
54 | on:
55 | APPVEYOR_REPO_TAG: true
56 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
7 |
8 | QGuiApplication app(argc, argv);
9 |
10 | QQmlApplicationEngine engine;
11 | engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
12 | if (engine.rootObjects().isEmpty())
13 | return -1;
14 |
15 | return app.exec();
16 | }
17 |
--------------------------------------------------------------------------------
/main.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.9
2 | import QtQuick.Window 2.2
3 |
4 | Window {
5 | visible: true
6 | width: 640
7 | height: 480
8 | title: qsTr("Hello CI")
9 | }
10 |
--------------------------------------------------------------------------------
/ppa-binner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaredtao/HelloCI/2ae8a519981a0058b9804b1d8faf24501dab683e/ppa-binner.png
--------------------------------------------------------------------------------
/qml.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main.qml
4 |
5 |
6 |
--------------------------------------------------------------------------------