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 e4864b0
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/qt-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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]
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 }}
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
35 changes: 35 additions & 0 deletions .github/workflows/qt-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#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]
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 }}
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
32 changes: 32 additions & 0 deletions .github/workflows/qt-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
modules: ${{ matrix.qt_modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build macos
run: |
cmake
make
34 changes: 34 additions & 0 deletions .github/workflows/qt-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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-latest]
qt_ver: [5.15.2, 6.5.3]
qt_modules: [qtwebengine]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
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
45 changes: 45 additions & 0 deletions .github/workflows/qt-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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]
include:
- msvc_arch: x64
# - qt_arch: win64_msvc2017_64
# msvc_arch: x64
qt_modules: [qtwebengine]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
# arch: ${{ matrix.qt_arch }}
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 e4864b0

Please sign in to comment.