QCAD自动化编译测试

使用GitHub Actions 自动化编译QCAD

编写自动化编译流水线文件Windows.yaml

# This is a basic workflow to help you get started with Actions

name: Windows

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ master ]
     # 忽略README.md
    paths-ignore:
      - 'README.md'
      - 'LICENSE'
  pull_request:
    branches: [ master ]
    # 忽略README.md
    paths-ignore:
      - 'README.md'
      - 'LICENSE'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    name: Build
    # The type of runner that the job will run on
    runs-on: windows-latest
    strategy:
      matrix:
          qt_ver: [5.14.0]
          qt_target: [desktop]
          qt_arch: [win64_msvc2017_64]
          include:
            - qt_arch: win64_msvc2017_64
              msvc_arch: x64
    env:
      targetName: qcad.exe
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: cacheQt
        id: WindowsCacheQt
        uses: actions/cache@v1
        with:
          path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch_install}}
          key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}

      - name: Install Qt
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
        uses: jurplel/install-qt-action@v2
        with:
          # Version of Qt to install
          version: ${{ matrix.qt_ver }}
          # Target platform for build
          target: ${{ matrix.qt_target }}
          # Architecture for Windows/Android
          arch: ${{ matrix.qt_arch }}
          install-deps: 'true'
          modules: 'qtwebengine qtscript'
          cached: ${{steps.WindowsCacheQt.outputs.cache-hit }}

      - uses: actions/checkout@v1
        with:
          fetch-depth: 1
          
      - name: build-msvc
        shell: cmd
        env:
          vc_arch: ${{ matrix.msvc_arch }}
          qt_ver:  ${{ matrix.qt_ver }} 
        run: |
          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %vc_arch%
          qmake -r CONFIG+=ractivated 
          nmake
          cd src\3rdparty\qt-labs-qtscriptgenerator-%qt_ver%
          qmake -r CONFIG+=ractivated
          nmake 

编译测试

经过测试编译过程大概需要1h。
在这里插入图片描述

参考

Qt使用github-Actions自动化编译

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值