From d06365fd58663fe46664bab40123747a57b22d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Sun, 8 Sep 2024 23:51:30 +0200 Subject: [PATCH 01/10] Update main.yml --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e851aca1b2..d1e307a08d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,13 @@ jobs: mkdir build cd build cmake ../src/ - make + make 2> >(tee "make-output.txt") + - name: Post PR comment for warnings/errors + if: always() + uses: JacobDomagala/CompileResult@master + with: + comment_title: Make output + compile_result_file: ${{runner.workspace}}/build/output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash From 471ecb07f7951ec18e05067b9032c83b934e88e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Sun, 8 Sep 2024 23:52:09 +0200 Subject: [PATCH 02/10] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e7db9f6d1..8de05bdd5a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5.0) -set(CMAKE_CXX_FLAGS "-Wswitch -std=c++0x -O2 -pthread ${CMAKE_CXX_FLAGS} -Wno-undef -Wnon-virtual-dtor -Wextra") +set(CMAKE_CXX_FLAGS "-Wswitch -std=c++0x -O2 -pthread ${CMAKE_CXX_FLAGS} -Wno-undef -Wnon-virtual-dtor -Wall -Wextra") set(CMAKE_CXX_STANDARD 17) if (POLICY CMP0148) cmake_policy(SET CMP0148 OLD) From 0176092c56f627469a4d8f26e447ac9a944e2493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 00:07:24 +0200 Subject: [PATCH 03/10] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1e307a08d..f09959952d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,11 +31,11 @@ jobs: cmake ../src/ make 2> >(tee "make-output.txt") - name: Post PR comment for warnings/errors - if: always() + if: ${{github.event_name == 'pull_request'}} uses: JacobDomagala/CompileResult@master with: comment_title: Make output - compile_result_file: ${{runner.workspace}}/build/output.txt + compile_result_file: ${{runner.workspace}}/build/make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash @@ -43,7 +43,7 @@ jobs: cd knowrob/build cpack - name: Run unit tests - if: github.event_name == 'push' || github.event_name == 'pull_request' + if: ${{github.event_name == 'push' || github.event_name == 'pull_request'}} shell: bash run: | sudo systemctl start mongod From 77821c7acc4a34e69d6ce25f0e6e1ea17fc5b807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 10:26:42 +0200 Subject: [PATCH 04/10] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f09959952d..1896cd9ad2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,8 @@ jobs: uses: JacobDomagala/CompileResult@master with: comment_title: Make output - compile_result_file: ${{runner.workspace}}/build/make-output.txt + work_dir: knowrob/src + compile_result_file: knowrob/build/make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash From 90cf24fd2e74dcda2d050f783ef3c39bee0a7a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 10:43:45 +0200 Subject: [PATCH 05/10] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1896cd9ad2..67446a92a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: cd build cmake ../src/ make 2> >(tee "make-output.txt") - - name: Post PR comment for warnings/errors + - name: foo warnings/errors if: ${{github.event_name == 'pull_request'}} uses: JacobDomagala/CompileResult@master with: From b43dd477d14d2cf66d5d75fba6a20a12e1d2eb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 11:00:31 +0200 Subject: [PATCH 06/10] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67446a92a0..0e25a2caf2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,13 +30,14 @@ jobs: cd build cmake ../src/ make 2> >(tee "make-output.txt") + cp make-output.txt ../src/ - name: foo warnings/errors if: ${{github.event_name == 'pull_request'}} uses: JacobDomagala/CompileResult@master with: comment_title: Make output work_dir: knowrob/src - compile_result_file: knowrob/build/make-output.txt + compile_result_file: make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash From 41a5d8fa85f0c4d41d0c542185014286b8cb2d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 11:13:30 +0200 Subject: [PATCH 07/10] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e25a2caf2..5d356b0062 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: with: comment_title: Make output work_dir: knowrob/src - compile_result_file: make-output.txt + compile_result_file: knowrob/src/make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash From 3a2aa64d77faabc2142b2ca3519670e23d638bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 11:26:08 +0200 Subject: [PATCH 08/10] Update main.yml --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d356b0062..2681eb3612 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,14 +30,12 @@ jobs: cd build cmake ../src/ make 2> >(tee "make-output.txt") - cp make-output.txt ../src/ - name: foo warnings/errors if: ${{github.event_name == 'pull_request'}} uses: JacobDomagala/CompileResult@master with: comment_title: Make output - work_dir: knowrob/src - compile_result_file: knowrob/src/make-output.txt + compile_result_file: knowrob/build/make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash From ad6c46e6a385c28fdd6d050339a1114d187ba8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 12:51:54 +0200 Subject: [PATCH 09/10] Update main.yml --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2681eb3612..8e6df1ed72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,12 +30,6 @@ jobs: cd build cmake ../src/ make 2> >(tee "make-output.txt") - - name: foo warnings/errors - if: ${{github.event_name == 'pull_request'}} - uses: JacobDomagala/CompileResult@master - with: - comment_title: Make output - compile_result_file: knowrob/build/make-output.txt - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash @@ -77,6 +71,12 @@ jobs: run: | mv $GITHUB_WORKSPACE/knowrob/src/.git $GITHUB_WORKSPACE/ mv $GITHUB_WORKSPACE/knowrob/src/* $GITHUB_WORKSPACE/ + - name: foo warnings/errors + if: ${{github.event_name == 'pull_request'}} + uses: JacobDomagala/CompileResult@master + with: + comment_title: Make output + compile_result_file: knowrob/build/make-output.txt - name: Deploy doc to gh-pages if: github.event_name == 'push' || github.event_name == 'release' uses: JamesIves/github-pages-deploy-action@3.5.7 From 6e3fc067d4d9d3968fbb72d92722e145b7e5419f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Be=C3=9Fler?= Date: Mon, 9 Sep 2024 13:06:01 +0200 Subject: [PATCH 10/10] Update main.yml --- .github/workflows/main.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e6df1ed72..91327d3360 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - with: - path: 'knowrob/src' - name: Build KnowRob workspace shell: bash run: | @@ -25,23 +23,22 @@ jobs: libraptor2-dev librdf0-dev libgtest-dev \ libfmt-dev libeigen3-dev libmongoc-dev \ doxygen graphviz mongodb-org - cd knowrob mkdir build cd build - cmake ../src/ + cmake ../ make 2> >(tee "make-output.txt") - name: Create debian package if: ${{github.event_name == 'push' || github.event_name == 'release'}} shell: bash run: | - cd knowrob/build + cd build cpack - name: Run unit tests if: ${{github.event_name == 'push' || github.event_name == 'pull_request'}} shell: bash run: | sudo systemctl start mongod - cd knowrob/build + cd build ./all_gtests --gtest_filter=* --gtest_output="xml:$GITHUB_WORKSPACE/gtest-knowrob.xml" --gtest_color=no - name: Report test results uses: EnricoMi/publish-unit-test-result-action@v2 @@ -55,7 +52,7 @@ jobs: if: github.event_name == 'push' || github.event_name == 'release' shell: bash run: | - cd knowrob/build + cd build make doc - name: Extract version tag if: github.event_name == 'release' @@ -67,16 +64,12 @@ jobs: shell: bash # Use branch name as version run: echo "KNOWROB_DOCU_VERSION=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - - name: Move checkout - run: | - mv $GITHUB_WORKSPACE/knowrob/src/.git $GITHUB_WORKSPACE/ - mv $GITHUB_WORKSPACE/knowrob/src/* $GITHUB_WORKSPACE/ - name: foo warnings/errors if: ${{github.event_name == 'pull_request'}} uses: JacobDomagala/CompileResult@master with: comment_title: Make output - compile_result_file: knowrob/build/make-output.txt + compile_result_file: build/make-output.txt - name: Deploy doc to gh-pages if: github.event_name == 'push' || github.event_name == 'release' uses: JamesIves/github-pages-deploy-action@3.5.7 @@ -99,16 +92,16 @@ jobs: env: GITHUB_TOKEN: ${{ github.TOKEN }} run: | - cd knowrob/src - gh release upload ${{github.event.release.tag_name}} ../build/knowrob-*.deb + gh release upload ${{github.event.release.tag_name}} ./build/knowrob-*.deb - name: Upload debian package if: github.event_name == 'push' uses: actions/upload-artifact@v4 with: name: debian package - path: ./knowrob/build/knowrob-*.deb + path: ./build/knowrob-*.deb - name: Upload test results uses: actions/upload-artifact@v4 with: name: test results path: ./gtest-knowrob.xml +