Git Product home page Git Product logo

helloactions-qt's People

Contributors

jared2020 avatar jaredtao avatar pzhlkj6612 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

helloactions-qt's Issues

release包如何上传?

你好,请问一下打包的逻辑

tag 打包

  - name: package
    if: startsWith(github.event.ref, 'refs/tags/')

我这边已经git push tag 了,还是没有触发打包这个逻辑,请问该怎么处理呢

Resource not accessible by integration

Run svenstaro/upload-release-action@v2
  with:
    repo_token: ***
    file: abc-win64_mingw81.zip
    asset_name:abc-win64_mingw81.zip
    tag: refs/tags/v0.0.1
    overwrite: true
  env:
    targetName: abc
    pythonLocation: C:\hostedtoolcache\windows\Python\3.11.3\x64
    IQTA_TOOLS: D:\a\action_ttt/Qt/Tools
    Qt5_Dir: D:/a/action_ttt/Qt/5.15.[2]
    QT_PLUGIN_PATH: D:/a/action_ttt/Qt/[5]
    QML2_IMPORT_PATH: D:/a/action_ttt/Qt/5.15.2/mingw[8]
Error: Resource not accessible by integration

我fork你的这个demo, 然后都会出现这个错误,这是为啥啊

请教一下,如何设置 利用 cache 来安装缓存呢?

你好,博主,很是感谢你的博客关于 GitHub action 的教程,但我想请教一个问题:如何使用 缓存来优化安装 Qt 后,配置还原 Qt 的环境变量呢?

# 使用外部action。这个action专门用来安装Qt
uses: jurplel/install-qt-action@v2


我在自己的测试中使用 qt + msvc +CMake 来编译 qwidget 例子;

尝试过

已经根据 玩转Qt(12)-github-Actions缓存优化 一文中,实际发现

- name: setupQt
  if: steps.WindowsCacheQt.outputs.cache-hit == 'true'
  shell: pwsh
  env:
    QtPath: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch_install}}
  run: |
    $qt_Path=${env:QtPath}
    echo "::set-env name=Qt5_Dir::$qt_Path"
    echo "::add-path::$qt_Path/bin"

是会编译失败的;

我自己于是尝试改成如下(使用 windows-2019 默认为 pwsh 是不使用 utf8,所以我采用如下设置环境变量):

    steps:
      - name: Cache Qt  # 使用缓存安装Qt模块
        id: cache-qt
        uses: actions/cache@v1  # not v2! 参见 https://github.com/jurplel/install-qt-action
        with:
          path: ../Qt
          key: ${{ runner.os }}-QtCache

      - name: Install Qt
        if: steps.WindowsCacheQt.outputs.cache-hit != 'true'
        uses: jurplel/install-qt-action@v2
        with:
          version: ${{ matrix.qt_ver }}
          arch: ${{ matrix.qt_arch }}
          cached: ${{ steps.cache-qt.outputs.cache-hit }}
          set-env: true

      - name: setupQt
        if: steps.WindowsCacheQt.outputs.cache-hit != 'true'
        shell: pwsh
        env:
            QtPath: ${{ github.workspace }}/../Qt/${{ matrix.qt_ver }}/${{ matrix.qt_arch_install }}
            QtPluginPath: ${{ github.workspace }}/../Qt/${{ matrix.qt_ver }}/${{ matrix.qt_arch_install }}/plugins
            Qml2ImportPath: ${{ github.workspace }}/../Qt/${{ matrix.qt_ver }}/${{ matrix.qt_arch_install }}/qml
        run: |
          $Qt5_Dir="${{ env.QtPath }}"
          $QT_PLUGIN_PATH="${{ env.QtPluginPath }}"
          $QML2_IMPORT_PATH="${{ env.Qml2ImportPath }}"
          
          echo "Qt5_Dir=$Qt5_Dir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          echo "QT_PLUGIN_PATH=$QT_PLUGIN_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          echo "QML2_IMPORT_PATH=$QML2_IMPORT_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

          echo "GITHUB_PATH=$Qt5_Dir/bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

      - uses: actions/checkout@v2
        with:
          fetch-depth: 1

但是 CI 依旧报错;

// 编译命令
Run cd D:\a\PicShot\PicShot
  cd D:\a\PicShot\PicShot
  mkdir bin
  mkdir build
  
  cd build
  call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
  
  if "x86" == "x86" (
    echo "1111111111------------"
    cmake -G "Visual Studio 16 2019" -A Win32 ..
    devenv "PicShot.sln" /Build "Release|Win32"
  ) else (
    echo "2222222222------------"
    cmake -G "Visual Studio 16 2019" -A x[64](https://github.com/XMuli/PicShot/runs/5434108661?check_suite_focus=true#step:7:64) ..
    devenv "PicShot.sln" /Build "Release|x64"
  )
  
  cd D:\a\PicShot\PicShot/bin/Release
  echo "333333333333333------------------a3"
  chdir
  dir

// Log 日志
shell: C:\Windows\system32\cmd.EXE /D /E:ON /V:OFF /S /C "CALL "{0}""
  env:
    targetName: PicShot
    targetOS: windows
    pythonLocation: C:\hostedtoolcache\windows\Python\3.10.2\x64
    Qt5_Dir: D:\a\PicShot\PicShot/../Qt/5.12.11/msvc2017
    QT_PLUGIN_PATH: D:\a\PicShot\PicShot/../Qt/5.12.11/msvc2017/plugins
    QML2_IMPORT_PATH: D:\a\PicShot\PicShot/../Qt/5.12.11/msvc2017/qml
    GITHUB_PATH: D:\a\PicShot\PicShot/../Qt/5.12.11/msvc2017/bin
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.10
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x[86](https://github.com/XMuli/PicShot/runs/5434108661?check_suite_focus=true#step:7:86)'
"1111111111------------"
-- The C compiler identification is MSVC 19.29.30140.0
-- The CXX compiler identification is MSVC 19.29.30140.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.301[33](https://github.com/XMuli/PicShot/runs/5434108661?check_suite_focus=true#step:7:33)/bin/Hostx[64](https://github.com/XMuli/PicShot/runs/5434108661?check_suite_focus=true#step:7:64)/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at 3rdparty/QHotkey/CMakeLists.txt:16 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
-- Configuring incomplete, errors occurred!
  asked CMake to find a package configuration file provided by "Qt5", but
See also "D:/a/PicShot/PicShot/build/CMakeFiles/CMakeOutput.log".
  CMake did not find one.
See also "D:/a/PicShot/PicShot/build/CMakeFiles/CMakeError.log".

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.

报错是说 让我设置 CMAKE_PREFIX_PATH or set "Qt5_DIR"; 但是上面环境变量已经有设置为
Qt5_Dir: D:\a\PicShot\PicShot/../Qt/5.12.11/msvc2017 , 所以就比较烦恼;

也尝试过将 .yml 脚本中 Qt5_Dir 替换为 Qt5_DIR ;实测依旧不行,同样的报错;且显示 Qt5_Dir 为空;

再不知道如何尝试了;希望能够获得博主的指点~

若回复,甚是感谢~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.