[feat] ci: simplify ci #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: FastTrack_build | |
| on: | |
| workflow_dispatch: | |
| env: | |
| QT_VERSION: 6.7.2 | |
| OPENCV_VERSION: 4.10.0 | |
| OPENCV_VERSION_: 4100 | |
| build_mac: | |
| runs-on: macos-14 | |
| 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 | |
| rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlmimer.* | |
| rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlodbc.* | |
| rm -r ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos/plugins/sqldrivers/libqsqlpsql.* | |
| - 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* | |
| rm -rf /usr/local/lib/node* | |
| brew update -q -f | |
| brew upgrade -q -f | |
| brew install pkg-config | |
| brew install openssl | |
| 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/refs/heads/master/macdeployqtfix.py | |
| cp *.qm FastTrack.app/Contents/Resources/ | |
| find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true | |
| find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true | |
| find / -name "libjxl_cms.0.11.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true | |
| cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt! | |
| cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt! | |
| cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt! | |
| python 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@v4 | |
| with: | |
| name: FastTrack.dmg | |
| path: ./build/FastTrack.dmg |