forked from QuiteRSS/quiterss
-
Notifications
You must be signed in to change notification settings - Fork 6
84 lines (82 loc) · 2.69 KB
/
cmake-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CMake build with gcc in windows
on:
push:
paths-ignore:
- '.github/**'
- 'data/ca-bundle.crt'
- 'README.md'
branches:
- master
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install toolchain and Qt libraries
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: git make upx p7zip mingw-w64-${{matrix.env}}-toolchain mingw-w64-${{matrix.env}}-qt5 mingw-w64-${{matrix.env}}-qtwebkit mingw-w64-${{matrix.env}}-pkgconf mingw-w64-${{matrix.env}}-cmake
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../
- name: Build
working-directory: ./build
run: |
cmake --build ./
- name: Deploy - copy to dist
run: |
mkdir -p dist
cp -rf build/QuiteRSS.exe ./dist/
cp -rf build/lang/ ./dist/
- name: Deploy - Qt
run: |
windeployqt --no-opengl-sw --no-angle --no-system-d3d-compiler --force ./dist/QuiteRSS.exe
- name: Deploy - mingw
run: |
cp $MSYSTEM_PREFIX/bin/libcrypto-*.dll ./dist/
cp $MSYSTEM_PREFIX/bin/libssl-*.dll ./dist/
ldd ./dist/QuiteRSS.exe | grep "=> /" | grep ${{matrix.sys}} | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./dist/
- name: Deploy - Qt imageformats dependency
working-directory: ./dist/
run: |
find ./imageformats/ -name "*.dll" -exec ldd {} \; | grep "=> /" | grep ${{matrix.sys}} | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./
- name: Deploy - strip
run: |
find ./dist/ -name '*.dll' -exec strip {} \;
find ./dist/ -name '*.exe' -exec strip {} \;
- name: Deploy - resource
run: |
cp -rvf ./sound ./dist/
cp -rvf ./style ./dist/
touch ./dist/portable.dat
- name: Deploy - upx
run: |
upx --best --brute --ultra-brute -v ./dist/QuiteRSS.exe
- name: Deploy - create file name
run: |
echo "filename=QuiteRss-gcc-${{matrix.env}}-$(date +"%Y%m%d_%H%M%S")" >> $GITHUB_ENV
- name: Deploy - 7z archive
run: |
7z a -mx=9 ${{ env.filename }}.7z ./dist/*
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.filename }}.7z
path: ${{ env.filename }}.7z