Update gui_def.py to show file open icon correctly #170
This file contains hidden or 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
| name: Tools build CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # DEV ONLY # | |
| # - 'dev/ci/**' | |
| env: | |
| FROM_EMAIL: ${{ secrets.FROM_EMAIL }} | |
| TO_EMAIL: "${{ secrets.TO_EMAIL }}" | |
| # DEV ONLY # | |
| # TO_EMAIL: "[email protected]" | |
| MAIL_RELAY: ${{ secrets.MAIL_RELAY }} | |
| MAIL_CONFIG_FILE: "/etc/mail.rc" | |
| MAIL_COMMAND: "Mail" | |
| jobs: | |
| build_userlib_sdk_linuxs: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| strategy: | |
| # If one job fails others are canceled | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - image_name: linux64-rl8.9-bld:intel2025.0.1-impi2021.2-ompi4.1.2-ts11 | |
| precision: dp | |
| compiler: oneapi | |
| os: linux64 | |
| - image_name: linux64-rl8.9-bld:intel2025.0.1-impi2021.2-ompi4.1.2-ts11 | |
| precision: sp | |
| compiler: oneapi | |
| os: linux64 | |
| - image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| precision: dp | |
| compiler: armflang | |
| os: linuxa64 | |
| - image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| precision: sp | |
| compiler: armflang | |
| os: linuxa64 | |
| # DEV ONLY # runs-on: ["${{ matrix.os }}","dev_pmci"] | |
| runs-on: ["${{ matrix.os }}","build","prod"] | |
| container: | |
| image: "fr-qafactorydev.europe.altair.com/${{ matrix.image_name }}" | |
| credentials: | |
| username: ${{secrets.DOCKER_REGISTRY_USER}} | |
| password: ${{secrets.DOCKER_REGISTRY_PASSWD}} | |
| volumes: | |
| - /etc/localtime:/etc/localtime:ro | |
| env: | |
| STATUS_BUILD: 0 | |
| steps: | |
| # Set the working (we do this because images are not using the same user, for the moment, this is to prevent permission issues when checking out files and removeing previous ones) | |
| - name: Set workdir | |
| run: | | |
| echo "WORKDIR=build_root" >> $GITHUB_ENV | |
| - name: Create branch oriented WS directory & integration WS | |
| run: | | |
| mkdir -p ${{ env.WORKDIR }} | |
| # Get sources | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.WORKDIR }} | |
| - name: Build userlib_sdk | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| cd userlib_sdk | |
| chmod 755 ./build_script.bash | |
| if [ "${{ matrix.os }}" = "linux64" ] | |
| then | |
| echo "Running BUILD for linux" | |
| source /opt/rh/gcc-toolset-11/enable | |
| source /opt/intel/oneapi/compiler/2025.0/env/vars.sh | |
| source /opt/intel/oneapi/mkl/2025.0/env/vars.sh | |
| echo " " | |
| echo " GCC" | |
| gcc --version | |
| echo " " | |
| echo " INTEL IFX" | |
| ifx --version | |
| echo " " | |
| else | |
| echo "Running BUILD for arm" | |
| export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles | |
| source /etc/profile.d/modules.sh | |
| module load binutils/13.2.0 gnu/13.2.0 acfl/24.04 armpl/24.04.0 | |
| export LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH | |
| echo " " | |
| echo " GCC" | |
| gcc --version | |
| echo " " | |
| echo " ArmFlang" | |
| armflang --version | |
| echo " " | |
| fi | |
| echo "----" | |
| echo " " | |
| cmd="./build_script.bash -arch=${{ matrix.os }} -compiler=${{ matrix.compiler }} -prec=${{ matrix.precision }}" | |
| echo "=========================================" | |
| echo "-- BUILD userlib_sdk / ${{ matrix.os }} / ${{ matrix.precision }} --" | |
| echo "-- $cmd --" | |
| echo "=========================================" | |
| eval $cmd | |
| # Set correct end of step status (if not an email will be sent) | |
| echo "STATUS_BUILD=1" >> $GITHUB_ENV | |
| - name: Managing step execution | |
| if: ${{ always() }} | |
| run: | | |
| MAILMSG="Some error(s) has(ve) been raised during workflow execution:\n\n" | |
| echo -e "\n#### STATUS_STEP_BUILD ${{ matrix.os }}-${{ matrix.precision }} ###" | |
| if [ "$STATUS_BUILD" = 0 ] | |
| then | |
| echo -e "Status\t[ \033[31;2;1mFAILED\033[0m ]" | |
| MAILMSG="The build of userlib_sdk ${{ matrix.os }} / ${{ matrix.precision }} has failed \n" | |
| # Send email | |
| # Setting SMTP server (docker host) | |
| DOCKER_HOST=`/sbin/ip route|awk '/default/ { print $3 }'` | |
| echo "set smtp=smtp://${DOCKER_HOST}:25" >> ${{ env.MAIL_CONFIG_FILE }} | |
| # Print message in log | |
| echo -e $MAILMSG | |
| # Send email | |
| echo -e "$MAILMSG" | ${{ env.MAIL_COMMAND }} -r $FROM_EMAIL -s "Error in Github CI repo ${{ github.repository }} (${{ github.sha }})" $TO_EMAIL | |
| exit 1; | |
| else | |
| echo -e "Status\t[ \033[32;2;1mOK\033[0m ]" | |
| fi | |
| # Upload artifact | |
| - name: Upload built artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: userlib_sdk-${{ matrix.os }}-${{ matrix.precision }} | |
| path: ${{ env.WORKDIR }}/userlib_sdk/userlib_sdk | |
| build_userlib_sdk_win: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| strategy: | |
| # If one job fails others are canceled | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - precision: dp | |
| compiler: oneapi | |
| os: win64 | |
| - precision: sp | |
| compiler: oneapi | |
| os: win64 | |
| runs-on: ["${{ matrix.os }}","build","prod"] | |
| env: | |
| STATUS_BUILD: 0 | |
| steps: | |
| # Get sources | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| - name: Build userlib_sdk | |
| run: | | |
| cd userlib_sdk | |
| @" | |
| @echo off | |
| call 'C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\env\vars.bat' | |
| call 'C:\Program Files (x86)\Intel\oneAPI\mkl\2025.0\env\vars.bat' | |
| call 'C:\Program Files (x86)\Intel\oneAPI\mpi\2021.10.0\env\vars.bat' | |
| cmake --version | |
| ninja --version | |
| echo ========================================= | |
| echo -- BUILD userlib_sdk / ${{ matrix.os }} / ${{ matrix.precision }} -- | |
| echo ========================================= | |
| .\build_windows.bat -arch=${{ matrix.os }} -compiler=${{ matrix.compiler }} -prec=${{ matrix.precision }} | |
| "@ -replace "'", '"' | Out-File -FilePath myrun.bat -Encoding ASCII | |
| cmd /c .\myrun.bat | |
| Add-Content -Path $env:GITHUB_ENV -Value "STATUS_BUILD=1" | |
| - name: Managing step execution | |
| if: ${{ always() }} | |
| run: | | |
| $MAILMSG = "Some error(s) has(ve) been raised during workflow execution:`r`n`r`n" | |
| Write-Output "`r`n#### STATUS_STEP_BUILD ${{ matrix.os }}-${{ matrix.precision }} ###" | |
| if ($env:STATUS_BUILD -eq 0) { | |
| Write-Output "Status`t[ $([char]27)[31;2;1mFAILED$([char]27)[0m ]" | |
| $MAILMSG += "The build of userlib_sdk ${{ matrix.os }} / ${{ matrix.precision }} has failed`r`n" | |
| $ALL_RECIPIENTS = $env:TO_EMAIL -split "," | |
| Send-MailMessage -SmtpServer $env:MAIL_RELAY -From $env:FROM_EMAIL -To $ALL_RECIPIENTS -Subject "Error in Github CI repo ${{ github.repository }} (${{github.sha}})" -Body $MAILMSG -Port 25 | |
| exit 1 | |
| } | |
| else { | |
| Write-Output "Status`t[ $([char]27)[32;2;1mOK$([char]27)[0m ]" | |
| } | |
| # Upload artifact | |
| - name: Upload built artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: userlib_sdk-${{ matrix.os }}-${{ matrix.precision }} | |
| path: userlib_sdk/userlib_sdk | |
| build_output_converters_linux: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| # DEV ONLY # runs-on: ["linux64","dev"] | |
| runs-on: ["${{ matrix.os }}","build","prod"] | |
| env: | |
| STATUS_BUILD: 0 | |
| ANIM_TO_VTK_DIR: output_converters/anim_to_vtk | |
| TH_TO_CSV: output_converters/th_to_csv | |
| strategy: | |
| # If one job fails others are canceled | |
| fail-fast: true | |
| matrix: | |
| include: | |
| ### LINUX64 ### | |
| - os: linux64 | |
| image_name: build-linux64_gf:cos8-ompi411-devts11 | |
| ### LINUXA64 ### | |
| - os: linuxa64 | |
| image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| container: | |
| image: fr-qafactorydev.europe.altair.com/${{ matrix.image_name }} | |
| credentials: | |
| username: ${{secrets.DOCKER_REGISTRY_USER}} | |
| password: ${{secrets.DOCKER_REGISTRY_PASSWD}} | |
| volumes: | |
| - /etc/localtime:/etc/localtime:ro | |
| steps: | |
| # Set the working (we do this because images are not using the same user, for the moment, this is to prevent permission issues when checking out files and removeing previous ones) | |
| - name: Set workdir | |
| run: | | |
| echo "WORKDIR=build_user" >> $GITHUB_ENV | |
| - name: Create branch oriented WS directory & integration WS | |
| run: | | |
| mkdir -p ${{ env.WORKDIR }} | |
| - name: Clean local exe dir | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| rm -rf exec | |
| md5sum exec/* || echo "Nothing in exec/" | |
| # Get sources | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.WORKDIR }} | |
| lfs: 'true' | |
| - name: Running builds | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| mkdir exec | |
| if [ "${{ matrix.os }}" = "linux64" ] | |
| then | |
| echo "Running BUILD for linux GF" | |
| source /home/adminqa/.bashrc | |
| else | |
| echo "Running BUILD for arm" | |
| export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles | |
| source /etc/profile.d/modules.sh | |
| module load binutils/13.2.0 gnu/13.2.0 acfl/24.04 | |
| export LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH | |
| fi | |
| cmd="./build.bash" | |
| echo "=========================================" | |
| echo "-- BUILD tools for anim_to_vtk (${{ matrix.os }}) --" | |
| echo "-- $cmd --" | |
| echo "=========================================" | |
| cd ${{ env.ANIM_TO_VTK_DIR }}/${{ matrix.os }} | |
| chmod 755 build.bash | |
| eval $cmd | |
| cmd="./build.bash" | |
| echo "=========================================" | |
| echo "-- BUILD tools for th_to_csv (${{ matrix.os }}) --" | |
| echo "-- $cmd --" | |
| echo "=========================================" | |
| cd - | |
| cd ${{ env.TH_TO_CSV }}/${{ matrix.os }} | |
| chmod 755 build.bash | |
| eval $cmd | |
| # Set correct end of step status (if not an email will be sent) | |
| echo "STATUS_BUILD=1" >> $GITHUB_ENV | |
| - name: Managing step execution | |
| if: ${{ always() }} | |
| run: | | |
| MAILMSG="Some error(s) has(ve) been raised during workflow execution:\n\n" | |
| echo -e "\n#### STATUS_STEP_BUILD ${{ matrix.os }} ###" | |
| if [ "$STATUS_BUILD" = 0 ] | |
| then | |
| echo -e "Status\t[ \033[31;2;1mFAILED\033[0m ]" | |
| MAILMSG="The build of output converter tools ${{ matrix.os }} has failed \n" | |
| # Send email | |
| # Setting SMTP server (docker host) | |
| DOCKER_HOST=`/sbin/ip route|awk '/default/ { print $3 }'` | |
| echo "set smtp=smtp://${DOCKER_HOST}:25" >> ${{ env.MAIL_CONFIG_FILE }} | |
| # Print message in log | |
| echo -e $MAILMSG | |
| # Send email | |
| echo -e "$MAILMSG" | ${{ env.MAIL_COMMAND }} -r $FROM_EMAIL -s "Error in Github CI repo ${{ github.repository }} (${{ github.sha }})" $TO_EMAIL | |
| exit 1; | |
| else | |
| echo -e "Status\t[ \033[32;2;1mOK\033[0m ]" | |
| fi | |
| # Upload artifact | |
| - name: Upload built artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output-converters-${{ matrix.os }} | |
| path: ${{ env.WORKDIR }}/exec | |
| build_output_converters_windows_no_container: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| # DEV ONLY # runs-on: ["win64","dev_pmci"] | |
| runs-on: ["win64","build","prod"] | |
| env: | |
| STATUS_BUILD: 0 | |
| os: win64 | |
| ANIM_TO_VTK_DIR: output_converters/anim_to_vtk | |
| TH_TO_CSV: output_converters/th_to_csv | |
| steps: | |
| - name: Clean local exe dir | |
| shell: cmd | |
| run: > | |
| call C:\cygwin64\bin\bash --login -c " | |
| cd %cd:\=/%; | |
| rm -rf exec; | |
| " | |
| # Get last git modifications, don't clean before (way to keep persistent obj files) | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: 'true' | |
| - name: Running builds | |
| shell: cmd | |
| run: > | |
| call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 vs2019 && C:\cygwin64\bin\bash --login -c " | |
| cd %cd:\=/%; | |
| mkdir exec; | |
| cmd=\"./build.bat\"; | |
| echo \"=========================================\"; | |
| echo \"-- BUILD tools for anim_to_vtk (${{ env.os }}) --\"; | |
| echo \"-- $cmd --\"; | |
| echo \"=========================================\"; | |
| cd ${{ env.ANIM_TO_VTK_DIR }}/${{ env.os }}; | |
| eval $cmd || exit 1; | |
| cmd=\"./build.bat\"; | |
| echo \"=========================================\"; | |
| echo \"-- BUILD tools for th_to_csv (${{ env.os }}) --\"; | |
| echo \"-- $cmd --\"; | |
| echo \"=========================================\"; | |
| pwd; | |
| cd -; | |
| cd ${{ env.TH_TO_CSV }}/${{ env.os }}; | |
| eval $cmd || exit 1; | |
| echo \"STATUS_BUILD=1\" >> $GITHUB_ENV; | |
| " | |
| - name: Managing step execution | |
| if: ${{ always() }} | |
| # Running cygwin from powershell or cmd => neither identation nor comment ! | |
| shell: cmd | |
| run: > | |
| call C:\cygwin64\bin\bash --login -c " | |
| MAILMSG=\"Some error(s) has(ve) been raised during workflow execution:\n\n\"; | |
| echo -e \"\n#### STATUS_STEP_BUILD ${{ env.os }} ###\"; | |
| if [ ${{ env.STATUS_BUILD }} = 0 ]; | |
| then | |
| echo -e \"Status\t[ \033[31;2;1mFAILED\033[0m ]\"; | |
| MAILMSG+=\"The build of output converter tools ${{ env.os }} has failed \n\"; | |
| echo -e $MAILMSG; | |
| echo -e \"$MAILMSG\" | Email -f $FROM_EMAIL -s \"Error in Github CI repo ${{ github.repository }} (${{ github.sha }})\" -r $MAIL_RELAY $TO_EMAIL; | |
| exit 1; | |
| else | |
| echo -e \"Status\t[ \033[32;2;1mOK\033[0m ]\"; | |
| fi; | |
| " | |
| # Upload artifact | |
| - name: Upload built artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output-converters-${{ env.os }} | |
| path: exec | |
| deliver: | |
| needs: ["build_output_converters_linux","build_output_converters_windows_no_container","build_userlib_sdk_linuxs","build_userlib_sdk_win"] | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| runs-on: ["prod","linux64"] | |
| container: | |
| image: fr-qafactorydev.europe.altair.com/common-linux64 | |
| credentials: | |
| username: ${{secrets.DOCKER_REGISTRY_USER}} | |
| password: ${{secrets.DOCKER_REGISTRY_PASSWD}} | |
| volumes: | |
| - /etc/localtime:/etc/localtime:ro | |
| env: | |
| CI: 'true' # if true, disables interactive prompts and progress bar | |
| JFROG_CLI_LOG_LEVEL: "ERROR" | |
| JFROG_CLI_AVOID_NEW_VERSION_WARNING: "true" | |
| JF_OPTIONS: "--url=${{ secrets.JFROG_DELIVERY_URL }} --user=${{ secrets.JFROG_DELIVERY_USER }} --password=${{ secrets.JFROG_DELIVERY_TOKEN }}" | |
| OUTPUT_TOOLS: "${{ secrets.JFROG_DELIVERY_RADIOSS_REPO }}/OpenRadioss_Tools" | |
| OUTPUT_CONVERTER_PREFIX: "${OUTPUT_TOOLS}/output_converters" | |
| USERLIB_SDK: "${{ secrets.JFROG_DELIVERY_RADIOSS_REPO }}/userlib_sdk" | |
| strategy: | |
| # If one job fails others continue | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - artifact: userlib_sdk-linux64-dp | |
| path: userlib_sdk_exec | |
| compiler: oneapi | |
| precision: dp | |
| os: linux64 | |
| - artifact: userlib_sdk-linux64-sp | |
| path: userlib_sdk_exec | |
| compiler: oneapi | |
| precision: sp | |
| os: linux64 | |
| - artifact: userlib_sdk-linuxa64-dp | |
| path: userlib_sdk_exec | |
| compiler: armflang | |
| precision: dp | |
| os: linuxa64 | |
| - artifact: userlib_sdk-linuxa64-sp | |
| path: userlib_sdk_exec | |
| compiler: armflang | |
| precision: sp | |
| os: linuxa64 | |
| - artifact: userlib_sdk-win64-dp | |
| path: userlib_sdk_exec | |
| compiler: oneapi | |
| precision: dp | |
| os: win64 | |
| - artifact: userlib_sdk-win64-sp | |
| path: userlib_sdk_exec | |
| compiler: oneapi | |
| precision: sp | |
| os: win64 | |
| - artifact: output-converters-linux64 | |
| path: exec | |
| os: linux64 | |
| - artifact: output-converters-linuxa64 | |
| path: exec | |
| os: linuxa64 | |
| - artifact: output-converters-win64 | |
| path: exec | |
| os: win64 | |
| steps: | |
| - name: Clean previous exec | |
| run: | | |
| rm -rf exec | |
| rm -rf userlib_sdk_exec | |
| # Download artifact | |
| - name: Download artifacts for Jfrog delivery | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.path }} | |
| - name: Deliver files on Jfrog | |
| run: | | |
| # Upload artifacts ${{ matrix.artifact }} to JFrog | |
| if [ "${{ matrix.path }}" = "userlib_sdk_exec" ] | |
| then | |
| prec_suffix='' | |
| if [ ${{ matrix.precision }} = "sp" ] | |
| then | |
| prec_suffix='_sp' | |
| fi | |
| jf rt upload ${JF_OPTIONS} "${{ matrix.path }}/(*${{ matrix.os }}${prec_suffix}_${{ matrix.compiler }}*)" ${{ env.USERLIB_SDK }}/{1} | |
| else | |
| jf rt upload ${JF_OPTIONS} "${{ matrix.path }}/(*${{ matrix.os }}*)" ${{ env.OUTPUT_CONVERTER_PREFIX }}/${{ matrix.os }}/{1} | |
| fi | |