From de48261e559c92d5a871f0f777c3668a78b3ad93 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 20 Mar 2024 21:38:56 +0100 Subject: [PATCH] Replace GitHub Actions step output by file --- .github/workflows/build-custom.yml | 52 ++++++++++++++---------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-custom.yml b/.github/workflows/build-custom.yml index eec2d4ed..b5629782 100644 --- a/.github/workflows/build-custom.yml +++ b/.github/workflows/build-custom.yml @@ -89,91 +89,87 @@ jobs: OpenFOAMv2312) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2312-dev - echo "{openfoam_exec}={/usr/bin/openfoam2312}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2312" > openfoam_exec;; OpenFOAMv2306) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2306-dev - echo "{openfoam_exec}={/usr/bin/openfoam2306}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2306" > openfoam_exec;; OpenFOAMv2212) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2212-dev - echo "{openfoam_exec}={/usr/bin/openfoam2212}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2212" > openfoam_exec;; OpenFOAMv2206) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2206-dev - echo "{openfoam_exec}={/usr/bin/openfoam2206}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2206" > openfoam_exec;; OpenFOAMv2112) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2112-dev - echo "{openfoam_exec}={/usr/bin/openfoam2112}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2112" > openfoam_exec;; OpenFOAMv2106) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2106-dev - echo "{openfoam_exec}={/usr/bin/openfoam2106}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2106" > openfoam_exec;; OpenFOAMv2012) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2012-dev - echo "{openfoam_exec}={/usr/bin/openfoam2012}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2012" > openfoam_exec;; OpenFOAMv2006) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2006-dev - echo "{openfoam_exec}={/usr/bin/openfoam2006}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam2006" > openfoam_exec;; OpenFOAMv1912) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam1912-dev - echo "{openfoam_exec}={/usr/bin/openfoam1912}" >> $GITHUB_OUTPUT;; + echo "/usr/bin/openfoam1912" > openfoam_exec;; OpenFOAM10) sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam10 - echo "{openfoam_exec}={. /opt/openfoam10/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam10/etc/bashrc &&" > openfoam_exec;; OpenFOAM9) sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam9 - echo "{openfoam_exec}={. /opt/openfoam9/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam9/etc/bashrc &&" > openfoam_exec;; OpenFOAM8) sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam8 - echo "{openfoam_exec}={. /opt/openfoam8/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam8/etc/bashrc &&" > openfoam_exec;; OpenFOAM7) sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam7 - echo "{openfoam_exec}={. /opt/openfoam7/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam7/etc/bashrc &&" > openfoam_exec;; OpenFOAM6) echo "OpenFOAM 6 is only available on Ubuntu 18.04 or older." sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam6 - echo "{openfoam_exec}={. /opt/openfoam6/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam6/etc/bashrc &&" > openfoam_exec;; OpenFOAM5) echo "OpenFOAM 5 is only available on Ubuntu 18.04 or older." sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get -y install openfoam5 - echo "{openfoam_exec}={. /opt/openfoam5/etc/bashrc &&}" >> $GITHUB_OUTPUT;; + echo ". /opt/openfoam5/etc/bashrc &&" > openfoam_exec;; *) echo "I cannot find ${{ github.event.inputs.refAdapter }} in my known options." exit 1;; esac - - name: Sanity check - run: | - ls /usr/bin/openfoam* || echo "No /usr/bin/openfoam* directories." - ls /opt/openfoam* || echo "No /opt/openfoam* directories." - echo "GitHub Actions step output openfoam_exec:" - echo ${{steps.installOpenFOAM.outputs.openfoam_exec}} - name: Build OpenFOAM-preCICE adapter run: | - echo "OpenFOAM environment: ${{steps.installOpenFOAM.outputs.openfoam_exec}}" - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./Allwmake + echo "OpenFOAM command: " + cat ./openfoam_exec + chmod +x ./openfoam_exec + ./openfoam_exec ./Allwmake - name: Get tutorials run: | git clone https://github.com/precice/tutorials.git --branch ${{ github.event.inputs.branchTutorials }} --depth 1 @@ -182,10 +178,10 @@ jobs: if ${{ github.event.inputs.runTutorialHeatedPlate }} then cd tutorials/flow-over-heated-plate/fluid-openfoam - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./run.sh | tee fluid-openfoam.log 2>&1 & + ./openfoam_exec ./run.sh | tee fluid-openfoam.log 2>&1 & PIDfluid=$! cd ../solid-openfoam - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./run.sh | tee solid-openfoam.log 2>&1 + ./openfoam_exec ./run.sh | tee solid-openfoam.log 2>&1 wait $PIDfluid fi - name: Run tutorial quickstart @@ -203,7 +199,7 @@ jobs: echo "Manually changing from solver to motionSolver in dynamicMeshDict for compatibility with OpenFOAM 9." sed -i 's/solver/motionSolver/g' constant/dynamicMeshDict fi - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./run.sh | tee fluid-openfoam.log 2>&1 & + ./openfoam_exec ./run.sh | tee fluid-openfoam.log 2>&1 & PIDfluid=$! cd ../solid-cpp cmake . && make && ./run.sh | tee solid-cpp.log 2>&1 @@ -214,10 +210,10 @@ jobs: if ${{ github.event.inputs.runTutorialPartitionedPipe }} then cd tutorials/partitioned-pipe/fluid1-openfoam-pimplefoam - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./run.sh | tee fluid1-openfoam-pimplefoam.log 2>&1 & + ./openfoam_exec ./run.sh | tee fluid1-openfoam-pimplefoam.log 2>&1 & PIDfluid=$! cd ../fluid2-openfoam-pimplefoam - ${{steps.installOpenFOAM.outputs.openfoam_exec}} ./run.sh | tee fluid2-openfoam-pimplefoam.log 2>&1 & + ./openfoam_exec ./run.sh | tee fluid2-openfoam-pimplefoam.log 2>&1 & wait $PIDfluid fi - name: Archive logs