Add clang-format style check #418
Workflow file for this run
This file contains 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: Frontend build, and deploy to GitHub Pages | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
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: 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: 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 |