-
Notifications
You must be signed in to change notification settings - Fork 17
173 lines (167 loc) · 6.95 KB
/
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: FastTrack_build
on:
push:
branches: [master]
env:
QT_VERSION: 6.6.0
OPENCV_VERSION: 4.8.0
OPENCV_VERSION_: 480
jobs:
build_linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_opencv
run: |
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install mesa-common-dev libgl1-mesa-dev libssl-dev
sudo apt-get install libxcb-*
sudo apt-get install libxkb-*
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libnss3
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install libopencv-dev
- name: install_qt6
run: |
pip install aqtinstall
python3 -m aqt install-qt -O ${{ github.workspace }}/Qt/ linux desktop ${{ env.QT_VERSION }}
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin/ >> $GITHUB_PATH
- name: build_ft
run: |
./run.sh ci
- name: build_appimage
run: |
cd build
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
mkdir appdir
cp ../sh.fasttrack.fasttrack.desktop appdir
cp ../src/assets/fasttrack.png appdir
cp fasttrack appdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/lib/
chmod +x deploy.AppImage
./deploy.AppImage appdir/fasttrack -bundle-non-qt-libs -unsupported-allow-new-glibc -qmake=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/bin/qmake6 -extra-plugins=platforms/,sqldrivers/ -exclude-libs=libgmodule-2.0.so
mkdir -p appdir/usr/share/fasttrack/
cp *.qm appdir/usr/share/fasttrack
wget -O tool.AppImage https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
chmod +x tool.AppImage
./tool.AppImage appdir/
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-x86_64.AppImage
path: ./build/FastTrack-x86_64.AppImage
build_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_qt
run: |
choco uninstall mingw
pip install aqtinstall
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ windows desktop ${{ env.QT_VERSION }} win64_mingw
python3 -m aqt install-tool -O ${{ github.workspace }}/Qt/ windows desktop tools_mingw90
echo "${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/mingw_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{ github.workspace }}/Qt/Tools/mingw1120_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install_opencv
run: |
choco install wget unzip
wget https://github.com/FastTrackOrg/Windows_MinGW_64_OpenCV/releases/download/${{ env.OPENCV_VERSION }}/OpenCV_MinGW_64.zip
unzip OpenCV_MinGW_64.zip -d ${{ github.workspace }}
- name: build_ft
run: |
cd src/
qmake FastTrack.pro -spec win32-g++ CONFIG+=release
mingw32-make
cd build/
mkdir FastTrack
cp FastTrack.exe FastTrack
windeployqt FastTrack/FastTrack.exe --no-translations # https://bugreports.qt.io/browse/QTBUG-62103?jql=status%20%3D%20Open%20AND%20text%20~%20%22windeployqt%20platform%22 and https://bugreports.qt.io/browse/QTBUG-112204
cp ..\assets\icon.ico FastTrack
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libgomp-1.dll FastTrack
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/opencv_videoio_ffmpeg${{ env.OPENCV_VERSION_ }}_64.dll FastTrack
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/libopencv_world${{ env.OPENCV_VERSION_ }}.dll FastTrack
cp *.qm FastTrack
- name: upload_artefact
uses: actions/upload-artifact@v1
with:
name: FastTrack
path: src/build/FastTrack
build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_qt
run: |
pip install aqtinstall
python3 -m aqt install-qt -m qtcharts -O ${{ github.workspace }}/Qt/ mac desktop ${{ env.QT_VERSION }}
echo ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/bin/ >> $GITHUB_PATH
- name: Set up Homebrew #https://github.com/Homebrew/homebrew-cask/issues/150323
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: install_opencv
run: |
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
rm -f /usr/local/opt/go/bin/go*
rm -f /usr/local/bin/go*
brew update -q -f
brew upgrade -q -f
brew install pkg-config
brew install openssl
brew unlink unixodbc
brew install libiodbc
brew tap FastTrackOrg/fasttrack
brew install --build-from-source FastTrackOrg/fasttrack/opencv
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
- name: build_ft
run: |
qmake src/FastTrack.pro CONFIG+=release
make
cd build/
macdeployqt FastTrack.app -always-overwrite
wget https://raw.githubusercontent.com/arl/macdeployqtfix/master/macdeployqtfix.py
cp *.qm FastTrack.app/Contents/Resources/
#python2.7 macdeployqtfix.py FastTrack.app/Contents/MacOS/FastTrack ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack -srcfolder FastTrack.app -ov -format UDZO FastTrack.dmg
- name: upload_artefact
uses: actions/upload-artifact@v1
with:
name: FastTrack.dmg
path: ./build/FastTrack.dmg
upload_builds:
needs: [build_linux, build_win, build_mac]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: create_dir
run: |
mkdir ./tmp/
- uses: actions/download-artifact@v2
with:
path: ./tmp/
- name: install_SSH_key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.KEY }}
known_hosts: ${{ secrets.HOST }}
- name: upload_builds_to_server
run: |
cd tmp/FastTrack/
zip -r FastTrack.zip ./*
cd ..
mkdir rel/
mv FastTrack/FastTrack.zip ./rel
rm -r ./FastTrack
cp FastTrack*/* ./rel
rsync ./rel/* ${{ secrets.USER }}@${{ secrets.ADDRESS }}:${{ secrets.PATH }}