All linux and windows #131
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: Delivery stable CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # workflow_dispatch: | |
| # inputs: | |
| # tag_name: | |
| # description: 'The tag name we want to deliver' | |
| # required: true | |
| # default: 'latest-' | |
| env: | |
| CLOSE_BRANCH: 0 | |
| TEAM_RESTRICTIVE_CLOSED_BRANCH: ${{ secrets.TEAM_RESTRICTIVE_CLOSED_BRANCH }} | |
| FROM_EMAIL: ${{ secrets.FROM_EMAIL }} | |
| # TO_EMAIL: ${{ secrets.TO_EMAIL }} | |
| TO_EMAIL: "mquinzin@altair.com" | |
| MAIL_RELAY: ${{ secrets.MAIL_RELAY }} | |
| QA_TIMEOUT_PER_TEST_LINUX: 150 | |
| QA_TIMEOUT_PER_TEST_WIN: 500 | |
| # LAST_STABLE_TAG_NAME: ${{ github.event.inputs.tag_name }} | |
| LAST_STABLE_TAG_NAME : 'latest-20250507' # DEV ONLY | |
| jobs: | |
| build_linux: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| # DEV ONLY # runs-on: ["${{ matrix.build }}","dev_pmci"] | |
| runs-on: ["${{ matrix.build }}","delivery_stable_ci"] | |
| env: | |
| BUILD_NB_THREAD: 2 | |
| STATUS_BUILD: 0 | |
| SERVBOT_PAT: ${{ secrets.SERVBOT_PAT }} | |
| strategy: | |
| # If one job fails others are canceled | |
| fail-fast: true | |
| matrix: | |
| include: | |
| ### LINUX64 ### | |
| - build: starter_linux64_gf | |
| precision: dp | |
| os: linux64 | |
| binary: starter | |
| image_name: build-linux64_gf:cos8-ompi411-devts11 | |
| - build: starter_linux64_gf_sp | |
| precision: sp | |
| os: linux64 | |
| binary: starter | |
| 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: build-linux64_gf:cos8-ompi411-devts11 | |
| - build: engine_linux64_gf | |
| precision: dp | |
| os: linux64 | |
| binary: engine | |
| image_name: build-linux64_gf:cos8-ompi411-devts11 | |
| - build: engine_linux64_gf_sp | |
| precision: sp | |
| os: linux64 | |
| binary: engine | |
| image_name: build-linux64_gf:cos8-ompi411-devts11 | |
| # ### LINUXA64 ### | |
| # - build: starter_linuxa64 | |
| # binary: starter | |
| # precision: dp | |
| # os: linuxa64 | |
| # image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| # - build: starter_linuxa64_sp | |
| # binary: starter | |
| # precision: sp | |
| # os: linuxa64 | |
| # image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| # - build: engine_linuxa64 | |
| # binary: engine | |
| # precision: dp | |
| # os: linuxa64 | |
| # image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| # - build: engine_linuxa64_sp | |
| # binary: engine | |
| # precision: sp | |
| # os: linuxa64 | |
| # image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| # - build: engine_linuxa64_ompi | |
| # binary: engine | |
| # precision: dp | |
| # os: linuxa64 | |
| # mpi: ompi | |
| # image_name: linuxa64-rl8.9-bld:armfl24.04-ompi4.1.2-ts11 | |
| # - build: engine_linuxa64_ompi_sp | |
| # binary: engine | |
| # precision: sp | |
| # os: linuxa64 | |
| # mpi: ompi | |
| # 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 dir suffixed with branch name | |
| - name: Set workdir | |
| run: | | |
| echo "WORKDIR=lastest" >> $GITHUB_ENV | |
| - name: DEBUG | |
| run: | | |
| uname -a | |
| cat /etc/os-release | |
| pwd | |
| - 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 last git modifications, don't clean before (way to keep persistent obj files) | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.WORKDIR }} | |
| clean: 'false' | |
| lfs: 'true' | |
| ref: ${{ env.LAST_STABLE_TAG_NAME }} | |
| - name: Running build | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| mpi_opts='' | |
| if [ ! -z ${{ matrix.mpi }} ] | |
| then | |
| mpi_opts="-mpi=${{ matrix.mpi }}" | |
| fi | |
| arch_suffix='' | |
| extra_opts='' | |
| if [ "${{ matrix.os }}" = "linux64" ] | |
| then | |
| echo "Running BUILD for linux GF" | |
| arch_suffix='_gf' | |
| extra_opts='-static-link' | |
| 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_script.sh -release -arch=${{ matrix.os }}$arch_suffix -prec=${{ matrix.precision }} -nt=${{ env.BUILD_NB_THREAD }} $extra_opts $mpi_opts" | |
| echo "=========================================" | |
| echo "-- BUILD ${{ matrix.build }} --" | |
| echo "-- $cmd --" | |
| echo "=========================================" | |
| 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 .. | |
| # # Exiting with failure is no bins generated, should be handle by build_script soon | |
| md5sum exec/* || exit 1 | |
| # 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.build }} ###" | |
| if [ "$STATUS_BUILD" = 0 ] | |
| then | |
| echo -e "Status\t[ \033[31;2;1mFAILED\033[0m ]" | |
| MAILMSG+="The build ${{ matrix.build }} has failed \n" | |
| # Send email | |
| # Close the branch | |
| echo "CLOSE_BRANCH=1" >> $GITHUB_ENV | |
| # Setting SMTP server (docker host) | |
| DOCKER_HOST=`/sbin/ip route|awk '/default/ { print $3 }'` | |
| echo "set smtp=smtp://${DOCKER_HOST}:25" >> /etc/mail.rc | |
| # Print message in log | |
| echo -e $MAILMSG | |
| # Send email | |
| echo -e "$MAILMSG\nThe branch is closed" | Mail -r $FROM_EMAIL -s "Error in Github CI repo ${{ github.repository }} ($(git rev-list -n 1 ${{ env.LAST_STABLE_TAG_NAME }}))" $TO_EMAIL | |
| # Exit fail to see it as a failure | |
| exit 1 | |
| else | |
| echo -e "Status\t[ \033[32;2;1mOK\033[0m ]" | |
| fi | |
| # 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: ${{ env.WORKDIR }}/exec | |
| if: ${{ env.CLOSE_BRANCH == 0 }} | |
| # We upload extlib only once, arbitrary choice | |
| - name: Upload extlib artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: extlib.zip | |
| path: ${{ env.WORKDIR }}/extlib.zip | |
| if: ${{ matrix.build == 'starter_linux64_gf' && env.CLOSE_BRANCH == 0 }} | |
| # Close the branch (= restrict push to team devopsadmins) if needed | |
| # Owner is not mandatory here ... PAT is sufficient ??? seems that as servbot has permissions on this repo so his PAT is sufficient ... | |
| - uses: octokit/request-action@v2.x | |
| id: close_branch_build | |
| env: | |
| GITHUB_TOKEN: ${{ env.SERVBOT_PAT }} | |
| REQUEST_BODY: "['${{ env.TEAM_RESTRICTIVE_CLOSED_BRANCH}}']" | |
| with: | |
| route: PUT /repos/${{ github.repository }}/branches/main/protection/restrictions/teams | |
| data: ${{ env.REQUEST_BODY }} | |
| if: ${{ always() && env.CLOSE_BRANCH == 1 }} | |
| # It the closing went wrong we send an email | |
| - name: "Check result of closing branch and warn if it fails" | |
| run: | | |
| # No need to configure SMTP server, already done in previous steps | |
| MAILMSG="Some error(s) has(ve) been raised during workflow execution:\n\n" | |
| MAILMSG+="A branch closing is needed but has failed\n\n" | |
| MAILMSG+="Return status API is : ${{ steps.close_branch_build.outputs.status }}\n\n" | |
| MAILMSG+="Check more detailed datas in CI logs\n" | |
| # Print message in log | |
| echo -e $MAILMSG | |
| echo -e "\nClose return data API is : ${{ steps.close_branch_build.outputs.data }}" | |
| # Send email | |
| echo -e "$MAILMSG" | Mail -r $FROM_EMAIL -s "Error in Github CI repo ${{ github.repository }} ($(git rev-list -n 1 ${{ env.LAST_STABLE_TAG_NAME }})) on closing branch" $TO_EMAIL | |
| # Exit fail to see it as a failure | |
| exit 1 | |
| if: ${{ always() && env.CLOSE_BRANCH == 1 && steps.close_branch_build.outputs.status != 200 }} | |
| build_windows_no_container: | |
| if: ${{ github.repository_owner == 'OpenRadioss' }} | |
| # DEV ONLY # runs-on: ["${{ matrix.build }}","dev_pmci"] | |
| runs-on: ["${{ matrix.build }}","prmerge_ci"] | |
| env: | |
| BUILD_NB_THREAD: 2 | |
| STATUS_BUILD: 0 | |
| SERVBOT_PAT: ${{ secrets.SERVBOT_PAT }} | |
| CLOSE_BRANCH: 0 | |
| strategy: | |
| # If one job fails others are canceled | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: starter_win64 | |
| precision: dp | |
| os: win64 | |
| binary: starter | |
| - build: starter_win64_sp | |
| precision: sp | |
| os: win64 | |
| binary: starter | |
| - build: engine_win64_impi | |
| precision: dp | |
| os: win64 | |
| binary: engine | |
| mpi: impi | |
| - build: engine_win64_impi_sp | |
| precision: sp | |
| os: win64 | |
| binary: engine | |
| mpi: impi | |
| - build: engine_win64 | |
| precision: dp | |
| os: win64 | |
| binary: engine | |
| - build: engine_win64_sp | |
| precision: sp | |
| os: win64 | |
| binary: engine | |
| steps: | |
| # Set the working dir suffixed with branch name | |
| - name: Set workdir | |
| run: | | |
| Add-Content -Path $env:GITHUB_ENV -Value "WORKDIR=lastest" | |
| - name: Create branch oriented WS directory & integration WS (WIN64) | |
| run: | | |
| $dir2create = "$env:WORKDIR" | |
| if (-not (Test-Path -Path $dir2create)) { | |
| New-Item -Path $dir2create -ItemType "Directory" | |
| } | |
| - name: Clean local exe dir | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| $dir2remove = "exec" | |
| if (Test-Path -Path $dir2remove) { | |
| Remove-Item -Path $dir2remove -Recurse -Force | |
| } | |
| # Get last git modifications, don't clean before (way to keep persistent obj files) | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.WORKDIR }} | |
| clean: 'false' | |
| lfs: 'true' | |
| ref: ${{ env.LAST_STABLE_TAG_NAME }} | |
| - name: Running builds | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| cd ${{ matrix.binary }} | |
| @" | |
| @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 | |
| if not '${{ matrix.mpi }}'=='' ( | |
| set mpi_opts=-mpi=${{ matrix.mpi }} | |
| ) | |
| echo ========================================= | |
| echo -- BUILD ${{ matrix.build }} -- | |
| echo ========================================= | |
| .\build_windows.bat -release -arch=${{ matrix.os }} -prec=${{ matrix.precision }} -nt=$env:BUILD_NB_THREAD %mpi_opts% | |
| "@ -replace "'", '"' | Out-File -FilePath myrun.bat -Encoding ASCII | |
| cmd /c .\myrun.bat | |
| cd .. | |
| $directoryPath = "exec" | |
| if (Test-Path -Path $directoryPath) { | |
| $files = Get-ChildItem -Path $directoryPath | |
| if ($files.Count -eq 0) { | |
| Write-Output "The directory is empty." | |
| exit 1 | |
| } else { | |
| # Display the contents of the directory | |
| $files | ForEach-Object { Write-Output $_.FullName } | |
| } | |
| } else { | |
| Write-Output "The directory does not exist." | |
| exit 1 | |
| } | |
| 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.build }} ($env:STATUS_BUILD) ###" | |
| if ($env:STATUS_BUILD -eq 0) { | |
| Write-Output "Status`t[ $([char]27)[31;2;1mFAILED$([char]27)[0m ]" | |
| $MAILMSG += "The build ${{ matrix.build }} has failed `r`n" | |
| Add-Content -Path $env:GITHUB_ENV -Value "CLOSE_BRANCH=1" | |
| $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 }} ($(git rev-list -n 1 ${{ env.LAST_STABLE_TAG_NAME }}))" -Body $MAILMSG -Port 25 | |
| exit 1 | |
| } | |
| else { | |
| Write-Output "Status`t[ $([char]27)[32;2;1mOK$([char]27)[0m ]" | |
| } | |
| # 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: ${{ env.WORKDIR }}/exec | |
| if: ${{ env.CLOSE_BRANCH == 0 }} | |
| # Close the branch (= restrict push to team devopsadmins) if needed | |
| # Owner is not mandatory here ... PAT is sufficient ??? seems that as servbot has permissions on this repo so his PAT is sufficient ... | |
| - name: Close the branch if errors | |
| uses: octokit/request-action@v2.x | |
| id: close_branch_build | |
| env: | |
| GITHUB_TOKEN: ${{ env.SERVBOT_PAT }} | |
| REQUEST_BODY: "['${{ env.TEAM_RESTRICTIVE_CLOSED_BRANCH}}']" | |
| with: | |
| route: PUT /repos/${{ github.repository }}/branches/main/protection/restrictions/teams | |
| data: ${{ env.REQUEST_BODY }} | |
| if: ${{ always() && env.CLOSE_BRANCH == 1 }} | |
| # If the closing went wrong we send an email | |
| - name: "Check result of closing branch and warn if it fails" | |
| run: | | |
| $MAILMSG = "Some error(s) has(ve) been raised during workflow execution:`r`n`r`n" | |
| $MAILMSG += "A branch closing is needed but has failed`r`n`r`n" | |
| $MAILMSG += "Return status API is : ${{ steps.close_branch_build.outputs.status }}`r`n`r`n" | |
| $MAILMSG += "Check more detailed datas in CI logs`r`n" | |
| Write-Output "`r`nClose return API is : ${{ steps.close_branch_build.outputs.status }} / ${{ steps.close_branch_build.outputs.data }}"; | |
| $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 }} ($(git rev-list -n 1 ${{ env.LAST_STABLE_TAG_NAME }})) on closing branch" -Body $MAILMSG -Port 25 | |
| exit 1 | |
| if: ${{ always() && env.CLOSE_BRANCH == 1 && steps.close_branch_build.outputs.status != 200 }} | |
| delivery: | |
| needs: [build_linux,build_windows_no_container] | |
| # DEV ONLY # runs-on: dev_delivery | |
| runs-on: delivery | |
| 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 | |
| # DEV ONLY # - /github_download_counter_dev:/github_download_counter | |
| - /github_download_counter:/github_download_counter | |
| env: | |
| SERVBOT_USER: ${{ secrets.SERVBOT_USER }} | |
| SERVBOT_PAT: ${{ secrets.SERVBOT_PAT }} | |
| DELIVERY_NB_RELEASES_TO_KEEP: 3 | |
| DELIVERY_TAG_PREFIX: 'latest-' | |
| OPENRADIOSS_MAINDIR_NAME: 'OpenRadioss' | |
| OPENRADIOSS_GUI: 'openradioss_gui' | |
| TOOLS_OPENRADIOSS_GUI: 'TOOLS/openradioss_gui' | |
| TOOLS_INP2RAD: 'TOOLS/input_converters/inp2rad/inp2rad/inp2rad.py' | |
| CI: 'true' # if true, disables interactive prompts and progress bar | |
| JFROG_CLI_AVOID_NEW_VERSION_WARNING: "true" | |
| JFROG_CLI_LOG_LEVEL: "ERROR" | |
| JF_OPTIONS: "--url=${{ secrets.JFROG_DELIVERY_URL }} --user=${{ secrets.JFROG_DELIVERY_USER }} --password=${{ secrets.JFROG_DELIVERY_TOKEN }}" | |
| JF_TOOLS_OUTPUT_CONVERTERS: "${{ secrets.JFROG_DELIVERY_RADIOSS_REPO }}/OpenRadioss_Tools/output_converters" | |
| steps: | |
| # Set the working dir suffixed with deliv_stable | |
| - name: Set workdir | |
| run: | | |
| echo "WORKDIR=deliv_stable" >> $GITHUB_ENV | |
| - name: Create branch oriented WS directory & integration WS | |
| run: | | |
| mkdir -p ${{ env.WORKDIR }} | |
| - name: Set the release name & clean previous exec | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| echo "DATEOFTHETAG=${LAST_STABLE_TAG_NAME#latest-}" >> $GITHUB_ENV | |
| rm -rf exec todeliver exec_tmp | |
| # Get last git modifications, don't clean before (way to go faster) | |
| - name: Checkout git sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.WORKDIR }} | |
| lfs: 'true' | |
| ref: ${{ env.LAST_STABLE_TAG_NAME }} | |
| # Get OpenRadioss extras from dedicated repository | |
| - name: Checkout git EXTRA sources | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: 'true' | |
| clean: 'false' | |
| repository: '${{ secrets.EXTRA_REPOSITORY }}' | |
| path: "${{ env.WORKDIR }}/EXTRA" | |
| token: '${{ secrets.EXTRA_REPOSITORY_PAT }}' | |
| # Get OpenRadioss gui in Tools repository | |
| - name: Checkout git Tools sources | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: 'true' | |
| clean: 'false' | |
| repository: '${{ secrets.TOOLS_REPOSITORY }}' | |
| path: "${{ env.WORKDIR }}/TOOLS" | |
| token: '${{ secrets.EXTRA_REPOSITORY_PAT }}' | |
| # Download ALL artifacts (including extlib.zip) | |
| - name: Download ALL artifacts for packaging | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| path: "${{ env.WORKDIR }}/exec_tmp" | |
| - name: Check files in exec | |
| working-directory: ${{ env.WORKDIR }} | |
| run: | | |
| # # DEV ONLY # | |
| # mkdir -p exec_tmp | |
| # touch exec_tmp/starter_linux64_gf | |
| # touch exec_tmp/starter_linux64_gf_sp | |
| # touch exec_tmp/engine_linux64_gf_ompi | |
| # touch exec_tmp/engine_linux64_gf | |
| # touch exec_tmp/engine_linux64_gf_ompi_sp | |
| # touch exec_tmp/engine_linux64_gf_sp | |
| # touch exec_tmp/starter_linuxa64 | |
| # touch exec_tmp/starter_linuxa64_sp | |
| # touch exec_tmp/engine_linuxa64 | |
| # touch exec_tmp/engine_linuxa64_sp | |
| # touch exec_tmp/engine_linuxa64_ompi | |
| # touch exec_tmp/engine_linuxa64_ompi_sp | |
| # touch exec_tmp/starter_win64 | |
| # touch exec_tmp/starter_win64_sp | |
| # touch exec_tmp/engine_win64_impi | |
| # touch exec_tmp/engine_win64_impi_sp | |
| # touch exec_tmp/engine_win64 | |
| # touch exec_tmp/engine_win64_sp | |
| # cd exec_tmp/ | |
| # cd .. | |
| ls -l exec_tmp/ | |
| # - name: Copy all artifact complex structure into flat files in exec | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # echo "List exec_tmp : " | |
| # find exec_tmp -type f | |
| # # mv exec_tmp/extlib.zip ./ | |
| # for os in linux64 linuxa64 win64 | |
| # do | |
| # mkdir -p exec/${os} | |
| # cp -p exec_tmp/*${os}* exec/${os}/ | |
| # chmod 755 exec/${os}/* | |
| # done | |
| # echo "List exec : " | |
| # find exec -type f | |
| # - name: Unzip extlib | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # unzip extlib.zip | |
| # - name: Provide ALL binaries | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # # Removed lfs hook (not supported in next action, not neeeded) | |
| # rm -f .git/hooks/pre-push | |
| # # Prepare tree architecture | |
| # rm -rf todeliver | |
| # for os in linux64 linuxa64 win64 | |
| # do | |
| # mkdir -p todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/extlib/h3d/lib/${os} todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/extlib/hm_reader todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/exec | |
| # # cp -a extlib/h3d/lib/${os}/* todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/extlib/h3d/lib/${os}/ | |
| # # cp -a extlib/hm_reader/${os} todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/extlib/hm_reader/ | |
| # # Get Intel runtime and some other extras from a dedicated repository | |
| # if test -d EXTRA/${os} | |
| # then | |
| # cp -a EXTRA/${os}/* todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/ | |
| # fi | |
| # # Get OpenRadioss gui from Tools repository and inp2rad | |
| # if test -d ${{ env.TOOLS_OPENRADIOSS_GUI}} | |
| # then | |
| # cp -a ${{ env.TOOLS_OPENRADIOSS_GUI}} todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/ | |
| # if test -f ${{ env.TOOLS_INP2RAD}} | |
| # then | |
| # cp -a ${{ env.TOOLS_INP2RAD}} todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/${{ env.OPENRADIOSS_GUI }}/ | |
| # fi | |
| # fi | |
| # # Get some output converters from Tools repository | |
| # jf rt download ${JF_OPTIONS} "${JF_TOOLS_OUTPUT_CONVERTERS}/${os}/*" todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/exec/ --flat=true | |
| # chmod 755 todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/exec/* | |
| # cp -a hm_cfg_files todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/ | |
| # cp -a exec/${os}/* todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/exec/ | |
| # mkdir -p todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/licenses | |
| # # cp -a extlib/license/* todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/licenses/ | |
| # cp -a COPYRIGHT.md todeliver/${os}/${{ env.OPENRADIOSS_MAINDIR_NAME }}/ | |
| # export OPENRADIOSS_BIN_ARCHIVE="${{ env.OPENRADIOSS_MAINDIR_NAME }}_${os}.zip" | |
| # cd todeliver/${os} | |
| # # zip -r ../$OPENRADIOSS_BIN_ARCHIVE ${{ env.OPENRADIOSS_MAINDIR_NAME }} | |
| # cd .. | |
| # rm -rf ${os} | |
| # cd .. | |
| # done | |
| # - name: Set some variables | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # echo "LAST_STABLE_COMMIT=$(git rev-list -n 1 ${{ env.LAST_STABLE_TAG_NAME }})" >> $GITHUB_ENV | |
| # # Way to deal with special chars in a commit message | |
| # { | |
| # echo "LAST_STABLE_COMMIT_MESSAGE<<EOF" | |
| # git log -1 --format=%B "${{ env.LAST_STABLE_TAG_NAME }}" | |
| # echo "EOF" | |
| # } >> $GITHUB_ENV | |
| # - uses: octokit/request-action@v2.x | |
| # id: get_commit_author | |
| # env: | |
| # GITHUB_TOKEN: ${{ env.SERVBOT_PAT }} | |
| # REQUEST_BODY: "['${{ env.LAST_STABLE_COMMIT }}']" | |
| # with: | |
| # route: GET /repos/${{ github.repository }}/commits/${{ env.LAST_STABLE_COMMIT }} | |
| # - name: Counter Download - Update values | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # cd /github_download_counter | |
| # # Do some before using some lock and retry stuff | |
| # cp download_count.json sav-delivery-${{ env.DATEOFTHETAG }}-download_count.json | |
| # github_download_count.py \ | |
| # --git_api_url ${{ github.api_url }} \ | |
| # --git_repo ${{ github.repository }} \ | |
| # --git_user $SERVBOT_USER \ | |
| # --git_token $SERVBOT_PAT \ | |
| # --action update_values | |
| # # The action creates the release with an already existing tag (latest-xxxxx) so we use option skip_tag_creation: true | |
| # # We do this because we have already checkouted the wanted commit before | |
| # # Prerequisite: create the tag with command : git tag latest-YYYMMDD <commit id>; git push origin latest-YYYMMDD | |
| # - name: Release the new binaries | |
| # uses: docker://ghcr.io/mini-bomba/create-github-release:v1.2.0 | |
| # with: | |
| # token: ${{ secrets.GITHUB_TOKEN }} | |
| # release: "${{ env.LAST_STABLE_TAG_NAME }}" | |
| # tag: "${{ env.LAST_STABLE_TAG_NAME }}" | |
| # name: "Last stable build on ${{ env.DATEOFTHETAG }}" | |
| # body: | | |
| # This automatic release is built from commit ${{ env.LAST_STABLE_COMMIT }} and authored by @${{ fromJson(steps.get_commit_author.outputs.data).author.login }} | |
| # [Github Actions workflow run that built this release](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
| # Commit message: | |
| # ${{ env.LAST_STABLE_COMMIT_MESSAGE }} | |
| # Thank you for downloading OpenRadioss! We'd love to hear about your experience. | |
| # 👉 [Share your feedback here](https://app.sli.do/event/uxEN5N2jZqeUHnqZEyqrcx) | |
| # files: | | |
| # ${{ env.WORKDIR }}/todeliver/* | |
| # clear_attachments: true | |
| # skip_tag_creation: true | |
| # target_commit: ${{ env.LAST_STABLE_COMMIT }} | |
| # - name: Counter Download - Update/Add entries | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # cd /github_download_counter | |
| # github_download_count.py \ | |
| # --git_api_url ${{ github.api_url }} \ | |
| # --git_repo ${{ github.repository }} \ | |
| # --git_user $SERVBOT_USER \ | |
| # --git_token $SERVBOT_PAT \ | |
| # --action update \ | |
| # --tag_date ${{ env.DATEOFTHETAG }} | |
| # - name: Clean old github release/tag if needed + clean Counter Download | |
| # working-directory: ${{ env.WORKDIR }} | |
| # run: | | |
| # clean_github_release.py \ | |
| # --git_api_url ${{ github.api_url }} \ | |
| # --git_repo ${{ github.repository }} \ | |
| # --git_user $SERVBOT_USER \ | |
| # --git_token $SERVBOT_PAT \ | |
| # --nb_releases_to_keep ${{ env.DELIVERY_NB_RELEASES_TO_KEEP }} \ | |
| # --counter_file_dir /github_download_counter \ | |
| # --tag_prefix ${{ env.DELIVERY_TAG_PREFIX }} | |
| # - name: Create a new GitHub Discussion Annoucement | |
| # id: create-discussion | |
| # uses: abirismyname/create-discussion@v1.x | |
| # env: | |
| # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # title: OpenRadioss Stable Update (${{ env.LAST_STABLE_TAG_NAME }}) | |
| # body: | | |
| # We're excited to announce a new **stable release of OpenRadioss!** | |
| # This version, based on **tag ${{ env.LAST_STABLE_TAG_NAME }}**, brings improved stability and performance based on community feedback. | |
| # 🔹 [Get it now](https://github.com/${{ github.repository }}/releases/tag/${{ env.DELIVERY_TAG_PREFIX }}${{ env.DATEOFTHETAG }}) | |
| # Please, try it out and share your appreciated feedback, thanks! | |
| # repository-id: ${{ secrets.DISCUSSION_REPO_ID }} | |
| # category-id: ${{ secrets.DISCUSSION_CAT_ID }} |