Skip to content

Commit

Permalink
Merge pull request #631 from galacticusorg/featMangleBuild
Browse files Browse the repository at this point in the history
Build `mangle` from our forked repo
  • Loading branch information
abensonca authored Jun 20, 2024
2 parents e537fec + c125352 commit 1810d5a
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 39 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,14 @@ jobs:
forutilsVersion=`awk '{if ($1 == "forutils:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
fspsVersion=`awk '{if ($1 == "fsps:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cloudyVersion=`awk '{if ($1 == "cloudy:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
mangleVersion=`awk '{if ($1 == "mangle:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
# Check that executables were statically linked
! ldd dynamic/CAMB-${cambVersion}/fortran/camb
! ldd dynamic/AxionCAMB/camb
! ldd dynamic/class_public-${classVersion}/class
! ldd dynamic/RecFast/recfast.exe
! ldd dynamic/fsps-${fspsVersion}/src/autosps.exe
! ldd dynamic/mangle-${mangleVersion}/bin/ransack
tar cfj tools.tar.bz2 \
dynamic/CAMB-${cambVersion}/fortran/camb \
dynamic/AxionCAMB/camb \
Expand All @@ -392,7 +394,8 @@ jobs:
dynamic/fsps-${fspsVersion}/nebular \
dynamic/fsps-${fspsVersion}/SPECTRA \
dynamic/fsps-${fspsVersion}/OUTPUTS \
dynamic/fsps-${fspsVersion}/ISOCHRONES
dynamic/fsps-${fspsVersion}/ISOCHRONES \
dynamic/mangle-${mangleVersion}/bin/harmonize
- name: Upload tools
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -532,6 +535,7 @@ jobs:
forutilsVersion=`awk '{if ($1 == "forutils:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
fspsVersion=`awk '{if ($1 == "fsps:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cloudyVersion=`awk '{if ($1 == "cloudy:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
mangleVersion=`awk '{if ($1 == "mangle:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cd $GALACTICUS_EXEC_PATH
git config --global --add safe.directory $GALACTICUS_EXEC_PATH
mkdir -p $GALACTICUS_DATA_PATH/dynamic
Expand All @@ -549,6 +553,8 @@ jobs:
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o cloudy.exe' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion}/src
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o autosps.exe' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH/dynamic/mangle-${mangleVersion}/bin/
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o harmonize' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH
zip -r toolsMacOS.zip \
dynamic/CAMB-${cambVersion}/fortran/camb \
Expand All @@ -564,7 +570,8 @@ jobs:
dynamic/fsps-${fspsVersion}/nebular \
dynamic/fsps-${fspsVersion}/SPECTRA \
dynamic/fsps-${fspsVersion}/OUTPUTS \
dynamic/fsps-${fspsVersion}/ISOCHRONES
dynamic/fsps-${fspsVersion}/ISOCHRONES \
dynamic/mangle-${mangleVersion}/bin/harmonize
- name: Upload Galacticus executable
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -605,6 +612,7 @@ jobs:
forutilsVersion=`awk '{if ($1 == "forutils:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
fspsVersion=`awk '{if ($1 == "fsps:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cloudyVersion=`awk '{if ($1 == "cloudy:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
mangleVersion=`awk '{if ($1 == "mangle:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cd $GALACTICUS_EXEC_PATH
git config --global --add safe.directory $GALACTICUS_EXEC_PATH
mkdir -p $GALACTICUS_DATA_PATH/dynamic
Expand All @@ -622,6 +630,8 @@ jobs:
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o cloudy.exe' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion}/src
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o autosps.exe' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH/dynamic/mangle-${mangleVersion}/bin/
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o harmonize' $GALACTICUS_EXEC_PATH/build.log`
cd $GALACTICUS_DATA_PATH
zip -r toolsMacOSM1.zip \
dynamic/CAMB-${cambVersion}/fortran/camb \
Expand All @@ -637,7 +647,8 @@ jobs:
dynamic/fsps-${fspsVersion}/nebular \
dynamic/fsps-${fspsVersion}/SPECTRA \
dynamic/fsps-${fspsVersion}/OUTPUTS \
dynamic/fsps-${fspsVersion}/ISOCHRONES
dynamic/fsps-${fspsVersion}/ISOCHRONES \
dynamic/mangle-${mangleVersion}/bin/harmonize
- name: Upload Galacticus executable
uses: actions/upload-artifact@v4
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/dependencyBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,30 @@ jobs:
branch: depup/${{ steps.depup.outputs.branch }}
assignees: abensonca
token: ${{ steps.generate-token.outputs.token }}
mangle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.DEPLOY_APP_ID }}
private_key: ${{ secrets.DEPLOY_APP_PRIVATE_KEY }}
- uses: reviewdog/action-depup@v1
id: depup
with:
file: aux/dependencies.yml
version_name: mangle
repo: galacticusorg/mangle
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "fix(deps): update ${{ steps.depup.outputs.repo }} to ${{ steps.depup.outputs.latest }}"
commit-message: "fix(deps): update ${{ steps.depup.outputs.repo }} to ${{ steps.depup.outputs.latest }}"
body: |
Update ${{ steps.depup.outputs.repo }} to [${{ steps.depup.outputs.latest }}](https://github.com/${{ steps.depup.outputs.repo }}/releases/tag/v${{ steps.depup.outputs.latest }})
This PR is auto generated by [dependencyBot](https://github.com/${{ github.repository }}/actions?query=workflow%3A${{ github.workflow }}).
branch: depup/${{ steps.depup.outputs.repo }}
assignees: abensonca
token: ${{ steps.generate-token.outputs.token }}
3 changes: 2 additions & 1 deletion .github/workflows/profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ jobs:
forutilsVersion=`awk '{if ($1 == "forutils:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
fspsVersion=`awk '{if ($1 == "fsps:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cloudyVersion=`awk '{if ($1 == "cloudy:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
mangleVersion=`awk '{if ($1 == "mangle:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} \) -prune -o -type f -anewer mark.time -print
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} \) -prune -o -type f -not -anewer mark.time -print0 | xargs --no-run-if-empty -0 rm
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/mangle-${mangleVersion} \) -prune -o -type f -not -anewer mark.time -print0 | xargs --no-run-if-empty -0 rm
- name: Upload profile
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/testModel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ jobs:
forutilsVersion=`awk '{if ($1 == "forutils:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
fspsVersion=`awk '{if ($1 == "fsps:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
cloudyVersion=`awk '{if ($1 == "cloudy:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} \) -prune -o -type f -anewer mark.time -print
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} \) -prune -o -type f -not -anewer mark.time -print0 | xargs --no-run-if-empty -0 rm
mangleVersion=`awk '{if ($1 == "mangle:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml`
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/mangle-${mangleVersion} \) -prune -o -type f -anewer mark.time -print
find $GALACTICUS_DATA_PATH/dynamic/ -type d \( -path $GALACTICUS_DATA_PATH/dynamic/fsps-${fspsVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/AxionCAMB -o -path $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/RecFast -o -path $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion} -o -path $GALACTICUS_DATA_PATH/dynamic/mangle-${mangleVersion} \) -prune -o -type f -not -anewer mark.time -print0 | xargs --no-run-if-empty -0 rm
- name: Upload result
if: inputs.uploadName != '' && inputs.uploadFile != ''
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions aux/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ camb: 1.5.5
forutils: 1.0
fsps: 3.2
cloudy: 23.01
mangle: 2.3.2
1 change: 1 addition & 0 deletions parameters/buildTools.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<task value="buildToolCLASS"/>
<task value="buildToolRecFast"/>
<task value="buildToolCloudy"/>
<task value="buildToolMangle"/>
</task>

</parameters>
Loading

0 comments on commit 1810d5a

Please sign in to comment.