-
Notifications
You must be signed in to change notification settings - Fork 17
165 lines (159 loc) · 6.9 KB
/
build_cli.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
name: FastTrack-Cli_build
on:
push:
branches: [master]
env:
QT_VERSION: 6.5.2
OPENCV_VERSION: 4.8.0
OPENCV_VERSION_: 480
jobs:
build_linux:
runs-on: ubuntu-20.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_ftcli
run: |
./run.sh cli
make clean
- name: build_appimage
run: |
wget -O deploy.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod +x deploy.AppImage
cp sh.fasttrack.fasttrackcli.desktop build_cli/
cp src/assets/fasttrack.png build_cli/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64/lib/
./deploy.AppImage build_cli/fasttrack-cli -appimage -no-translations -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
mv FastTrack*.AppImage FastTrack-cli-x86_64.AppImage
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-cli-x86_64.AppImage
path: ./FastTrack-cli-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_qt6
run: |
choco uninstall mingw
pip install aqtinstall
python3 -m aqt install-qt -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_ftcli
run: |
cd src/
qmake FastTrack-Cli.pro -spec win32-g++ CONFIG+=release
mingw32-make
mingw32-make clean
chmod -777 build_cli
cd build_cli/
windeployqt FastTrack-Cli.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 .
cp ${{ github.workspace }}/Qt/Tools/mingw*/bin/libgomp-1.dll .
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/opencv_videoio_ffmpeg${{ env.OPENCV_VERSION_ }}_64.dll .
cp ${{ github.workspace }}/OpenCV_MinGW_64/bin/libopencv_world${{ env.OPENCV_VERSION_ }}.dll .
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-Cli
path: src/build_cli/
build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install_qt6
run: |
pip install aqtinstall
python3 -m aqt install-qt -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_ftcli
run: |
qmake CONFIG+=release src/FastTrack-Cli.pro
make
cd build_cli/
macdeployqt FastTrack-cli.app -always-overwrite
wget https://raw.githubusercontent.com/arl/macdeployqtfix/master/macdeployqtfix.py
python2.7 macdeployqtfix.py FastTrack-cli.app/Contents/MacOS/FastTrack-cli ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack-cli -srcfolder FastTrack-cli.app -ov -format UDZO FastTrack-cli.dmg
- name: upload_artefact
uses: actions/upload-artifact@v2
with:
name: FastTrack-cli.dmg
path: ./build_cli/FastTrack-cli.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/
- name: install_SSH_key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.KEY }}
known_hosts: ${{ secrets.HOST }}
- uses: actions/download-artifact@v2
with:
path: ./tmp/
- name: upload_builds_to_server
run: |
cd tmp/FastTrack-Cli/
zip -r FastTrack-Cli.zip ./*
cd ..
mkdir rel/
mv FastTrack-Cli/FastTrack-Cli.zip ./rel
rm -r ./FastTrack-Cli
cp FastTrack*/* ./rel
rsync ./rel/* ${{ secrets.USER }}@${{ secrets.ADDRESS }}:${{ secrets.PATH }}