Skip to content

150-add-tests-to-step-summary-in-workflow #530

150-add-tests-to-step-summary-in-workflow

150-add-tests-to-step-summary-in-workflow #530

Workflow file for this run

name: Frontend build, and deploy to GitHub Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CLANG_VERSION: 17
EMSDK_VERSION: 3.1.37
QT_VERSION: 6.6.1
QT_ROOT: ${{ github.workspace }}/Qt
CONAN_VERSION: 2.0.14
AQT_VERSION: ==3.1.11
PY7ZR_VERSION: ==0.20.2
jobs:
build:
timeout-minutes: 120
strategy:
matrix:
build_profile: [desktop_dev, desktop_release, wasm_release]
concurrency:
group: AppBuild-${{ github.workflow }}-${{ github.ref }}-${{ matrix.build_profile }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ env.CLANG_VERSION }} all
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: 16
- name: Install latest cmake and ninja
uses: lukka/get-cmake@latest
- name: Install Conan package manager
uses: turtlebrowser/get-conan@main
with:
version: ${{ env.CONAN_VERSION }}
- name: Install Qt gcc_64
uses: jurplel/install-qt-action@v3
with:
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'gcc_64'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true
- name: Install Emsdk
if: matrix.build_profile == 'wasm_release'
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSDK_VERSION }}
no-cache: true
- name: Install Qt wasm multithread
if: matrix.build_profile == 'wasm_release'
uses: jurplel/install-qt-action@v3
with:
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'wasm_singlethread'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true
- name: Create default Conan profile
run: conan profile detect
- name: Conan install dependencies
run: ./project.py --install --preset ${{ matrix.build_profile }}
- name: CMake configure
run: ./project.py --configure --preset ${{ matrix.build_profile }}
- name: Cmake build
run: ./project.py --build --preset ${{ matrix.build_profile }}
- name: CTest
if: matrix.build_profile != 'wasm_release'
run: ./project.py --test --preset ${{ matrix.build_profile }}
- name: Test Report
if: success() || failure()
uses: dorny/test-reporter@v1
with:
name: CTest Results
path: build/${{ matrix.build_profile }}/ctest.xml
reporter: junit
- name: Upload artifact
if: matrix.build_profile == 'wasm_release' && github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-pages-artifact@v3
with:
path: ${{github.workspace}}/build/wasm_release/deploy
deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4