mirror of
https://github.com/fwbuilder/fwbuilder
synced 2025-06-15 06:37:26 +02:00
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: Linux
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
debug-unit_tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- {
|
|
id: 'ubuntu-22.04-qt6',
|
|
name: "Ubuntu 22.04",
|
|
docker_image: "fwbuilder/ubuntu:22.04",
|
|
unit_tests: true,
|
|
qt6: true,
|
|
}
|
|
- {
|
|
id: 'ubuntu-22.04-qt5',
|
|
name: "Ubuntu 22.04",
|
|
docker_image: "fwbuilder/ubuntu:22.04",
|
|
unit_tests: true,
|
|
qt6: false,
|
|
}
|
|
# - {
|
|
# id: 'ubuntu-20.04',
|
|
# name: "Ubuntu 20.04",
|
|
# docker_image: "fwbuilder/ubuntu:20.04",
|
|
# unit_tests: true,
|
|
# qt6: false,
|
|
# }
|
|
# - {
|
|
# id: 'ubuntu-18.04',
|
|
# name: "Ubuntu 18.04",
|
|
# docker_image: "fwbuilder/ubuntu:18.04",
|
|
# unit_tests: true,
|
|
# qt6: false,
|
|
# }
|
|
container:
|
|
image: ${{ matrix.config.docker_image }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Compilation cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.ccache
|
|
key: ${{ matrix.config.id }}-ccache-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ matrix.config.id }}-ccache
|
|
- name: Configure (Qt6)
|
|
if: ${{ matrix.config.qt6 == true }}
|
|
run: |
|
|
mkdir -p build && cd build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -DUseQt6=ON
|
|
- name: Configure (Qt5)
|
|
if: ${{ matrix.config.qt6 == false }}
|
|
run: |
|
|
mkdir -p build && cd build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
|
- name: Build
|
|
run: |
|
|
cd build
|
|
make -j$(nproc)
|
|
make install
|
|
- name: Run unit tests
|
|
if: ${{ matrix.config.unit_tests == true }}
|
|
run: |
|
|
cd build
|
|
QT_QPA_PLATFORM=vnc ctest --verbose
|