Skip to content

Commit

Permalink
Add qt actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cgxxv committed Mar 11, 2024
1 parent b0566aa commit 462b98a
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/qt-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Android
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# 5.9.8 版本低,需要额外设置工具链。这里暂不支持。
qt_ver: [5.15.2, 6.5.3]
qt_target: [android]
# android_arm64_v8a 暂时不支持. install-qt-action 依赖的aqtinstall版本为0.5*,需要升级
# qt_arch: [android_x86,android_armv7,android_arm64_v8a]
# qt_arch: [android_x86, android_armv7]
# exclude:
# - qt_ver: 5.9.8
# qt_arch: android_arm64_v8a
qt_modules: [qtwebengine]
qt_host: "linux"
steps:
- name: Install Qt
# if: steps.cacheqt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
# arch: ${{ matrix.qt_arch }}
host: ${{ matrix.qt_host }}
modules: ${{ matrix.qt_modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build android
run: |
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
cmake
make
37 changes: 37 additions & 0 deletions .github/workflows/qt-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ios.yml
name: IOS
on:
push:
paths-ignore:
- "README.md"
pull_request:
paths-ignore:
- "README.md"
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
qt_ver: [5.15.2, 6.5.3]
qt_target: [ios]
qt_modules: [qtwebengine]
qt_host: "mac"
steps:
- name: Install Qt
# if: steps.cacheqt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
host: ${{ matrix.qt_host }}
modules: ${{ matrix.qt_modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build ios
run: |
# qmake -r -spec macx-ios-clang CONFIG+=release CONFIG+=iphoneos
cmake
make
34 changes: 34 additions & 0 deletions .github/workflows/qt-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MacOS
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
qt_ver: [5.15.2, 6.5.3]
qt_modules: [qtwebengine]
qt_host: "mac"
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
host: ${{ matrix.qt_host }}
modules: ${{ matrix.qt_modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build macos
run: |
cmake
make
36 changes: 36 additions & 0 deletions .github/workflows/qt-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Ubuntu
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
qt_ver: [5.15.2, 6.5.3]
qt_modules: [qtwebengine]
qt_host: "linux"
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
host: ${{ matrix.qt_host }}
modules: ${{ matrix.qt_modules }}
# - name: ubuntu install GL library
# run: sudo apt-get install -y libglew-dev libglfw3-dev
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build ubuntu
run: |
cmake
make
48 changes: 48 additions & 0 deletions .github/workflows/qt-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Windows
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
jobs:
build:
name: Build
runs-on: windows-latest
strategy:
matrix:
qt_ver: [5.15.2, 6.5.3]
qt_target: [desktop]
# mingw用不了
# qt_arch: [win64_msvc2017_64, win32_msvc2017, win32_mingw53,win32_mingw73]
# qt_arch: [win64_msvc2019_64]
# 额外设置msvc_arch
include:
- msvc_arch: x64
# - qt_arch: win64_msvc2017_64
# msvc_arch: x64
qt_modules: [qtwebengine]
qt_host: "windows"
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
# arch: ${{ matrix.qt_arch }}
host: ${{ matrix.qt_host }}
modules: ${{ matrix.qt_modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build-msvc
shell: cmd
env:
vc_arch: ${{ matrix.msvc_arch }}
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %vc_arch%
cmake
nmake

0 comments on commit 462b98a

Please sign in to comment.