mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-19 20:22:56 +08:00
update all ci
This commit is contained in:
parent
1822f26a02
commit
49771cea5a
21
.github/workflows/android.yml
vendored
21
.github/workflows/android.yml
vendored
@ -2,32 +2,37 @@ name: Android
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
|
# pull_request时触发workflow
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-18.04,ubuntu-20.04]
|
||||||
# 5.9.8 版本低,需要额外设置工具链。这里暂不支持。
|
# 5.9.8 版本低,需要额外设置工具链。这里暂不支持。
|
||||||
qt_ver: [5.12.6]
|
qt_ver: [5.12.10]
|
||||||
qt_target: [android]
|
qt_target: [android]
|
||||||
|
qt_arch: [android_x86,android_armv7,android_arm64_v8a]
|
||||||
# android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
|
# android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
|
||||||
# qt_arch: [android_x86,android_armv7,android_arm64_v8a]
|
# qt_arch: [android_x86,android_armv7]
|
||||||
qt_arch: [android_x86,android_armv7]
|
|
||||||
# exclude:
|
# exclude:
|
||||||
# - qt_ver: 5.9.8
|
# - qt_ver: 5.9.8
|
||||||
# qt_arch: android_arm64_v8a
|
# qt_arch: android_arm64_v8a
|
||||||
steps:
|
steps:
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
# if: steps.cacheqt.outputs.cache-hit != 'true'
|
# if: steps.cacheqt.outputs.cache-hit != 'true'
|
||||||
uses: jurplel/install-qt-action@v2.6.3
|
uses: jurplel/install-qt-action@v2.10.0
|
||||||
with:
|
with:
|
||||||
# Version of Qt to install
|
# Version of Qt to install
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
|
15
.github/workflows/ios.yml
vendored
15
.github/workflows/ios.yml
vendored
@ -2,23 +2,30 @@ name: IOS
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- '*.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
|
# pull_request时触发workflow
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest]
|
os: [macos-10.15,macos-11.0]
|
||||||
qt_ver: [5.12.6]
|
qt_ver: [5.9.9,5.12.10,5.15.2]
|
||||||
qt_target: [ios]
|
qt_target: [ios]
|
||||||
steps:
|
steps:
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
# if: steps.cacheqt.outputs.cache-hit != 'true'
|
# if: steps.cacheqt.outputs.cache-hit != 'true'
|
||||||
uses: jurplel/install-qt-action@v2.6.3
|
uses: jurplel/install-qt-action@v2.10.0
|
||||||
with:
|
with:
|
||||||
# Version of Qt to install
|
# Version of Qt to install
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
|
104
.github/workflows/macos.yml
vendored
104
.github/workflows/macos.yml
vendored
@ -2,30 +2,35 @@ name: MacOS
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
|
# pull_request时触发workflow
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest]
|
os: [macos-10.15,macos-11.0]
|
||||||
qt_ver: [5.12.6]
|
qt_ver: [5.9.9,5.12.10,5.15.2]
|
||||||
qt_arch: [clang_64]
|
qt_arch: [clang_64]
|
||||||
env:
|
env:
|
||||||
targetName: TaoQuickShow
|
targetName: TaoQuickShow
|
||||||
steps:
|
steps:
|
||||||
- name: cacheQt
|
# - name: cacheQt
|
||||||
id: MacosCacheQt
|
# id: MacosCacheQt
|
||||||
uses: actions/cache@v1
|
# uses: actions/cache@v1
|
||||||
with:
|
# with:
|
||||||
path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
# path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
||||||
key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
# key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
||||||
# - name: setupQt
|
# - name: setupQt
|
||||||
# if: steps.MacosCacheQt.outputs.cache-hit == 'true'
|
# if: steps.MacosCacheQt.outputs.cache-hit == 'true'
|
||||||
# shell: pwsh
|
# shell: pwsh
|
||||||
@ -37,10 +42,11 @@ jobs:
|
|||||||
# echo "::add-path::$qt_Path/bin"
|
# echo "::add-path::$qt_Path/bin"
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
# if: steps.MacosCacheQt.outputs.cache-hit != 'true'
|
# if: steps.MacosCacheQt.outputs.cache-hit != 'true'
|
||||||
uses: jurplel/install-qt-action@v2.6.3
|
uses: jurplel/install-qt-action@v2.10.0
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
cached: ${{ steps.MacosCacheQt.outputs.cache-hit }}
|
# cached: ${{ steps.MacosCacheQt.outputs.cache-hit }}
|
||||||
|
cached: 'false'
|
||||||
|
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
@ -55,78 +61,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# 拷贝依赖
|
# 拷贝依赖
|
||||||
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
|
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
|
||||||
# tag 查询github-Release
|
|
||||||
- name: queryRelease
|
|
||||||
id: queryReleaseMacos
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
shell: pwsh
|
|
||||||
env:
|
|
||||||
githubFullName: ${{ github.event.repository.full_name }}
|
|
||||||
ref: ${{ github.event.ref }}
|
|
||||||
run: |
|
|
||||||
[string]$tag = ${env:ref}.Substring(${env:ref}.LastIndexOf('/') + 1)
|
|
||||||
[string]$url = 'https://api.github.com/repos/' + ${env:githubFullName} + '/releases/tags/' + ${tag}
|
|
||||||
$response={}
|
|
||||||
try {
|
|
||||||
$response = Invoke-RestMethod -Uri $url -Method Get
|
|
||||||
} catch {
|
|
||||||
Write-Host "StatusCode:" $_.Exception.Response.StatusCode.value__
|
|
||||||
Write-Host "StatusDescription:" $_.Exception.Response.StatusDescription
|
|
||||||
# 没查到,输出
|
|
||||||
echo "::set-output name=needCreateRelease::true"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
[string]$latestUpUrl = $response.upload_url
|
|
||||||
Write-Host 'latestUpUrl:'$latestUpUrl
|
|
||||||
if ($latestUpUrl.Length -eq 0) {
|
|
||||||
# 没查到,输出
|
|
||||||
echo "::set-output name=needCreateRelease::true"
|
|
||||||
}
|
|
||||||
# tag 创建github-Release
|
|
||||||
- name: createReleaseWin
|
|
||||||
id: createReleaseWin
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/') && steps.queryReleaseMacos.outputs.needCreateRelease == 'true'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
uses: actions/create-release@v1.0.0
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
body: ${{ github.event.head_commit.message }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
# 重定向upload_url到环境变量uploadUrl。
|
|
||||||
- name: getLatestTagRelease
|
|
||||||
# tag 上一步无论成功还是失败都执行
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
shell: pwsh
|
|
||||||
env:
|
|
||||||
githubFullName: ${{ github.event.repository.full_name }}
|
|
||||||
upUrl: ${{ steps.queryReleaseMacos.outputs.upload_url }}
|
|
||||||
ref: ${{ github.event.ref }}
|
|
||||||
run: |
|
|
||||||
# upUrl不为空,导出就完事
|
|
||||||
if (${env:upUrl}.Length -gt 0) {
|
|
||||||
$v=${env:upUrl}
|
|
||||||
echo "::set-env name=uploadUrl::$v"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
[string]$tag = ${env:ref}.Substring(${env:ref}.LastIndexOf('/') + 1)
|
|
||||||
[string]$url = 'https://api.github.com/repos/' + ${env:githubFullName} + '/releases/tags/' + ${tag}
|
|
||||||
$response = Invoke-RestMethod -Uri $url -Method Get
|
|
||||||
[string]$latestUpUrl = $response.upload_url
|
|
||||||
Write-Host 'latestUpUrl:'$latestUpUrl
|
|
||||||
echo "::set-env name=uploadUrl::$latestUpUrl"
|
|
||||||
Write-Host 'env uploadUrl:'${env:uploadUrl}
|
|
||||||
# tag 上传Release
|
# tag 上传Release
|
||||||
- name: uploadRelease
|
- name: uploadRelease
|
||||||
id: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
env:
|
uses: svenstaro/upload-release-action@v2
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ env.uploadUrl }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
asset_path: ./bin/release/${{ env.targetName }}.dmg
|
file: bin/release/${{ env.targetName }}.dmg
|
||||||
asset_name: ${{ runner.os }}-${{ env.targetName }}.dmg
|
asset_name: ${{ runner.os }}-${{ env.targetName }}.dmg
|
||||||
asset_content_type: application/applefile
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
29
.github/workflows/ubuntu.yml
vendored
29
.github/workflows/ubuntu.yml
vendored
@ -1,30 +1,36 @@
|
|||||||
name: Ubuntu
|
name: Ubuntu
|
||||||
# Qt官方没有linux平台的x86包
|
# Qt官方没有linux平台的x86包
|
||||||
on:
|
on:
|
||||||
|
# push代码时触发workflow
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
|
# pull_request时触发workflow
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
|
- "doc/**"
|
||||||
|
- "preview/**"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-16.04,ubuntu-18.04]
|
os: [ubuntu-16.04,ubuntu-18.04,ubuntu-20.04]
|
||||||
qt_ver: [5.12.6]
|
qt_ver: [5.9.9,5.12.10,5.15.2]
|
||||||
qt_arch: [gcc_64]
|
qt_arch: [gcc_64]
|
||||||
steps:
|
steps:
|
||||||
- name: cacheQt
|
# - name: cacheQt
|
||||||
id: UbuntuCacheQt
|
# id: UbuntuCacheQt
|
||||||
uses: actions/cache@v1
|
# uses: actions/cache@v1
|
||||||
with:
|
# with:
|
||||||
path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
# path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
||||||
key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
# key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
|
||||||
# - name: setupQt
|
# - name: setupQt
|
||||||
# if: steps.UbuntuCacheQt.outputs.cache-hit == 'true'
|
# if: steps.UbuntuCacheQt.outputs.cache-hit == 'true'
|
||||||
# shell: pwsh
|
# shell: pwsh
|
||||||
@ -36,10 +42,11 @@ jobs:
|
|||||||
# echo "::add-path::$qt_Path/bin"
|
# echo "::add-path::$qt_Path/bin"
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
# if: steps.UbuntuCacheQt.outputs.cache-hit != 'true'
|
# if: steps.UbuntuCacheQt.outputs.cache-hit != 'true'
|
||||||
uses: jurplel/install-qt-action@v2.6.3
|
uses: jurplel/install-qt-action@v2.10.0
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
cached: ${{ steps.UbuntuCacheQt.outputs.cache-hit }}
|
# cached: ${{ steps.UbuntuCacheQt.outputs.cache-hit }}
|
||||||
|
cached: 'false'
|
||||||
- name: ubuntu install GL library
|
- name: ubuntu install GL library
|
||||||
run: sudo apt-get install -y libglew-dev libglfw3-dev
|
run: sudo apt-get install -y libglew-dev libglfw3-dev
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
11
.github/workflows/windows.yml
vendored
11
.github/workflows/windows.yml
vendored
@ -3,7 +3,6 @@ name: Windows
|
|||||||
on:
|
on:
|
||||||
# push代码时触发workflow
|
# push代码时触发workflow
|
||||||
push:
|
push:
|
||||||
# 忽略README.md
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '*.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
@ -11,7 +10,6 @@ on:
|
|||||||
- "preview/**"
|
- "preview/**"
|
||||||
# pull_request时触发workflow
|
# pull_request时触发workflow
|
||||||
pull_request:
|
pull_request:
|
||||||
# 忽略README.md
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
@ -90,6 +88,7 @@ jobs:
|
|||||||
target: ${{ matrix.qt_target }}
|
target: ${{ matrix.qt_target }}
|
||||||
# Architecture for Windows/Android
|
# Architecture for Windows/Android
|
||||||
arch: ${{ matrix.qt_arch }}
|
arch: ${{ matrix.qt_arch }}
|
||||||
|
dir: ${{ github.workspace }}/Qt
|
||||||
# cached: ${{ steps.WindowsCacheQt.outputs.cache-hit }}
|
# cached: ${{ steps.WindowsCacheQt.outputs.cache-hit }}
|
||||||
cached: 'false'
|
cached: 'false'
|
||||||
# 拉取代码
|
# 拉取代码
|
||||||
@ -126,10 +125,10 @@ jobs:
|
|||||||
$name = ${env:archiveName}
|
$name = ${env:archiveName}
|
||||||
echo "::set-output name=packageName::$name"
|
echo "::set-output name=packageName::$name"
|
||||||
# 上传artifacts
|
# 上传artifacts
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
with:
|
# with:
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
# name: ${{ steps.package.outputs.packageName }}
|
||||||
path: ${{ steps.package.outputs.packageName }}.zip
|
# path: ${{ steps.package.outputs.packageName }}.zip
|
||||||
# tag 上传Release
|
# tag 上传Release
|
||||||
- name: uploadRelease
|
- name: uploadRelease
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user