Skip to content

Commit 90f9c34

Browse files
committed
CI
1 parent 488d089 commit 90f9c34

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-24.04
12+
13+
strategy:
14+
matrix:
15+
build_type:
16+
- Debug
17+
- Release
18+
compiler:
19+
- cxx: g++
20+
cc: gcc
21+
- cxx: clang++
22+
cc: clang
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install dependencies
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y ninja-build catch2 qt6-base-dev
31+
32+
- name: Configure CMake
33+
env:
34+
CC: ${{matrix.compiler.cc}}
35+
CXX: ${{matrix.compiler.cxx}}
36+
run: |
37+
cmake . -B build -G Ninja \
38+
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
39+
-Deverload_tags_TEST=ON \
40+
-Deverload_tags_BUILD_TESTING_APP=ON
41+
42+
- name: Build
43+
run: ninja -C build
44+
45+
- name: Run tests
46+
run: ./build/test_everload_tags
47+
48+
- name: Test installation
49+
run: |
50+
cmake --install build --prefix install_test
51+
ls -la install_test/
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-24.04
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Qt
17+
uses: jurplel/install-qt-action@v4
18+
with:
19+
version: ${{ '6.6.1' }}
20+
host: 'linux'
21+
target: 'desktop'
22+
arch: 'gcc_64'
23+
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y ninja-build clang-19 llvm-19-dev
28+
29+
- name: Set a default clang compiler
30+
run: |
31+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
32+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
33+
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-19 100
34+
35+
- name: Prepare Python virtualenv
36+
run: |
37+
python -m venv venv
38+
source venv/bin/activate
39+
pip install PySide6==6.6.1 PySide6_Addons==6.6.1 PySide6_Essentials==6.6.1 shiboken6==6.6.1 shiboken6_generator==6.6.1
40+
41+
- name: Configure CMake
42+
run: |
43+
source venv/bin/activate
44+
cmake . -B build -G Ninja \
45+
-DCMAKE_BUILD_TYPE=Release \
46+
-Deverload_tags_TEST=OFF \
47+
-Deverload_tags_BUILD_TESTING_APP=ON \
48+
-Deverload_tags_BUILD_PYTHON_BINDINGS=ON
49+
50+
- name: Build
51+
run: |
52+
source venv/bin/activate
53+
ninja -C build
54+
55+
- name: Install
56+
run: |
57+
source venv/bin/activate
58+
cmake --install build --prefix py/EverloadTags
59+
60+
- name: Run
61+
run: |
62+
source venv/bin/activate
63+
export QT_QPA_PLATFORM=offscreen
64+
timeout 3s env LD_LIBRARY_PATH=$VIRTUAL_ENV/lib/python3.13/site-packages/PySide6 python py/demo.py || rc=$?
65+
if [[ $rc -ne 124 ]]; then exit 1; fi

0 commit comments

Comments
 (0)