ubuntu.yml を更新 #5
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 Upload Qt6 Static Application | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake perl python3 git | |
| sudo apt-get install -y libgl1-mesa-dev libxkbcommon-x11-dev | |
| - name: Download Qt source code | |
| run: | | |
| git clone https://code.qt.io/qt/qt5.git | |
| cd qt5 | |
| git checkout v6.5.0 | |
| perl init-repository | |
| - name: Build Qt statically | |
| run: | | |
| cd qt5 | |
| mkdir build | |
| cd build | |
| ../configure -static -prefix $PWD/qtbase -release -opensource -confirm-license -nomake examples -nomake tests | |
| make -j$(nproc) | |
| make install | |
| - name: Build the application | |
| run: | | |
| export PATH=$PWD/qt5/build/qtbase/bin:$PATH | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_PREFIX_PATH=$PWD/qt5/build/qtbase .. | |
| make | |
| - name: Archive the build artifacts | |
| uses: actions/upload-artifact@latest | |
| with: | |
| name: app | |
| path: build/app_executable_name |