Fix some compilation errors caused by recent merges #305
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: Build | |
| on: | |
| push: | |
| branches: | |
| - "QT6WIP" | |
| jobs: | |
| buildlinux: | |
| name: Linux x64 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Prepare Environment | |
| run: | | |
| sudo apt-get install libxcb-icccm4 libxcb-image0 libxcb-cursor0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-randr0 libxkbcommon-x11-0 libfuse2 | |
| - name: Prepare Qt Libraries | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.10' | |
| modules: 'qtserialbus qtserialport' | |
| - name: Clone | |
| uses: actions/checkout@v3 | |
| - name: Compile | |
| run: | | |
| cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release | |
| cmake --build ${{github.workspace}}/build --config Release -j`grep -c ^processor /proc/cpuinfo` | |
| mv ${{github.workspace}}/build/SavvyCAN ${{github.workspace}} | |
| - name: Package | |
| run: | | |
| wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
| chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
| ./linuxdeployqt-continuous-x86_64.AppImage ./SavvyCAN.desktop -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so,canbus | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: SavvyCAN-Linux_x64.AppImage | |
| path: SavvyCAN-*x86_64.AppImage | |
| buildmacos86: | |
| name: macOS x64 | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Prepare macOS Environment | |
| run: | | |
| brew install cmake | |
| brew install qt@6 | |
| brew link qt@6 --force | |
| - name: Clone | |
| uses: actions/checkout@v3 | |
| - name: Compile | |
| run: | | |
| cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release | |
| cmake --build ${{github.workspace}}/build --config Release -j`sysctl kern.aioprocmax | awk '{print $2}'` | |
| mv ${{github.workspace}}/build/SavvyCAN.app ${{github.workspace}} | |
| - name: Package | |
| run: | | |
| mkdir -p build/SavvyCAN.app/Contents/MacOS/help | |
| mkdir -p build/SavvyCAN.app/Frameworks | |
| cp -R help/* build/SavvyCAN.app/Contents/MacOS/help | |
| cp /usr/local/share/qt/plugins/canbus/* build/SavvyCAN.app/Frameworks | |
| macdeployqt build/SavvyCAN.app -dmg | |
| mv build/SavvyCAN.dmg ./SavvyCAN_x64.dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: SavvyCAN-macOS_x64.dmg | |
| path: SavvyCAN_x64.dmg | |
| buildmacos-arm64: | |
| name: macOS ARM64 | |
| runs-on: macos-15 | |
| steps: | |
| - name: Prepare macOS Environment | |
| run: | | |
| brew install qt@6 | |
| brew install cmake | |
| brew link qt@6 --force | |
| - name: Clone | |
| uses: actions/checkout@v3 | |
| - name: Compile | |
| run: | | |
| cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release | |
| cmake --build ${{github.workspace}}/build --config Release -j`sysctl kern.aioprocmax | awk '{print $2}'` | |
| - name: Package | |
| run: | | |
| mkdir -p build/SavvyCAN.app/Contents/MacOS/help | |
| cp -R help/* build/SavvyCAN.app/Contents/MacOS/help | |
| macdeployqt build/SavvyCAN.app -dmg | |
| mv build/SavvyCAN.dmg ./SavvyCAN_arm64.dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: SavvyCAN-macOS_ARM64.dmg | |
| path: SavvyCAN_arm64.dmg | |
| buildwindows: | |
| name: Windows x64 | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Prepare Qt Libraries | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.10' | |
| modules: 'qtserialbus qtserialport' | |
| - name: Clone | |
| uses: actions/checkout@v3 | |
| - name: Compile | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release | |
| cmake --build ${{github.workspace}}/build --config Release -j 2 | |
| - name: Package | |
| run: | | |
| mkdir package | |
| copy "build/release/SavvyCAN.exe" package/ | |
| mkdir package/help | |
| copy help/*.md package/help/ | |
| mkdir package/help/images | |
| copy help/images/*.* package/help/images/ | |
| mkdir package/examples | |
| copy examples/*.* package/examples/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6Core.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6Gui.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6Network.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6PrintSupport.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6Qml.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6SerialBus.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6SerialPort.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6Widgets.dll" package/ | |
| copy "${Env:QT_ROOT_DIR}/bin/Qt6OpenGL.dll" package/ | |
| mkdir package/imageformats | |
| copy "${Env:QT_ROOT_DIR}/plugins/imageformats/*.*" package/imageformats/ | |
| mkdir package/platforms | |
| copy "${Env:QT_ROOT_DIR}/plugins/platforms/*.*" package/platforms/ | |
| mkdir package/styles | |
| copy "${Env:QT_ROOT_DIR}/plugins/styles/*.*" package/styles/ | |
| mkdir package/canbus | |
| copy "${Env:QT_ROOT_DIR}/plugins/canbus/*.*" package/canbus/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: SavvyCAN-Windows_x64 | |
| path: package | |
| pre-release: | |
| name: "pre-release" | |
| runs-on: "ubuntu-latest" | |
| needs: [buildwindows, buildmacos86, buildmacos-arm64, buildlinux] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/download-artifact@v4.1.7 | |
| - name: Display structure of downloaded files | |
| run: zip -r SavvyCAN-Windows_x64_CIBuild.zip SavvyCAN-Windows_x64 | |
| - uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "continuous-QT6" | |
| prerelease: true | |
| title: "QT6 Development Build" | |
| files: | | |
| SavvyCAN-Linux_x64.AppImage/SavvyCAN-*x86_64.AppImage | |
| SavvyCAN-Windows_x64_CIBuild.zip | |
| SavvyCAN-macOS_x64.dmg/SavvyCAN_x64.dmg | |
| SavvyCAN-macOS_ARM64.dmg/SavvyCAN_arm64.dmg | |
| notify: | |
| name: Notify Discord | |
| runs-on: ubuntu-latest | |
| needs: [buildwindows, buildmacos86, buildmacos-arm64, buildlinux] | |
| steps: | |
| - id: msg_var | |
| name: remove newlines | |
| run: | | |
| export release_msg=$(cat << EOF | |
| ${{ github.event.head_commit.message }} | |
| EOF | |
| ) | |
| release_msg="${release_msg//$'\n'/'-'}" | |
| release_msg="${release_msg//$'\r'/'-'}" | |
| release_msg="${release_msg//$'('/'-'}" | |
| release_msg="${release_msg//$')'/'-'}" | |
| echo $release_msg | |
| echo "{msg}={$release_msg}" >> $GITHUB_OUTPUT | |
| - name: Notify Discord | |
| run: | | |
| curl -i -H "Accept: application/json" \ | |
| -H "Content-Type:application/json" \ | |
| -X POST \ | |
| --data "{\"content\": null,\"embeds\": [{\"title\": \"${{ github.repository }} QT6 Build Complete\", \"description\": \"${{ steps.msg_var.outputs.msg }} \\nCommit: ${{ github.sha }}\\n[Build Artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts)\", \"color\": 5131997, \"author\": { \"name\": \"Github Builds\" } } ]}" \ | |
| https://discord.com/api/webhooks/${{ secrets.WEBHOOK_ID }}/${{ secrets.WEBHOOK_TOKEN }} |