Skip to content

Commit

Permalink
Add improved workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
rear1019 committed Feb 7, 2025
1 parent 6876d22 commit da6cd8f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build QLiteHtmlBrowser

on:
push:
branches:
- main
- qt6

tags:
- "v*"

pull_request:

workflow_call:


jobs:
check-formatting:
name: Check code formatting
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'include'
- 'src'
- 'test'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run clang-format formatting check
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: ${{ matrix.path }}

build:
needs: check-formatting
name: Build and run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install qt6-base-dev ninja-build
- name: Run CMake
run: cmake -B ${{github.workspace}}/build -GNinja -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
env:
QT_QPA_PLATFORM: offscreen
working-directory: ${{github.workspace}}/build
run: ctest -V -E NOT_BUILT

0 comments on commit da6cd8f

Please sign in to comment.