Update build_linux_amd.yml #29
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 and Package Application with Qt Libraries | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Qt 5.12.12 | |
| uses: jurplel/install-qt-action@v2 | |
| with: | |
| version: '5.12.12' | |
| host: linux | |
| arch: desktop | |
| modules: 'qtserialport qtsql' | |
| - name: Configure Qt Project | |
| run: | | |
| mkdir -p build | |
| cd build | |
| qmake ../ -spec linux-g++ CONFIG+=release | |
| - name: Build Project | |
| run: | | |
| cd build | |
| make VERBOSE=1 || (cat Makefile && exit 1) | |
| - name: Collect Qt Libraries | |
| run: | | |
| cd build | |
| ldd SerialPortDebugger > /tmp/ldd-output.txt | |
| cd /tmp | |
| tar -czvf QtLibraries.tar.gz ldd-output.txt | |
| - name: Package Application and Libraries | |
| run: | | |
| cd build | |
| tar -czvf Application_and_Libraries.tar.gz SerialPortDebugger /tmp/QtLibraries.tar.gz | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Application-and-Libraries | |
| path: build/Application_and_Libraries.tar.gz | |
| - name: Clean up | |
| run: | | |
| rm -rf /tmp/ldd-output.txt /tmp/QtLibraries.tar.gz |