-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20def01
commit c4f0eeb
Showing
3 changed files
with
90 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: build and test with Qt6 | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: setup environment | ||
run: | | ||
sudo apt-get install --no-install-recommends \ | ||
cmake \ | ||
g++ \ | ||
git \ | ||
libasio-dev \ | ||
libboost-test-dev \ | ||
libtclap-dev \ | ||
ninja-build \ | ||
nlohmann-json3-dev \ | ||
qt6-base-dev \ | ||
ruby \ | ||
ruby-dev | ||
- name: install ruby tools | ||
run: | | ||
sudo gem install bundler | ||
sudo bundle install | ||
- name: install gtest | ||
run: | | ||
git clone https://github.com/google/googletest.git | ||
cd googletest | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
cmake --build . --parallel | ||
sudo cmake --install . | ||
- name: build | ||
run: | | ||
cmake -E make_directory build | ||
cmake -E chdir build cmake \ | ||
-G Ninja \ | ||
-DCUKE_ENABLE_BOOST_TEST=on \ | ||
-DCUKE_ENABLE_GTEST=on \ | ||
-DCUKE_ENABLE_QT=on \ | ||
-DCUKE_ENABLE_EXAMPLES=on \ | ||
-DCUKE_TESTS_UNIT=on \ | ||
.. | ||
cmake --build build --parallel --verbose | ||
- name: unit tests | ||
run: | | ||
cmake --build build --target test | ||
- name: QtCalc examples | ||
run: | | ||
for TEST in \ | ||
build/examples/CalcQt/GTestCalculatorQtSteps \ | ||
build/examples/CalcQt/QtTestCalculatorQtSteps \ | ||
build/examples/CalcQt/BoostCalculatorQtSteps \ | ||
; do | ||
"${TEST}" 2> /dev/null & | ||
sleep 1 | ||
(cd examples/CalcQt; cucumber) | ||
wait % | ||
done | ||
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
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