From 39bf74bbf2a590f04a64815c3e059c1f44409198 Mon Sep 17 00:00:00 2001 From: Maxime Quinzin <98477371+mquinzin@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:35:16 +0100 Subject: [PATCH 1/3] Test source bashrc --- .github/workflows/developer_ci.yml | 522 +++++++++++++++-------------- 1 file changed, 263 insertions(+), 259 deletions(-) diff --git a/.github/workflows/developer_ci.yml b/.github/workflows/developer_ci.yml index 12609acc4..03e2ab31e 100644 --- a/.github/workflows/developer_ci.yml +++ b/.github/workflows/developer_ci.yml @@ -4,8 +4,8 @@ on: pull_request: # CI is disabled if ONLY workflow files are changed - paths-ignore: - - '.github/workflows/**' + # paths-ignore: + # - '.github/workflows/**' env: QA_TIMEOUT_PER_TEST: 150 @@ -14,33 +14,33 @@ env: jobs: - # This job is a guard to avoid running CI if workflows files are changed (even if they are not the only ones) - guard: - runs-on: developer_ci - container: - image: fr-qafactorydev.europe.altair.com/common-linux64 - - steps: - - uses: actions/checkout@v4 - - name: Detect workflow changes - run: | - # fetch base branch - git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 + # # This job is a guard to avoid running CI if workflows files are changed (even if they are not the only ones) + # guard: + # runs-on: developer_ci + # container: + # image: fr-qafactorydev.europe.altair.com/common-linux64 + + # steps: + # - uses: actions/checkout@v4 + # - name: Detect workflow changes + # run: | + # # fetch base branch + # git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 - # list changed files in the PR - changed=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}) - echo "Files changed in this PR:" - echo "$changed" - echo "-----" - - # check if workflow or other sensitive dirs were modified - if echo "$changed" | grep -E '^\.github/workflows/'; then - echo "::error::Workflow files modified — stopping CI for safety." - exit 1 - fi + # # list changed files in the PR + # changed=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}) + # echo "Files changed in this PR:" + # echo "$changed" + # echo "-----" + + # # check if workflow or other sensitive dirs were modified + # if echo "$changed" | grep -E '^\.github/workflows/'; then + # echo "::error::Workflow files modified — stopping CI for safety." + # exit 1 + # fi build: - needs: guard + # needs: guard if: ${{ github.repository_owner == 'OpenRadioss' }} # concurrency: # group: ${{ github.ref_name }} @@ -69,19 +69,19 @@ jobs: binary: starter image_name: linux64-cos10-bld:ompi4.1.1-ts15 - - build: engine_linux64_gf_ompi - precision: dp - os: linux64 - binary: engine - mpi: ompi - image_name: build-linux64_gf:cos8-ompi411-devts11 + # - build: engine_linux64_gf_ompi + # precision: dp + # os: linux64 + # binary: engine + # mpi: ompi + # image_name: build-linux64_gf:cos8-ompi411-devts11 - - build: engine_linux64_gf_ompi_sp - precision: sp - os: linux64 - binary: engine - mpi: ompi - image_name: linux64-cos10-bld:ompi4.1.1-ts15 + # - build: engine_linux64_gf_ompi_sp + # precision: sp + # os: linux64 + # binary: engine + # mpi: ompi + # image_name: linux64-cos10-bld:ompi4.1.1-ts15 # Disabled since error would be seen in ompi version # - build: engine_linux64_gf @@ -118,236 +118,240 @@ jobs: run: | echo "Running using ref: refs/pull/${{ github.event.number }}/merge" - # Load GCC 15 environment - source /home/adminqa/.bashrc - - mpi_opts='' - if [ ! -z ${{ matrix.mpi }} ] - then - mpi_opts="-mpi=${{ matrix.mpi }}" - fi - - cmd="./build_script.sh -release -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" - echo "=========================================" - echo "-- BUILD ${{ matrix.build }} --" - echo "-- $cmd --" - echo "=========================================" - source /home/adminqa/.bashrc - chmod 755 Compiling_tools/script/* - chmod 755 ${{ matrix.binary }}/build_script.sh - - md5sum exec/* || echo "Nothing in exec/" - mkdir exec - cd ${{ matrix.binary }} - - eval $cmd - - cd .. - md5sum exec/* || exit 1 - - # Upload artifact (since V4 we can't upload artifact using the same name, each one must be unique) - - name: Upload built artifacts - uses: actions/upload-artifact@v4 - with: - name: bins-${{ matrix.os }}-${{ matrix.precision }}-${{ matrix.build }} - path: exec + echo "GCC version" + gcc --version + echo "PATH is $PATH" - # We upload extlib only once, arbitrary choice - - name: Upload extlib artifacts - uses: actions/upload-artifact@v4 - with: - name: extlib.zip - path: extlib.zip - if: ${{ matrix.build == 'starter_linux64_gf' }} + # # Load GCC 15 environment + # source /home/adminqa/.bashrc - code-analysis: - needs: guard - # We execute after all builds (in // with QA) - if: ${{ github.repository_owner == 'OpenRadioss' }} + # mpi_opts='' + # if [ ! -z ${{ matrix.mpi }} ] + # then + # mpi_opts="-mpi=${{ matrix.mpi }}" + # fi - # DEV ONLY # runs-on: ["build","dev_devci"] - runs-on: ["build","developer_ci"] - container: - image: fr-qafactorydev.europe.altair.com/build-linux64_gf:cos8-ompi411-devts11 - volumes: - - /etc/localtime:/etc/localtime:ro + # cmd="./build_script.sh -release -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" + # echo "=========================================" + # echo "-- BUILD ${{ matrix.build }} --" + # echo "-- $cmd --" + # echo "=========================================" + # source /home/adminqa/.bashrc + # chmod 755 Compiling_tools/script/* + # chmod 755 ${{ matrix.binary }}/build_script.sh - env: - BUILD_NB_THREAD: 2 + # md5sum exec/* || echo "Nothing in exec/" + # mkdir exec + # cd ${{ matrix.binary }} - strategy: - # If one job fails othere are canceled - fail-fast: true - matrix: - include: - - build: starter_linux64_gf - precision: dp - os: linux64 - binary: starter - - build: engine_linux64_gf_ompi - precision: dp - os: linux64 - binary: engine - mpi: ompi + # eval $cmd - steps: + # cd .. + # md5sum exec/* || exit 1 - - name: Clean local exe dir - run: | - rm -rf exec - md5sum exec/* || echo "Nothing in exec/" - - # Get last git modifications, WS is not persistent here - - uses: actions/checkout@v4 - with: - lfs: 'false' - ref: refs/pull/${{ github.event.number }}/merge - - - name: Generate Fortran Signatures - run: | - source /home/adminqa/.bashrc - cd scripts/gcc_plugin - sh build.sh - cd - - - - name: Running build with code analysis - run: | - echo "Running using ref: refs/pull/${{ github.event.number }}/merge" - - mpi_opts='' - if [ ! -z ${{ matrix.mpi }} ] - then - mpi_opts="-mpi=${{ matrix.mpi }}" - fi - - cmd="./build_script.sh -debug=analysis -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" - echo "=========================================" - echo "-- BUILD & ANALYSE ${{ matrix.build }} --" - echo "-- $cmd --" - echo "=========================================" - source /home/adminqa/.bashrc - chmod 755 Compiling_tools/script/* - chmod 755 ${{ matrix.binary }}/build_script.sh - - md5sum exec/* || echo "Nothing in exec/" - mkdir exec - cd ${{ matrix.binary }} - - eval $cmd - - qa: - needs: build - # DEV ONLY # runs-on: ["qa_${{ matrix.os }}","dev"] - runs-on: ["qa_${{ matrix.os }}","developer_ci"] - container: - image: fr-qafactorydev.europe.altair.com/qa-linux64_gf:cos8-ompi411 - volumes: - - /etc/localtime:/etc/localtime:ro - - env: - hm_reader_extlib: ../../extlib/hm_reader - hm_reader_cfgfiles: ../../hm_cfg_files - homeuser: /home/adminqa - mpi: ompi - # DEV ONLY # QA_NB_PROC: 2 - QA_NB_PROC: 4 - QA_NB_THREAD: 2 - - strategy: - # If one job fails othere are canceled - fail-fast: false - matrix: - os: [linux64] - # precision: [dp,sp] - precision: [dp] - - steps: - - # Get git related to the commit - - uses: actions/checkout@v4 - with: - lfs: 'false' - ref: refs/pull/${{ github.event.number }}/merge - - - name: Clean local exe dir - run: | - rm -rf exec - - # Download artifacts (since V4 we must download all needed artifacts, we could do it using wildcard but it doesn't work ... see https://github.com/actions/download-artifact/issues/337) - # Using hard name waiting for this issue to be fixed - # - name: Download artifacts - # uses: actions/download-artifact@v4 + # # Upload artifact (since V4 we can't upload artifact using the same name, each one must be unique) + # - name: Upload built artifacts + # uses: actions/upload-artifact@v4 # with: - # name: bins-${{ matrix.os }}-${{ matrix.precision }}-* + # name: bins-${{ matrix.os }}-${{ matrix.precision }}-${{ matrix.build }} # path: exec - # merge-multiple: true - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: bins-${{ matrix.os }}-${{ matrix.precision }}-starter_linux64_gf - path: exec - merge-multiple: true - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: bins-${{ matrix.os }}-${{ matrix.precision }}-engine_linux64_gf_ompi - path: exec - merge-multiple: true - - name: Download extlib artifact - uses: actions/download-artifact@v4 - with: - name: extlib.zip - - name: Unzip extlib - run: | - unzip extlib.zip - - - name: Running qa - run: | - md5sum exec/* || echo "Nothing in exec/" - if [ "${{ matrix.precision }}" = "dp" ] - then - precision_ext="" - else - precision_ext="_${{ matrix.precision }}" - fi - - chmod 755 exec/* - cd qa-tests/scripts - chmod 755 or_qa_script or_radioss.pl - rm -f QA.summary - - source ${{ env.homeuser }}/.bashrc - export LD_LIBRARY_PATH=${{ env.hm_reader_extlib }}/${{ matrix.os }}:$LD_LIBRARY_PATH - - - # cmd="./or_qa_script ../../exec/engine_${{ matrix.os }}_gf_${{ env.mpi }}${precision_ext}_db 1.0 --env:RAD_CFG_PATH=${{ env.hm_reader_cfgfiles }} --system_run --env:OMP_STACKSIZE=400m --exec_script_args='mpiexec -np ${{ env.QA_NB_PROC }}' --env:OMP_NUM_THREADS=${{ env.QA_NB_THREAD }} --output_failures_stdout --env:ASAN_OPTIONS='new_delete_type_mismatch=0:detect_leaks=0' --xtra_args='--timeoutscript=${{ env.QA_TIMEOUT_PER_TEST }}'" - cmd="./or_qa_script ../../exec/engine_${{ matrix.os }}_gf_${{ env.mpi }}${precision_ext} 1.0 --env:RAD_CFG_PATH=${{ env.hm_reader_cfgfiles }} --system_run --env:OMP_STACKSIZE=400m --exec_script_args='mpiexec -np ${{ env.QA_NB_PROC }}' --env:OMP_NUM_THREADS=${{ env.QA_NB_THREAD }} --output_failures_stdout --xtra_args='--timeoutscript=${{ env.QA_TIMEOUT_PER_TEST }}' " - echo "=========================================" - echo "-- QA ${{ matrix.os }}_${{ matrix.precision }} --" - echo "-- $cmd --" - echo "=========================================" - eval $cmd - res=$? - - # Getting failed test - nbtestsfailed=$(grep "# Runs Failed\s*:" QA.summary | tail -n 1 | awk -F' ' '{print $5}') - # Checking if no test has run at all (maybe exec errors) - nbtestsok=$(grep "# Runs Successful\s*:" QA.summary | tail -n 1 | awk -F' ' '{print $5}') - - if [ $res -gt 0 ] || [ $nbtestsfailed -gt 0 ] || [ $nbtestsok = 0 ] - then - # If at least one test is failed we mark the CI as failed - echo "All tests are not OK, CI is failed" - exit 1 - fi - - # DEV ONLY # - # Delete the artifacts - # In private repo we are limited to 2Gb so we decided not to keep developer ci artifacts for the moment - # - uses: geekyeggo/delete-artifact@v2 + # # We upload extlib only once, arbitrary choice + # - name: Upload extlib artifacts + # uses: actions/upload-artifact@v4 # with: - # name: | - # bins-${{ matrix.os }}-${{ matrix.precision }} - # bins-${{ matrix.os }}-sp + # name: extlib.zip + # path: extlib.zip + # if: ${{ matrix.build == 'starter_linux64_gf' }} + + # code-analysis: + # needs: guard + # # We execute after all builds (in // with QA) + # if: ${{ github.repository_owner == 'OpenRadioss' }} + + # # DEV ONLY # runs-on: ["build","dev_devci"] + # runs-on: ["build","developer_ci"] + # container: + # image: fr-qafactorydev.europe.altair.com/build-linux64_gf:cos8-ompi411-devts11 + # volumes: + # - /etc/localtime:/etc/localtime:ro + + # env: + # BUILD_NB_THREAD: 2 + + # strategy: + # # If one job fails othere are canceled + # fail-fast: true + # matrix: + # include: + # - build: starter_linux64_gf + # precision: dp + # os: linux64 + # binary: starter + # - build: engine_linux64_gf_ompi + # precision: dp + # os: linux64 + # binary: engine + # mpi: ompi + + # steps: + + # - name: Clean local exe dir + # run: | + # rm -rf exec + # md5sum exec/* || echo "Nothing in exec/" + + # # Get last git modifications, WS is not persistent here + # - uses: actions/checkout@v4 + # with: + # lfs: 'false' + # ref: refs/pull/${{ github.event.number }}/merge + + # - name: Generate Fortran Signatures + # run: | + # source /home/adminqa/.bashrc + # cd scripts/gcc_plugin + # sh build.sh + # cd - + + # - name: Running build with code analysis + # run: | + # echo "Running using ref: refs/pull/${{ github.event.number }}/merge" + + # mpi_opts='' + # if [ ! -z ${{ matrix.mpi }} ] + # then + # mpi_opts="-mpi=${{ matrix.mpi }}" + # fi + + # cmd="./build_script.sh -debug=analysis -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" + # echo "=========================================" + # echo "-- BUILD & ANALYSE ${{ matrix.build }} --" + # echo "-- $cmd --" + # echo "=========================================" + # source /home/adminqa/.bashrc + # chmod 755 Compiling_tools/script/* + # chmod 755 ${{ matrix.binary }}/build_script.sh + + # md5sum exec/* || echo "Nothing in exec/" + # mkdir exec + # cd ${{ matrix.binary }} + + # eval $cmd + + # qa: + # needs: build + # # DEV ONLY # runs-on: ["qa_${{ matrix.os }}","dev"] + # runs-on: ["qa_${{ matrix.os }}","developer_ci"] + # container: + # image: fr-qafactorydev.europe.altair.com/qa-linux64_gf:cos8-ompi411 + # volumes: + # - /etc/localtime:/etc/localtime:ro + + # env: + # hm_reader_extlib: ../../extlib/hm_reader + # hm_reader_cfgfiles: ../../hm_cfg_files + # homeuser: /home/adminqa + # mpi: ompi + # # DEV ONLY # QA_NB_PROC: 2 + # QA_NB_PROC: 4 + # QA_NB_THREAD: 2 + + # strategy: + # # If one job fails othere are canceled + # fail-fast: false + # matrix: + # os: [linux64] + # # precision: [dp,sp] + # precision: [dp] + + # steps: + + # # Get git related to the commit + # - uses: actions/checkout@v4 + # with: + # lfs: 'false' + # ref: refs/pull/${{ github.event.number }}/merge + + # - name: Clean local exe dir + # run: | + # rm -rf exec + + # # Download artifacts (since V4 we must download all needed artifacts, we could do it using wildcard but it doesn't work ... see https://github.com/actions/download-artifact/issues/337) + # # Using hard name waiting for this issue to be fixed + # # - name: Download artifacts + # # uses: actions/download-artifact@v4 + # # with: + # # name: bins-${{ matrix.os }}-${{ matrix.precision }}-* + # # path: exec + # # merge-multiple: true + # - name: Download artifacts + # uses: actions/download-artifact@v4 + # with: + # name: bins-${{ matrix.os }}-${{ matrix.precision }}-starter_linux64_gf + # path: exec + # merge-multiple: true + # - name: Download artifacts + # uses: actions/download-artifact@v4 + # with: + # name: bins-${{ matrix.os }}-${{ matrix.precision }}-engine_linux64_gf_ompi + # path: exec + # merge-multiple: true + # - name: Download extlib artifact + # uses: actions/download-artifact@v4 + # with: + # name: extlib.zip + + # - name: Unzip extlib + # run: | + # unzip extlib.zip + + # - name: Running qa + # run: | + # md5sum exec/* || echo "Nothing in exec/" + # if [ "${{ matrix.precision }}" = "dp" ] + # then + # precision_ext="" + # else + # precision_ext="_${{ matrix.precision }}" + # fi + + # chmod 755 exec/* + # cd qa-tests/scripts + # chmod 755 or_qa_script or_radioss.pl + # rm -f QA.summary + + # source ${{ env.homeuser }}/.bashrc + # export LD_LIBRARY_PATH=${{ env.hm_reader_extlib }}/${{ matrix.os }}:$LD_LIBRARY_PATH + + + # # cmd="./or_qa_script ../../exec/engine_${{ matrix.os }}_gf_${{ env.mpi }}${precision_ext}_db 1.0 --env:RAD_CFG_PATH=${{ env.hm_reader_cfgfiles }} --system_run --env:OMP_STACKSIZE=400m --exec_script_args='mpiexec -np ${{ env.QA_NB_PROC }}' --env:OMP_NUM_THREADS=${{ env.QA_NB_THREAD }} --output_failures_stdout --env:ASAN_OPTIONS='new_delete_type_mismatch=0:detect_leaks=0' --xtra_args='--timeoutscript=${{ env.QA_TIMEOUT_PER_TEST }}'" + # cmd="./or_qa_script ../../exec/engine_${{ matrix.os }}_gf_${{ env.mpi }}${precision_ext} 1.0 --env:RAD_CFG_PATH=${{ env.hm_reader_cfgfiles }} --system_run --env:OMP_STACKSIZE=400m --exec_script_args='mpiexec -np ${{ env.QA_NB_PROC }}' --env:OMP_NUM_THREADS=${{ env.QA_NB_THREAD }} --output_failures_stdout --xtra_args='--timeoutscript=${{ env.QA_TIMEOUT_PER_TEST }}' " + # echo "=========================================" + # echo "-- QA ${{ matrix.os }}_${{ matrix.precision }} --" + # echo "-- $cmd --" + # echo "=========================================" + # eval $cmd + # res=$? + + # # Getting failed test + # nbtestsfailed=$(grep "# Runs Failed\s*:" QA.summary | tail -n 1 | awk -F' ' '{print $5}') + # # Checking if no test has run at all (maybe exec errors) + # nbtestsok=$(grep "# Runs Successful\s*:" QA.summary | tail -n 1 | awk -F' ' '{print $5}') + + # if [ $res -gt 0 ] || [ $nbtestsfailed -gt 0 ] || [ $nbtestsok = 0 ] + # then + # # If at least one test is failed we mark the CI as failed + # echo "All tests are not OK, CI is failed" + # exit 1 + # fi + + # # DEV ONLY # + # # Delete the artifacts + # # In private repo we are limited to 2Gb so we decided not to keep developer ci artifacts for the moment + # # - uses: geekyeggo/delete-artifact@v2 + # # with: + # # name: | + # # bins-${{ matrix.os }}-${{ matrix.precision }} + # # bins-${{ matrix.os }}-sp From 0a6780147c35edd978c4d177ae1f6b843d07a0d3 Mon Sep 17 00:00:00 2001 From: Maxime Quinzin <98477371+mquinzin@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:36:44 +0100 Subject: [PATCH 2/3] Echo --- .github/workflows/developer_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/developer_ci.yml b/.github/workflows/developer_ci.yml index 03e2ab31e..14c86988b 100644 --- a/.github/workflows/developer_ci.yml +++ b/.github/workflows/developer_ci.yml @@ -119,7 +119,7 @@ jobs: echo "Running using ref: refs/pull/${{ github.event.number }}/merge" echo "GCC version" - gcc --version + gcc --version || echo "GCC not found" echo "PATH is $PATH" # # Load GCC 15 environment From cdd73c13b3eadd5b2448d490c15ff38183a7caa3 Mon Sep 17 00:00:00 2001 From: Maxime Quinzin <98477371+mquinzin@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:40:01 +0100 Subject: [PATCH 3/3] Print debug after source --- .github/workflows/developer_ci.yml | 55 ++++++++++++++++-------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/developer_ci.yml b/.github/workflows/developer_ci.yml index 14c86988b..914c6beb7 100644 --- a/.github/workflows/developer_ci.yml +++ b/.github/workflows/developer_ci.yml @@ -118,36 +118,41 @@ jobs: run: | echo "Running using ref: refs/pull/${{ github.event.number }}/merge" + # echo "GCC version" + # gcc --version || echo "GCC not found" + # echo "PATH is $PATH" + + # # Load GCC 15 environment + # source /home/adminqa/.bashrc + + mpi_opts='' + if [ ! -z ${{ matrix.mpi }} ] + then + mpi_opts="-mpi=${{ matrix.mpi }}" + fi + + cmd="./build_script.sh -release -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" + echo "=========================================" + echo "-- BUILD ${{ matrix.build }} --" + echo "-- $cmd --" + echo "=========================================" + source /home/adminqa/.bashrc + echo "GCC version" gcc --version || echo "GCC not found" echo "PATH is $PATH" - # # Load GCC 15 environment - # source /home/adminqa/.bashrc + chmod 755 Compiling_tools/script/* + chmod 755 ${{ matrix.binary }}/build_script.sh + + md5sum exec/* || echo "Nothing in exec/" + mkdir exec + cd ${{ matrix.binary }} + + eval $cmd - # mpi_opts='' - # if [ ! -z ${{ matrix.mpi }} ] - # then - # mpi_opts="-mpi=${{ matrix.mpi }}" - # fi - - # cmd="./build_script.sh -release -arch=${{ matrix.os }}_gf -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} -static-link $mpi_opts" - # echo "=========================================" - # echo "-- BUILD ${{ matrix.build }} --" - # echo "-- $cmd --" - # echo "=========================================" - # source /home/adminqa/.bashrc - # chmod 755 Compiling_tools/script/* - # chmod 755 ${{ matrix.binary }}/build_script.sh - - # md5sum exec/* || echo "Nothing in exec/" - # mkdir exec - # cd ${{ matrix.binary }} - - # eval $cmd - - # cd .. - # md5sum exec/* || exit 1 + cd .. + md5sum exec/* || exit 1 # # Upload artifact (since V4 we can't upload artifact using the same name, each one must be unique) # - name: Upload built artifacts