Skip to content

Commit

Permalink
CI: Removed CI cache about Qt Install
Browse files Browse the repository at this point in the history
  • Loading branch information
XMuli committed Apr 7, 2022
1 parent e63b767 commit ff152fc
Show file tree
Hide file tree
Showing 19 changed files with 118 additions and 797 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,39 @@ jobs:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true

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: 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-1

- name: setupQt
if: steps.cache-qt.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 }}"
# - name: setupQt
# if: steps.cache-qt.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 "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
# echo "GITHUB_PATH=$Qt5_Dir/bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

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

- uses: actions/checkout@v2
with:
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@ jobs:
targetOS: windows
# 步骤
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: 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-2

- name: setupQt
if: steps.cache-qt.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 }}"
# - name: setupQt
# if: steps.cache-qt.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 "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
# echo "GITHUB_PATH=$Qt5_Dir/bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

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

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -125,7 +125,8 @@ jobs:
dir bin
echo "-------------- debug 1 --------------"
${{ env.GITHUB_PATH }}/windeployqt bin/${{ env.targetName }}.exe
# ${{ env.GITHUB_PATH }}/windeployqt bin/${{ env.targetName }}.exe # cache 时使用
windeployqt bin/${{ env.targetName }}.exe
echo "-------------- debug 2 --------------"
Compress-Archive -Path ${{ github.workspace }}/bin/* -Destination ${{ env.productName }}.zip
Expand Down
57 changes: 57 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: XMuli <[email protected]> # 包的维护者
pkgname=picshot # 包的名称(由小写字母 @ . _ + - 构成)
_pkgname=PicShot # 自己添加的变量 (因 pkgname 要求全小写,而仓库源码中有大写)
# 亦是最后项目生成的文件名
pkgver=0.1.2 # 包的版本号 (不可有连字符 -)
pkgrel=1 # 包的发布号码
epoch= # 用于强制升级软件包 (一般不允许使用)
pkgdesc="Open source cross-platform screenshots" # 软件包的详细描述
arch=('x86_64') # 包所能够生成并且使用的架构的序列
url="https://github.com/XMuli/PicShot" # 包的官网
license=('MIT') # 采用的许可证
groups=() # 软件包所在的包组
depends=() # 软件包的生成和运行时,必须先行安装的软件列表
makedepends=() # 仅在软件生成时,需要的软件包列表
checkdepends=() # 运行测试组件时需要,而运行时不需要的包列表
optdepends=() # 可选的软件包(可看作本软件的插件)
provides=() # 说明当前包提供的功能 (若使用,则需加上替代版本号)
conflicts=() # 与当前软件包发生冲突的包 与功能的列表
replaces=() # 会因安装当前包而取代的过时的包的列表
backup=() # 当包被升级或卸载时,应当备份的文件(的路径)序列
options=() # 允许重载 makepkg 的部分 (在 /etc/makepkg.conf 中)
install= # .install 脚本的名称 (值应和 pkgname 相同)
changelog= # 软件包的更新日志的文件名
source=("$_pkgname-$pkgver::https://github.com/XMuli/$_pkgname/archive/v$pkgver.tar.gz") # 源码的下载地址
noextract=() # 在 source 中列出,但不应该在运行 makepkg 时被解包的文件列表
md5sums=('5abae73968ea0104e99b816bf0b720fe') # 完整性校验值
validpgpkeys=() # PGP 指纹列表


prepare() { # 准备
cd $srcdir
echo $srcdir
}

build() { # 构建
cd $_pkgname-$pkgver
mkdir bin
cd bin
qmake ..
make -j$(nproc)
}

check() { # 检查
cd $_pkgname-$pkgver
}

package() { #
cd $_pkgname-$pkgver
# make install
cd bin/
./$_pkgname
}
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
Lightweight screenshot tool

<br>
![](https://img.shields.io/github/license/XMuli/PicShot)

![](https://img.shields.io/github/v/release/XMuli/PicShot?style=flat&color=birightgreen)

![](https://img.shields.io/badge/powered%20by-XMuli-ff69b4)

![](https://img.shields.io/github/stars/XMuli/PicShot?style=social)

![](https://img.shields.io/github/forks/XMuli/PicShot?style=social&label=Fork)
![](https://img.shields.io/github/v/release/XMuli/PicShot?style=flat&color=birightgreen)![](https://img.shields.io/badge/powered%20by-XMuli-ff69b4)![](https://img.shields.io/github/stars/XMuli/PicShot?style=social) ![](https://img.shields.io/github/forks/XMuli/PicShot?style=social&label=Fork)

![](https://img.shields.io/github/workflow/status/XMuli/PicShot/Windows?style=flat&logo=windows) ![](https://img.shields.io/github/workflow/status/XMuli/PicShot/MacOS?style=flat&logo=apple) ![](https://img.shields.io/github/workflow/status/XMuli/PicShot/Linux?style=flat&logo=linux) ![](https://img.shields.io/github/languages/code-size/XMuli/PicShot) ![](https://img.shields.io/github/downloads/XMuli/PicShot/total)

Expand All @@ -33,7 +26,7 @@ git submodule update



## Build (MSCVC)
## Build (MSVC)

```bash
mkdir build
Expand Down
6 changes: 0 additions & 6 deletions debian/README.Debian

This file was deleted.

10 changes: 0 additions & 10 deletions debian/README.source

This file was deleted.

11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
picshot (0.1.3-1) unstable; urgency=medium

* 支持选中绘画图形后拖曳后移动位置
* 支持智能选中窗口(windows)
* 绘画由“相对坐标”切换为“绝对坐标”
* 优化存储绘画图像的堆栈
* 添加 PKGBUILD 为 Arch 构建脚本

-- XMuli <[email protected]> Thur, 07 Apr 2022 21:24:38 +0800


picshot (0.1.2-1) unstable; urgency=medium

* try build .deb on Linux(ubuntu 20.04)
Expand Down
56 changes: 0 additions & 56 deletions debian/manpage.1.ex

This file was deleted.

Loading

0 comments on commit ff152fc

Please sign in to comment.