Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 59c2d46

Browse files
QxQQxQ
authored andcommitted
add: update and added Qt6 build
1 parent c3d24de commit 59c2d46

File tree

2 files changed

+146
-1
lines changed

2 files changed

+146
-1
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: QvPlugin Build Action Qt6 - cmake
2+
3+
on:
4+
push:
5+
release:
6+
types: [prereleased]
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
qt_version: [6.0.0]
13+
platform: [ubuntu-20.04, macos-latest, windows-latest]
14+
include:
15+
- platform: windows-latest
16+
qtarch: win64_msvc2019_64
17+
fail-fast: false
18+
19+
runs-on: ${{ matrix.platform }}
20+
env:
21+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
22+
steps:
23+
- name: Get the version
24+
id: get_version
25+
shell: bash
26+
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
27+
- name: Get Plugin Name
28+
id: get_name
29+
shell: bash
30+
run: echo ::set-output name=NAME::QvPlugin-NaiveProxy
31+
- name: Checking out sources
32+
uses: actions/checkout@master
33+
- name: Install Python 3.7 version
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: '3.7'
37+
- name: Restoring submodules
38+
run: git submodule update --init
39+
# =========================================================================================================
40+
- name: Install MSVC compiler
41+
if: matrix.platform == 'windows-latest'
42+
uses: ilammy/msvc-dev-cmd@v1
43+
with:
44+
toolset: 14.2
45+
arch: x64
46+
- name: Cache Qt
47+
id: cache-qt
48+
uses: actions/cache@v1
49+
with:
50+
path: ../Qt
51+
key: QtCache-${{ matrix.platform }}-${{ matrix.qt_version }}
52+
- name: Installing Qt - ${{ matrix.arch }}
53+
uses: jurplel/install-qt-action@v2
54+
with:
55+
version: ${{ matrix.qt_version }}
56+
arch: ${{ matrix.qtarch }}
57+
cached: ${{ steps.cache-qt.outputs.cache-hit }}
58+
# =========================================================================================================
59+
- name: Linux - ${{ matrix.qt_version }} - Build preparation - Install Packages
60+
if: matrix.platform == 'ubuntu-20.04'
61+
run: |
62+
sudo apt update
63+
sudo apt install -y libgl-dev libx11-dev libxkbcommon-x11-dev libxcb-image0-dev libxcb-icccm4-dev libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0
64+
# ========================================================================================================= Generate MakeFile and Build
65+
- name: Windows - ${{ matrix.qt_version }} - Generate Dependencies and Build
66+
shell: bash
67+
if: matrix.platform == 'windows-latest'
68+
env:
69+
CC: cl.exe
70+
CXX: cl.exe
71+
run: |
72+
mkdir build
73+
cd build
74+
cmake .. -DCMAKE_BUILD_TYPE=Release -A x64 -DQVPLUGIN_USE_QT6=ON
75+
cmake --build . --parallel $(nproc) --config Release
76+
# --------------------------------------------------------
77+
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build
78+
shell: bash
79+
if: matrix.platform == 'macos-latest'
80+
run: |
81+
mkdir build
82+
cd build
83+
cmake .. -DCMAKE_BUILD_TYPE=Release -DQVPLUGIN_USE_QT6=ON
84+
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
85+
# --------------------------------------------------------
86+
- name: Linux - ${{ matrix.qt_version }} - Generate Dependencies and Build
87+
if: matrix.platform == 'ubuntu-20.04'
88+
shell: bash
89+
env:
90+
CC: gcc-7
91+
CXX: g++-7
92+
CXXFLAGS: -fno-sized-deallocation
93+
run: |
94+
mkdir build
95+
cd build
96+
cmake .. -DCMAKE_BUILD_TYPE=Release -DQVPLUGIN_USE_QT6=ON
97+
cmake --build . --parallel $(nproc)
98+
# ========================================================================================================= Deployments
99+
- name: Win - ${{ matrix.qt_version }} - Uploading artifact
100+
if: matrix.platform == 'windows-latest'
101+
uses: actions/upload-artifact@master
102+
with:
103+
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.Windows.Qt${{ matrix.qt_version }}.dll
104+
path: build/Release/${{ steps.get_name.outputs.NAME }}.dll
105+
- name: Win - ${{ matrix.qt_version }} - Upload binaries to release
106+
uses: svenstaro/upload-release-action@v1-release
107+
if: github.event_name == 'release' && matrix.platform == 'windows-latest'
108+
with:
109+
repo_token: ${{ secrets.GITHUB_TOKEN }}
110+
file: build/Release/${{ steps.get_name.outputs.NAME }}.dll
111+
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.Windows.Qt6.dll
112+
tag: ${{ github.ref }}
113+
overwrite: true
114+
# --------------------------------------------------------
115+
- name: macOS - ${{ matrix.qt_version }} - Uploading Artifact
116+
if: matrix.platform == 'macos-latest'
117+
uses: actions/upload-artifact@master
118+
with:
119+
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.macOS.Qt${{ matrix.qt_version }}.so
120+
path: build/lib${{ steps.get_name.outputs.NAME }}.so
121+
- name: macOS - ${{ matrix.qt_version }} - Upload binaries to release
122+
uses: svenstaro/upload-release-action@v1-release
123+
if: github.event_name == 'release' && matrix.platform == 'macos-latest'
124+
with:
125+
repo_token: ${{ secrets.GITHUB_TOKEN }}
126+
file: build/lib${{ steps.get_name.outputs.NAME }}.so
127+
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.macOS.Qt6.so
128+
tag: ${{ github.ref }}
129+
overwrite: true
130+
# --------------------------------------------------------
131+
- name: Linux - ${{ matrix.qt_version }} - Uploading artifact
132+
if: matrix.platform == 'ubuntu-20.04'
133+
uses: actions/upload-artifact@master
134+
with:
135+
name: ${{ steps.get_name.outputs.NAME }}-${{ github.sha }}.Linux.Qt${{ matrix.qt_version }}.so
136+
path: build/lib${{ steps.get_name.outputs.NAME }}.so
137+
- name: Linux - ${{ matrix.qt_version }} - Upload binaries to release
138+
uses: svenstaro/upload-release-action@v1-release
139+
if: github.event_name == 'release' && matrix.platform == 'ubuntu-20.04'
140+
with:
141+
repo_token: ${{ secrets.GITHUB_TOKEN }}
142+
file: build/lib${{ steps.get_name.outputs.NAME }}.so
143+
asset_name: ${{ steps.get_name.outputs.NAME }}.${{ steps.get_version.outputs.VERSION }}.Linux.Qt6.so
144+
tag: ${{ github.ref }}
145+
overwrite: true

.github/workflows/build-simpleplugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
shell: bash
9797
env:
9898
CC: gcc-7
99-
CXX: gcc-7
99+
CXX: g++-7
100100
CXXFLAGS: -fno-sized-deallocation
101101
run: |
102102
mkdir build

0 commit comments

Comments
 (0)