Skip to content

Commit

Permalink
Replace GitHub Actions step output by file
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Mar 20, 2024
1 parent 656d4c0 commit de48261
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit de48261

Please sign in to comment.