Skip to content

Switched ci to qt 6.5.2 #98

Switched ci to qt 6.5.2

Switched ci to qt 6.5.2 #98

Workflow file for this run

name: CI
on: [push]
jobs:
windows:
runs-on: windows-latest
strategy:
matrix:
qt-version: ["6.5.2"]
compiler: ["msvc2019_64"]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
host: "windows"
arch: "win64_${{ matrix.compiler }}"
tools: "tools_openssl_x64"
cache: "true"
modules: "qtimageformats qtmultimedia qtpdf qt5compat"
- name: Install Dependencies with Chocolatey
uses: crazy-max/ghaction-chocolatey@v1
with:
args: "install nasm curl"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Setup Sentry CLI
uses: mathieu-bour/[email protected]
with:
token: ${{ SECRETS.SENTRY_TOKEN }}
organization: rophil
project: gm-companion
- name: Install cget
run: pip install cget
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Setup build directory
run: mkdir build
- name: Cache cget dependencies
id: cache-cget
uses: actions/cache@v2
with:
path: build/cget
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('requirements.windows.txt') }}-cget-${{ matrix.qt-version }}-${{ matrix.compiler }}
- name: Init cget
run: cd build && cget init --shared
- name: Install dependencies from requirements.txt
if: steps.cache-cget.outputs.cache-hit != 'true'
run: |
cd build
cget install --release -f ../requirements.windows.txt -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DBUILD_TESTING=OFF
- name: Make
run: |
cd build
cmake .. -D CMAKE_INSTALL_PREFIX=install -D CMAKE_BUILD_TYPE=RelWithDebInfo -DIS_RUNNING_IN_CI=ON
cmake --build . --config RelWithDebInfo --parallel 2
- name: Tests
run: |
cd build
cp ..\..\Qt\Tools\OpenSSL\Win_x64\bin\*.dll .\tests\RelWithDebInfo\
cp .\cget\**\*.dll .\tests\RelWithDebInfo\
ls tests
ls tests\RelWithDebInfo
ctest -C RelWithDebInfo --verbose
- name: Upload debug symbols
run: |
cd build
sentry-cli upload-dif --org rophil --project gm-companion --include-sources app/
- name: Make Install
run: |
cd build
cmake --install . --config RelWithDebInfo
- name: Install CQtDeployer
run: |
curl -L -o .\cqtdeployer-installer.exe https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2295/CQtDeployer_1.6.2295.de25aa3_Windows_AMD64.exe
.\cqtdeployer-installer.exe install -c --al -t ${{ github.workspace }}\cqtdeployer
- name: Download librespot
run: curl -L -o .\build\install\bin\librespot.exe https://github.com/PhilInTheGaps/librespot-bin/releases/download/v0.4.2/librespot-x86_64.exe
- name: Copy OpenSSL DLLs to install folder
run: cp ..\Qt\Tools\OpenSSL\Win_x64\bin\*.dll .\build\install\bin
- name: Deploy
run: ${{ github.workspace }}\cqtdeployer\1.6\CQtDeployer.exe -bin build\install\bin\gm-companion.exe,build\install\bin\librespot.exe -libDir build\cget\bin,build\cget\lib -qmlDir ..\Qt\${{ matrix.qt-version }}\${{ matrix.compiler }}\qml -targetDir build\install\bin
- name: Remove debug info from install folder
run: rm .\build\install\**\*.pdb
- name: Upload Build
uses: actions/upload-artifact@v2
with:
name: gm-companion_${{ runner.os }}
path: .\build\install\bin
if-no-files-found: error
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 20
# with:
# limit-access-to-actor: true
ubuntu:
runs-on: ubuntu-22.04
strategy:
matrix:
qt-version: ["6.5.2"]
compiler: ["gcc_64"]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Install Dependencies
run: |
sudo apt-get update -q
sudo apt-get upgrade -q
sudo apt install -qq mesa-common-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libjpeg-turbo8-dev libtiff-dev libnss3-dev libopenjp2-7-dev libboost-dev libcairo2-dev libcurl4-openssl-dev python3-setuptools patchelf libasound2-dev libsecret-1-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
host: "linux"
arch: "${{ matrix.compiler }}"
target: "desktop"
cache: "true"
modules: "qtimageformats qtmultimedia qtpdf qt5compat"
- name: Setup Sentry CLI
uses: mathieu-bour/[email protected]
with:
token: ${{ SECRETS.SENTRY_TOKEN }}
organization: rophil
project: gm-companion
- name: Install cget
run: sudo pip3 install wheel cget
- name: Setup build directory
run: mkdir build
- name: Cache cget dependencies
id: cache-cget
uses: actions/cache@v2
with:
path: build/cget
key: ${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ runner.arch }}-${{ hashFiles('requirements.ubuntu.txt') }}-cget-${{ matrix.qt-version }}
- name: Build cget dependencies
if: steps.cache-cget.outputs.cache-hit != 'true'
run: |
cd build
cget init --shared
cget install --release -f ../requirements.ubuntu.txt -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DBUILD_TESTING=OFF
- name: Make
run: |
cd build
cmake .. -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_INSTALL_PREFIX=AppDir/usr -DIS_RUNNING_IN_CI=ON
cmake --build . -j2
- name: Tests
run: |
export QT_QPA_PLATFORM="offscreen"
cd build
ctest --output-on-failure
- name: Make Install
run: |
cd build
cmake --install .
- name: Strip and upload debug symbols
run: |
cd build
../deploy/debug/generate-debug-info.sh AppDir/usr/bin/gm-companion
sentry-cli upload-dif --org rophil --project gm-companion --include-sources AppDir/usr/bin/.debug/
rm -rf AppDir/usr/bin/.debug
static-analysis:
runs-on: ubuntu-20.04
strategy:
matrix:
qt-version: ["6.5.2"]
compiler: ["gcc_64"]
env:
SONAR_SCANNER_VERSION: 4.8.0.2856
SONAR_SERVER_URL: "https://sonarcloud.io"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Install Dependencies
run: |
sudo apt-get update -q
sudo apt-get upgrade -q
sudo apt install -qq mesa-common-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libjpeg-turbo8-dev libtiff-dev libnss3-dev libopenjp2-7-dev libboost-dev libcairo2-dev libcurl4-openssl-dev python3-setuptools patchelf libasound2-dev libsecret-1-dev
sudo pip3 install gcovr
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
host: "linux"
arch: "${{ matrix.compiler }}"
target: "desktop"
cache: "true"
modules: "qtimageformats qtmultimedia qtpdf qt5compat"
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Download and set up sonar-scanner
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
run: |
mkdir -p $HOME/.sonar
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
- name: Download and set up build-wrapper
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
run: |
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Install cget
run: sudo pip3 install wheel cget
- name: Setup build directory
run: mkdir build
- name: Cache cget dependencies
id: cache-cget
uses: actions/cache@v2
with:
path: build/cget
key: ${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ runner.arch }}-${{ hashFiles('requirements.ubuntu.txt') }}-cget-${{ matrix.qt-version }}
- name: Build cget dependencies
if: steps.cache-cget.outputs.cache-hit != 'true'
run: |
cd build
cget init --shared
cget install --release -f ../requirements.ubuntu.txt -DCMAKE_BUILD_PARALLEL_LEVEL=2 -DBUILD_TESTING=OFF
- name: Run build-wrapper
run: |
cd build
cmake .. -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=AppDir/usr -DIS_RUNNING_IN_CI=ON -DENABLE_CODE_COVERAGE=ON
build-wrapper-linux-x86-64 --out-dir bw-output cmake --build . -j2
- name: Tests
run: |
export QT_QPA_PLATFORM="offscreen"
cd build
ctest --output-on-failure
- name: Generate GCOV Report
run: |
cd build
gcovr --keep --print-summary
- name: Cache sonar analysis
id: cache-sonar-analysis
uses: actions/cache@v2
with:
path: sonar-cache
key: ${{ runner.os }}-SonarAnalysis
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner