]> OCCT Git - occt.git/commitdiff
Testing - Ubuntu build validation #251
authordpasukhi <dpasukhi@opencascade.com>
Thu, 9 Jan 2025 22:37:07 +0000 (22:37 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Fri, 10 Jan 2025 22:23:56 +0000 (22:23 +0000)
Add GitHub Actions workflow for Ubuntu build validation
TODO: check static build with VTK support

.github/workflows/build-multiconfig-ubuntu.yml [new file with mode: 0644]
src/AdvApp2Var/AdvApp2Var_SysBase.cxx

diff --git a/.github/workflows/build-multiconfig-ubuntu.yml b/.github/workflows/build-multiconfig-ubuntu.yml
new file mode 100644 (file)
index 0000000..5fe89fb
--- /dev/null
@@ -0,0 +1,179 @@
+# This workflow validates the build on the latest Ubuntu version (24.04) using multiple configurations.
+# It is triggered on pushes to the master branch.
+# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
+
+name: Ubuntu build validation
+
+on:
+  push:
+    branches:
+      - 'master'
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+  cancel-in-progress: true
+
+jobs:
+  main_job:
+    name: Latest ubuntu validation
+    runs-on: ubuntu-24.04
+
+    strategy:
+      matrix:
+        config:
+          - {
+              name: "GCC",
+              cc: "gcc",
+              cxx: "g++"
+            }
+          - {
+              name: "Clang",
+              cc: "clang",
+              cxx: "clang++"
+            }
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v4.1.7
+
+    - name: Install dependencies
+      run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev libjemalloc-dev
+
+    - name: Install rapidjson
+      run: |
+        wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
+        unzip rapidjson.zip
+
+    - name: Configure basic
+      run: |
+        mkdir -p build
+        cd build
+        cmake -G "Ninja" \
+              -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
+              -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
+              -D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
+              -D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
+
+    - name: Build basic
+      run: |
+        cd build
+        cmake --build . -- -j 4
+
+    - name: Clear up after build
+      run: |
+        rm -rf build
+
+    - name: Configure full shared
+      run: |
+        mkdir -p build
+        cd build
+        cmake -G "Ninja" \
+              -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
+              -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
+              -D BUILD_USE_PCH=OFF \
+              -D BUILD_INCLUDE_SYMLINK=ON \
+              -D BUILD_OPT_PROFILE=Production \
+              -D BUILD_LIBRARY_TYPE=Shared \
+              -D USE_TK=ON \
+              -D CMAKE_BUILD_TYPE=Debug \
+              -D USE_MMGR_TYPE=JEMALLOC \
+              -D INSTALL_DIR=${{ github.workspace }}/install \
+              -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
+              -D USE_FREETYPE=ON \
+              -D USE_DRACO=ON \
+              -D USE_FFMPEG=OFF \
+              -D USE_FREEIMAGE=ON \
+              -D USE_GLES2=ON \
+              -D USE_OPENVR=ON \
+              -D USE_VTK=ON \
+              -D USE_TBB=ON \
+              -D USE_RAPIDJSON=ON \
+              -D USE_OPENGL=ON \
+              -D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
+              -D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
+
+    - name: Build full shared
+      run: |
+        cd build
+        cmake --build . --target install --config Debug -- -j 4
+    
+    - name: Clear up after build
+      run: |
+        rm -rf build
+        rm -rf ${{ github.workspace }}/install
+
+    - name: Configure full static
+      run: |
+        mkdir -p build
+        cd build
+        cmake -G "Ninja" \
+              -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
+              -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
+              -D BUILD_USE_PCH=OFF \
+              -D BUILD_INCLUDE_SYMLINK=ON \
+              -D BUILD_OPT_PROFILE=Production \
+              -D BUILD_LIBRARY_TYPE=Static \
+              -D USE_TK=ON \
+              -D CMAKE_BUILD_TYPE=Debug \
+              -D USE_MMGR_TYPE=JEMALLOC \
+              -D INSTALL_DIR=${{ github.workspace }}/install \
+              -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
+              -D USE_FREETYPE=ON \
+              -D USE_DRACO=ON \
+              -D USE_FFMPEG=OFF \
+              -D USE_FREEIMAGE=ON \
+              -D USE_GLES2=ON \
+              -D USE_OPENVR=ON \
+              -D USE_VTK=OFF \
+              -D USE_TBB=ON \
+              -D USE_RAPIDJSON=ON \
+              -D USE_OPENGL=ON \
+              -D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
+              -D CMAKE_C_FLAGS="-Werror -Wall -Wextra" ..
+
+    - name: Build full static
+      run: |
+        cd build
+        cmake --build . --target install --config Debug -- -j 4
+
+    - name: Clear up after build
+      run: |
+        rm -rf build
+        rm -rf ${{ github.workspace }}/install
+
+    - name: Configure full with DEBUG define
+      run: |
+        mkdir -p build
+        cd build
+        cmake -G "Ninja" \
+              -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
+              -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
+              -D BUILD_WITH_DEBUG=ON \
+              -D BUILD_USE_PCH=OFF \
+              -D BUILD_INCLUDE_SYMLINK=ON \
+              -D BUILD_OPT_PROFILE=Production \
+              -D BUILD_LIBRARY_TYPE=Shared \
+              -D USE_TK=ON \
+              -D CMAKE_BUILD_TYPE=Debug \
+              -D INSTALL_DIR=${{ github.workspace }}/install \
+              -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
+              -D USE_FREETYPE=ON \
+              -D USE_DRACO=ON \
+              -D USE_FFMPEG=OFF \
+              -D USE_FREEIMAGE=ON \
+              -D USE_GLES2=ON \
+              -D USE_OPENVR=ON \
+              -D USE_VTK=ON \
+              -D USE_TBB=ON \
+              -D USE_RAPIDJSON=ON \
+              -D USE_OPENGL=ON ..
+
+    - name: Build full with DEBUG define
+      run: |
+        cd build
+        cmake --build . --target install --config Debug -- -j 4
+      
+    - name: Clear up after build
+      run: |
+        rm -rf build
+        rm -rf ${{ github.workspace }}/install
index e51d3142cb6089fb18616bd343b5893e9924ee6a..5115ade7201ea8b1dbbd2042952f063965e9305f 100644 (file)
@@ -2520,7 +2520,7 @@ int AdvApp2Var_SysBase::mcrlist_(integer *ier) const
   /* Builtin functions */
   
   /* Local variables */
-  char cfmt[1];
+  char cfmt[1] {};
   doublereal dfmt;
   integer ifmt, i__, nufmt, ntotal;
   char subrou[7];