Skip to content

fix: EPMCLI example missing QCoreApplication caused unreliable path r… #97

fix: EPMCLI example missing QCoreApplication caused unreliable path r…

fix: EPMCLI example missing QCoreApplication caused unreliable path r… #97

Workflow file for this run

name: CMake Build
on: [push, pull_request]
jobs:
build-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-latest]
qt_version: ['6.9.2', '6.10.0']
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ninja-build \
libgl1-mesa-dev \
mesa-common-dev \
libxkbcommon-x11-0 \
libxcb-xinerama0-dev \
libxcb-cursor-dev \
libxcb-icccm4-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libusb-1.0-0-dev \
libusb-dev \
uuid-dev \
libpulse-dev \
python3-pip
- name: Set Qt install path
run: |
echo "QT_ROOT_DIR=${{ github.workspace }}/${{ matrix.qt_version }}/gcc_64" >> $GITHUB_ENV
echo "${{ github.workspace }}/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_PATH
- name: Cache Qt ${{ matrix.qt_version }}
id: cache-qt
uses: actions/cache@v5
with:
path: ${{ env.QT_ROOT_DIR }}
key: ${{ runner.os }}-qt-${{ matrix.qt_version }}
- name: Install Qt ${{ matrix.qt_version }}
if: steps.cache-qt.outputs.cache-hit != 'true'
run: |
pip install aqtinstall
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64 -m qtmultimedia qtserialport
- name: Configure CMake (${{ matrix.build_type }})
run: |
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}/lib/cmake"
- name: Build (${{ matrix.build_type }})
run: cmake --build build --config ${{ matrix.build_type }}
build-windows:
runs-on: windows-2022
strategy:
matrix:
qt_version: ['6.9.2', '6.10.0']
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v6
- name: Set Qt install path
shell: pwsh
run: |
$qtRoot = "C:\Qt\${{ matrix.qt_version }}\msvc2022_64"
echo "QT_ROOT_DIR=$qtRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$qtRoot\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Cache Qt ${{ matrix.qt_version }}
id: cache-qt
uses: actions/cache@v5
with:
path: ${{ env.QT_ROOT_DIR }}
key: ${{ runner.os }}-qt-${{ matrix.qt_version }}
- name: Install Qt ${{ matrix.qt_version }}
if: steps.cache-qt.outputs.cache-hit != 'true'
shell: pwsh
run: |
pip install aqtinstall
aqt install-qt windows desktop ${{ matrix.qt_version }} win64_msvc2022_64 `
--outputdir "C:\Qt" `
-m qtserialport qtmultimedia qtactiveqt
- name: Configure CMake (${{ matrix.build_type }})
shell: pwsh
run: |
cmake -B build `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-DCMAKE_PREFIX_PATH="$env:QT_ROOT_DIR\lib\cmake"
- name: Build (${{ matrix.build_type }})
shell: pwsh
run: cmake --build build --config ${{ matrix.build_type }} --parallel