Skip to content

Commit 5d30e69

Browse files
author
fft
committed
add github actions for build win/deb packages
1 parent 67b47ea commit 5d30e69

6 files changed

Lines changed: 174 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ubuntu_release
2+
3+
on:
4+
push:
5+
branches: [ experimental ]
6+
pull_request:
7+
branches: [ experimental ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Qt
22+
uses: jurplel/install-qt-action@v2.14.0
23+
with:
24+
version: 6.2.0
25+
26+
- name: Configure CMake
27+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_QT6=ON
28+
29+
- name: Build
30+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
31+
32+
- name: Package
33+
run: cpack -G DEB
34+
working-directory: ${{github.workspace}}/build
35+
36+
- uses: actions/upload-artifact@v3
37+
with:
38+
name: mytetra_${{github.sha}}.deb
39+
path: ${{github.workspace}}/build/mytetra*.deb
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ubuntu_release_qt5
2+
3+
on:
4+
push:
5+
branches: [ experimental ]
6+
pull_request:
7+
branches: [ experimental ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Qt
22+
uses: jurplel/install-qt-action@v2.14.0
23+
with:
24+
version: 5.15.2
25+
26+
- name: Configure CMake
27+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_QT6=OFF
28+
29+
- name: Build
30+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
31+
32+
- name: Package
33+
run: cpack -G DEB
34+
working-directory: ${{github.workspace}}/build
35+
36+
- uses: actions/upload-artifact@v3
37+
with:
38+
name: mytetra_qt5_${{github.sha}}.deb
39+
path: ${{github.workspace}}/build/mytetra*.deb
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: windows_release
2+
3+
on:
4+
push:
5+
branches: [ experimental ]
6+
pull_request:
7+
branches: [ experimental ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Qt
22+
uses: jurplel/install-qt-action@v2.14.0
23+
with:
24+
version: 6.2.0
25+
26+
- name: Configure CMake
27+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_SYSTEM_MIMETEX=OFF -DUSE_QT6=ON
28+
29+
- name: Build
30+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
31+
32+
- name: Install
33+
run: cmake --install ${{github.workspace}}/build
34+
35+
- name: Package
36+
run: windeployqt --verbose 2 --no-compiler-runtime ${{github.workspace}}/build/mytetra_distr/mytetra.exe
37+
working-directory: ${{github.workspace}}/build
38+
39+
- uses: actions/upload-artifact@v3
40+
with:
41+
name: mytetra_${{github.sha}}
42+
path: ${{github.workspace}}/build/mytetra_distr/
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: windows_release_qt5
2+
3+
on:
4+
push:
5+
branches: [ experimental ]
6+
pull_request:
7+
branches: [ experimental ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Qt
22+
uses: jurplel/install-qt-action@v2.14.0
23+
with:
24+
version: 5.15.2
25+
26+
- name: Configure CMake
27+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_SYSTEM_MIMETEX=OFF -DUSE_QT6=OFF
28+
29+
- name: Build
30+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
31+
32+
- name: Install
33+
run: cmake --install ${{github.workspace}}/build
34+
35+
- name: Package
36+
run: windeployqt --verbose 2 --no-compiler-runtime ${{github.workspace}}/build/mytetra_distr/mytetra.exe
37+
working-directory: ${{github.workspace}}/build
38+
39+
- uses: actions/upload-artifact@v3
40+
with:
41+
name: mytetra_qt5_${{github.sha}}
42+
path: ${{github.workspace}}/build/mytetra_distr/

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1919
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /permissive-") #`/permissive-` somewhy required for Qt5 build
2020

2121
set(WIN_INSTALL_DIR "${CMAKE_BINARY_DIR}/mytetra_distr/")
22+
23+
# add necessary MSVC libraries to windows package. windeployqt will add necessary Qt-related libraries.
24+
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${WIN_INSTALL_DIR}")
25+
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
26+
include(InstallRequiredSystemLibraries)
2227
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
2328
set(GCC_WARNS "-Wall -Wextra -Werror")
2429
set(CMAKE_C_FLAGS_DEBUG "${GCC_WARNS} -O0 -ggdb3")

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ MyTetra - smart manager for information collecting
44
MyTetra is open source and cross platform personal manager for information accumulation.
55
It is powerful program for data memorization and structuring notes.
66

7+
Build status
8+
======================
9+
![ubuntu build](https://github.com/fftmp-forked/mytetra_dev/actions/workflows/ubuntu_release.yml/badge.svg?branch=experimental)
10+
![ubuntu Qt5 build](https://github.com/fftmp-forked/mytetra_dev/actions/workflows/ubuntu_release_qt5.yml/badge.svg?branch=experimental)
11+
12+
![windows build](https://github.com/fftmp-forked/mytetra_dev/actions/workflows/windows_release.yml/badge.svg?branch=experimental)
13+
![windows Qt5 build](https://github.com/fftmp-forked/mytetra_dev/actions/workflows/windows_release_qt5.yml/badge.svg?branch=experimental)
714

815
Repository mytetra_dev
916
======================

0 commit comments

Comments
 (0)