Move setting of black hole seeds to a nodeOperator
#1381
Workflow file for this run
This file contains 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: 'CI/CD' | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'Makefile' | |
- 'source/**' | |
- 'source/Bivar/**' | |
- 'source/ISO_Varying_String/**' | |
- 'source/gslODEInitVal2/**' | |
- 'source/NSWC/**' | |
- 'source/pFq/**' | |
- 'source/gslSpecFuncApprox/**' | |
- 'source/FFTlog/**' | |
- 'perl/**' | |
- 'perl/File/**' | |
- 'perl/Galacticus/**' | |
- 'perl/Galacticus/Launch/**' | |
- 'perl/Galacticus/Constraints/**' | |
- 'perl/Galacticus/Build/**' | |
- 'perl/Galacticus/Build/Components/**' | |
- 'perl/Galacticus/Build/Components/Classes/**' | |
- 'perl/Galacticus/Build/Components/Implementations/**' | |
- 'perl/Galacticus/Build/Components/Properties/**' | |
- 'perl/Galacticus/Build/Components/TreeNodes/**' | |
- 'perl/Galacticus/Build/Components/Hierarchy/**' | |
- 'perl/Galacticus/Build/SourceTree/**' | |
- 'perl/Galacticus/Build/SourceTree/Parse/**' | |
- 'perl/Galacticus/Build/SourceTree/Analyze/**' | |
- 'perl/Galacticus/Build/SourceTree/Process/**' | |
- 'perl/Galacticus/Build/SourceTree/Process/FunctionClass/**' | |
- 'perl/List/**' | |
- 'perl/Sort/**' | |
- 'perl/LaTeX/**' | |
- 'perl/IO/**' | |
- 'perl/IO/Compress/**' | |
- 'perl/System/**' | |
- 'perl/Fortran/**' | |
- 'python/**' | |
- 'scripts/build/**' | |
- 'schema/**' | |
concurrency: | |
group: cicd-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# Build and deploy | |
## Linux | |
### Static executable and test codes | |
Build-Executable-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository analysis-perl | |
uses: actions/checkout@v4 | |
with: | |
repository: galacticusorg/analysis-perl | |
path: analysis-perl | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_FCFLAGS=$GALACTICUS_FCFLAGS -static" >> $GITHUB_ENV | |
echo "GALACTICUS_ANALYSIS_PERL_PATH=$GITHUB_WORKSPACE/analysis-perl" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
export BUILDPATH=./work/build | |
set -o pipefail | |
make GALACTICUS_BUILD_OPTION=compileprof -j4 all 2>&1 | tee build.log | |
set +o pipefail | |
chmod u=wrx ./scripts/build/buildProfiler.pl | |
./scripts/build/buildProfiler.pl build.log buildProfile.html --durationMinimum 20 | |
grep -vqzi error: build.log || (echo "FAIL: errors found in build.log" && false) | |
grep -vqzi warning: build.log || (echo "FAIL: warnings found in build.log" && false) | |
grep -vqzi 'is up to date' build.log || (echo "FAIL: 'is up to date' found in build.log" && false) | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec | |
path: 'Galacticus.exe' | |
- name: Upload test code executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-execs | |
path: 'tests.*.exe' | |
- name: Upload build profile | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-profile | |
path: 'buildProfile.html' | |
- name: Test preprocessor determinism | |
run: | | |
# Test that the preprocessor produces deterministic output by re-preprocessing one file and checking that the results are unchanged. | |
cd $GALACTICUS_EXEC_PATH | |
cp work/build/mass_distributions.p.F90 work/build/mass_distributions.p.F90.prev | |
cp work/build/mass_distributions.spherical.Sersic.p.F90 work/build/mass_distributions.spherical.Sersic.p.F90.prev | |
touch source/mass_distributions.spherical.Sersic.F90 | |
make -j16 work/build/mass_distributions.p.F90 | |
cmp -s work/build/mass_distributions.p.F90 work/build/mass_distributions.p.F90.prev | |
cmp -s work/build/mass_distributions.spherical.Sersic.p.F90 work/build/mass_distributions.spherical.Sersic.p.F90.prev | |
- run: echo "This job's status is ${{ job.status }}." | |
### Non-static executable | |
Build-Executable-Linux-Non-Static: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository analysis-perl | |
uses: actions/checkout@v4 | |
with: | |
repository: galacticusorg/analysis-perl | |
path: analysis-perl | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_ANALYSIS_PERL_PATH=$GITHUB_WORKSPACE/analysis-perl" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
export BUILDPATH=./work/build | |
set -o pipefail | |
make -j4 Galacticus.exe 2>&1 | tee build.log | |
set +o pipefail | |
! grep -n Error: build.log | |
! grep -n Warning: build.log | |
! grep -v 'is up to date' build.log | grep -n -C 5 make: | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec-non-static | |
path: 'Galacticus.exe' | |
- run: echo "This job's status is ${{ job.status }}." | |
### Executable instrumented | |
Build-Executables-Instrumented-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_DATA_PATH=$GITHUB_WORKSPACE/datasets" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
export GALACTICUS_FCFLAGS="$GALACTICUS_FCFLAGS -pg" | |
export GALACTICUS_CFLAGS="$GALACTICUS_CFLAGS -pg" | |
export GALACTICUS_CPPFLAGS="$GALACTICUS_CPPFLAGS -pg" | |
make -j4 Galacticus.exe | |
- name: Upload executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec-instrumented | |
path: 'Galacticus.exe' | |
- run: echo "This job's status is ${{ job.status }}." | |
### Executable MPI | |
Build-Executables-MPI-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_DATA_PATH=$GITHUB_WORKSPACE/datasets" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
make -j4 GALACTICUS_BUILD_OPTION=MPI Galacticus.exe tests.MPI.exe tests.radiative_transfer.atomic_matter.state_solver.exe | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec-MPI | |
path: 'Galacticus.exe' | |
- name: Upload test code executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-execs-MPI | |
path: 'tests.*.exe' | |
- run: echo "This job's status is ${{ job.status }}." | |
### Executable debugging | |
Build-Executables-Debugging-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_DATA_PATH=$GITHUB_WORKSPACE/datasets" >> $GITHUB_ENV | |
echo "GALACTICUS_FCFLAGS+=\ -DDEBUGGING" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
make -j4 Galacticus.exe tests.debugging.exe | |
- name: Upload test code executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-execs-debugging | |
path: 'tests.*.exe' | |
- run: echo "This job's status is ${{ job.status }}." | |
### Library | |
Build-Library-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- name: Build the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
make -j4 GALACTICUS_BUILD_OPTION=lib libgalacticus.so | |
- name: Package the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
mkdir galacticus | |
mkdir galacticus/lib | |
mkdir galacticus/python | |
# Find all dynamic libraries needed (filtering out some system libs) and copy to our folder. | |
ldd libgalacticus.so | awk '{if (NF == 4) print $3}' | grep -v -e /libc.so -e /libdl.so -e /libm.so -e /libpthread.so -e /librt.so | xargs -n 1 -i{} cp {} galacticus/lib/ | |
mv galacticus.py galacticus/python/ | |
mv libgalacticus.so galacticus/lib/ | |
tar cvfj libgalacticus.tar.bz2 galacticus | |
- name: Upload library | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-library | |
path: 'libgalacticus.tar.bz2' | |
- run: echo "This job's status is ${{ job.status }}." | |
### Docker image | |
Build-Docker-Linux: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: "Detect PR build" | |
id: detectBranch | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
echo Running on a PR - will build, but not push | |
echo "doPush=false" >> "$GITHUB_OUTPUT" | |
else | |
echo Running on a non-PR - will build and push | |
echo "doPush=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: galacticusorg/galacticus | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ steps.detectBranch.outputs.doPush }} | |
tags: ghcr.io/galacticusorg/galacticus:latest | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
BRANCH=${{ github.head_ref || github.ref_name }} | |
### Documentation | |
Build-Documentation-Linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- name: Build the docs | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
./scripts/doc/Build_Documentation.sh -f yes -p 2 | |
- name: Upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-docs | |
path: | | |
./doc/Galacticus_Usage.pdf | |
./doc/Galacticus_Physics.pdf | |
./doc/Galacticus_Development.pdf | |
./doc/Galacticus_Source.pdf | |
- run: echo "This job's status is ${{ job.status }}." | |
### Tools | |
Build-Tools: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
needs: Build-Executable-Linux | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository datasets | |
uses: actions/checkout@v4 | |
with: | |
repository: galacticusorg/datasets | |
path: datasets | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "GALACTICUS_DATA_PATH=$GITHUB_WORKSPACE/datasets" >> $GITHUB_ENV | |
echo "GALACTICUS_FCFLAGS+=\ -static" >> $GITHUB_ENV | |
- name: Download executables | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-exec | |
- name: Build tools | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
mkdir -p $GALACTICUS_DATA_PATH/dynamic | |
chmod u=wrx ./Galacticus.exe | |
./Galacticus.exe parameters/buildTools.xml | |
cd $GALACTICUS_DATA_PATH | |
classVersion=`awk '{if ($1 == "class:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
cambVersion=`awk '{if ($1 == "camb:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
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 \ | |
dynamic/class_public-${classVersion}/class \ | |
dynamic/RecFast/recfast.exe \ | |
dynamic/RecFast/currentVersion \ | |
dynamic/c${cloudyVersion}/source/cloudy.exe \ | |
dynamic/c${cloudyVersion}/data \ | |
dynamic/fsps-${fspsVersion}/src/autosps.exe \ | |
dynamic/fsps-${fspsVersion}/dust \ | |
dynamic/fsps-${fspsVersion}/data \ | |
dynamic/fsps-${fspsVersion}/nebular \ | |
dynamic/fsps-${fspsVersion}/SPECTRA \ | |
dynamic/fsps-${fspsVersion}/OUTPUTS \ | |
dynamic/fsps-${fspsVersion}/ISOCHRONES \ | |
dynamic/mangle-${mangleVersion}/bin/harmonize | |
- name: Upload tools | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-tools | |
path: ./datasets/tools.tar.bz2 | |
- run: echo "This job's status is ${{ job.status }}." | |
## MacOS | |
### Static executable | |
Build-Executable-MacOS: | |
runs-on: macos-13 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: Build Galacticus | |
run: | | |
set -o pipefail | |
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe tests.hashes.cryptographic.exe 2>&1 | tee build.log | |
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log` | |
./scripts/build/staticRelinker.pl `grep '\-o tests.hashes.cryptographic.exe' build.log` | |
dsymutil -o Galacticus.exe.dSYM Galacticus.exe | |
zip -r debugSymbolsMacOS.zip Galacticus.exe.dSYM | |
mv Galacticus.exe Galacticus_MacOS.exe | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec-MacOS | |
path: 'Galacticus_MacOS.exe' | |
- name: Upload test code executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-execs-MacOS | |
path: 'tests.*.exe' | |
- name: Upload Galacticus debug symbols | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-debug-MacOS | |
path: 'debugSymbolsMacOS.zip' | |
### Apple Silicon build | |
Build-Executable-MacOS-M1: | |
runs-on: macos-14 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: Build Galacticus | |
run: | | |
set -o pipefail | |
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe 2>&1 | tee build.log | |
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log` | |
dsymutil -o Galacticus.exe.dSYM Galacticus.exe | |
zip -r debugSymbolsMacOS-M1.zip Galacticus.exe.dSYM | |
mv Galacticus.exe Galacticus_MacOS-M1.exe | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-exec-MacOS-M1 | |
path: 'Galacticus_MacOS-M1.exe' | |
- name: Upload Galacticus debug symbols | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-debug-MacOS-M1 | |
path: 'debugSymbolsMacOS-M1.zip' | |
## Library | |
Build-Library-MacOS: | |
runs-on: macos-13 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: Build Galacticus | |
run: | | |
make -j`sysctl -n hw.activecpu` USEGIT2=no GALACTICUS_BUILD_OPTION=lib libgalacticus.so | |
- name: Package the code | |
run: | | |
cd $GALACTICUS_EXEC_PATH | |
git config --global --add safe.directory $GALACTICUS_EXEC_PATH | |
mkdir galacticus | |
mkdir galacticus/lib | |
mkdir galacticus/python | |
# Find all dynamic libraries needed (filtering out any non-"local" ones) and copy to our folder. | |
otool -L libgalacticus.so | awk '{if (NR > 1) print $1}' | grep -e /usr/local -e /opt/local | xargs -n 1 -I{} cp {} galacticus/lib/ | |
mv galacticus.py galacticus/python/ | |
mv libgalacticus.so galacticus/lib/ | |
zip -r libgalacticusMacOS.zip galacticus | |
- name: Upload library | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-library-MacOS | |
path: 'libgalacticusMacOS.zip' | |
### Tools | |
Build-Tools-MacOS: | |
runs-on: macos-13 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository datasets | |
uses: actions/checkout@v4 | |
with: | |
repository: galacticusorg/datasets | |
path: datasets | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: Build Galacticus | |
run: | | |
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe | |
- name: Build tools | |
run: | | |
export GALACTICUS_EXEC_PATH=`pwd` | |
export FCCOMPILER=gfortran-11 | |
export CCOMPILER=gcc-11 | |
export CPPCOMPILER=g++-11 | |
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib" | |
export GALACTICUS_CFLAGS="-I/usr/local/include -I/opt/local/include" | |
export GALACTICUS_CPPFLAGS="-I/usr/local/include -I/opt/local/include" | |
classVersion=`awk '{if ($1 == "class:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
cambVersion=`awk '{if ($1 == "camb:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
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 | |
set -o pipefail | |
./Galacticus.exe parameters/buildTools.xml 2>&1 | tee build.log | |
cd $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion}/fortran/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 -cpp -Ofast -fopenmp -fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib -JRelease -IRelease/ -I"/Users/runner/work/galacticus/galacticus/datasets/dynamic/CAMB-${cambVersion}/fortran/../forutils/Release/" Release/inidriver.o Release/libcamb.a -L"/Users/runner/work/galacticus/galacticus/datasets/dynamic/CAMB-${cambVersion}/fortran/../forutils/Release/" -lforutils -o camb | |
cd $GALACTICUS_DATA_PATH/dynamic/AxionCAMB/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 -O3 -fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib constants.o utils.o subroutines.o inifile.o power_tilt.o recfast_axion.o reionization.o modules.o bessels.o equations_ppf.o halofit_ppf.o lensing.o SeparableBispectrum.o cmbmain.o camb.o axion_background.o inidriver_axion.F90 -o camb | |
cd $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion}/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o class ' $GALACTICUS_EXEC_PATH/build.log` | |
cd $GALACTICUS_DATA_PATH/dynamic/RecFast/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 recfast.for -o recfast.exe -O3 -ffixed-form -ffixed-line-length-none | |
cd $GALACTICUS_DATA_PATH/dynamic/c${cloudyVersion}/source/ | |
$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 \ | |
dynamic/AxionCAMB/camb \ | |
dynamic/class_public-${classVersion}/class \ | |
dynamic/RecFast/recfast.exe \ | |
dynamic/RecFast/currentVersion \ | |
dynamic/c${cloudyVersion}/source/cloudy.exe \ | |
dynamic/c${cloudyVersion}/data \ | |
dynamic/fsps-${fspsVersion}/src/autosps.exe \ | |
dynamic/fsps-${fspsVersion}/dust \ | |
dynamic/fsps-${fspsVersion}/data \ | |
dynamic/fsps-${fspsVersion}/nebular \ | |
dynamic/fsps-${fspsVersion}/SPECTRA \ | |
dynamic/fsps-${fspsVersion}/OUTPUTS \ | |
dynamic/fsps-${fspsVersion}/ISOCHRONES \ | |
dynamic/mangle-${mangleVersion}/bin/harmonize | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-tools-MacOS | |
path: './datasets/toolsMacOS.zip' | |
- run: echo "This job's status is ${{ job.status }}." | |
Build-Tools-MacOS-M1: | |
runs-on: macos-14 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository datasets | |
uses: actions/checkout@v4 | |
with: | |
repository: galacticusorg/datasets | |
path: datasets | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: Build Galacticus | |
run: | | |
make -j`sysctl -n hw.activecpu` USEGIT2=no Galacticus.exe 2>&1 | tee build.log | |
./scripts/build/staticRelinker.pl `grep '\-o Galacticus.exe' build.log` | |
- name: Build tools | |
run: | | |
export GALACTICUS_EXEC_PATH=`pwd` | |
export FCCOMPILER=gfortran-11 | |
export CCOMPILER=gcc-11 | |
export CPPCOMPILER=g++-11 | |
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib" | |
export GALACTICUS_CFLAGS="-I/usr/local/include -I/opt/local/include" | |
export GALACTICUS_CPPFLAGS="-I/usr/local/include -I/opt/local/include" | |
classVersion=`awk '{if ($1 == "class:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
cambVersion=`awk '{if ($1 == "camb:") print $2}' ${GALACTICUS_EXEC_PATH}/aux/dependencies.yml` | |
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 | |
set -o pipefail | |
./Galacticus.exe parameters/buildTools.xml 2>&1 | tee build.log | |
cd $GALACTICUS_DATA_PATH/dynamic/CAMB-${cambVersion}/fortran/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 -cpp -Ofast -fopenmp -fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib -JRelease -IRelease/ -I"/Users/runner/work/galacticus/galacticus/datasets/dynamic/CAMB-${cambVersion}/fortran/../forutils/Release/" Release/inidriver.o Release/libcamb.a -L"/Users/runner/work/galacticus/galacticus/datasets/dynamic/CAMB-${cambVersion}/fortran/../forutils/Release/" -lforutils -o camb | |
cd $GALACTICUS_DATA_PATH/dynamic/AxionCAMB/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 -O3 -fintrinsic-modules-path /usr/local/include -L/usr/local/lib -L/opt/local/lib constants.o utils.o subroutines.o inifile.o power_tilt.o recfast_axion.o reionization.o modules.o bessels.o equations_ppf.o halofit_ppf.o lensing.o SeparableBispectrum.o cmbmain.o camb.o axion_background.o inidriver_axion.F90 -o camb | |
cd $GALACTICUS_DATA_PATH/dynamic/class_public-${classVersion}/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl `grep -E '\-o class ' $GALACTICUS_EXEC_PATH/build.log` | |
cd $GALACTICUS_DATA_PATH/dynamic/RecFast/ | |
$GALACTICUS_EXEC_PATH/scripts/build/staticRelinker.pl gfortran-11 recfast.for -o recfast.exe -O3 -ffixed-form -ffixed-line-length-none | |
cd $GALACTICUS_DATA_PATH/dynamic/c${cloudyVersion}/source/ | |
$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 \ | |
dynamic/AxionCAMB/camb \ | |
dynamic/class_public-${classVersion}/class \ | |
dynamic/RecFast/recfast.exe \ | |
dynamic/RecFast/currentVersion \ | |
dynamic/c${cloudyVersion}/source/cloudy.exe \ | |
dynamic/c${cloudyVersion}/data \ | |
dynamic/fsps-${fspsVersion}/src/autosps.exe \ | |
dynamic/fsps-${fspsVersion}/dust \ | |
dynamic/fsps-${fspsVersion}/data \ | |
dynamic/fsps-${fspsVersion}/nebular \ | |
dynamic/fsps-${fspsVersion}/SPECTRA \ | |
dynamic/fsps-${fspsVersion}/OUTPUTS \ | |
dynamic/fsps-${fspsVersion}/ISOCHRONES \ | |
dynamic/mangle-${mangleVersion}/bin/harmonize | |
- name: Upload Galacticus executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: galacticus-tools-MacOS-M1 | |
path: './datasets/toolsMacOSM1.zip' | |
- run: echo "This job's status is ${{ job.status }}." | |
# Benchmarks | |
Benchmark-Dark-Matter-Only-Subhalos: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: benchmark-darkMatterOnlySubhalos.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 0 | |
install: time | |
uploadFile: testSuite/outputs/benchmark_darkMatterOnlySubhalos.json | |
uploadName: benchmark-darkMatterOnlySubhalos | |
secrets: inherit | |
Benchmark-Milky-Way-Model: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: benchmark-milkyWay.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 1 | |
install: time | |
uploadFile: testSuite/outputs/benchmark_milkyWayModel.json | |
uploadName: benchmark-milkyWayModel | |
secrets: inherit | |
# Profiling | |
Profile-Dark-Matter-Only-Subhalos: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: perf | |
cacheData: 0 | |
name: darkMatterOnlySubHalos | |
frequency: 500 | |
secrets: inherit | |
Profile-Milky-Way-Model: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: perf | |
cacheData: 1 | |
name: milkyWay | |
frequency: 100 | |
secrets: inherit | |
Profile-Milky-Way-SIDM-Model: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: perf | |
cacheData: 1 | |
name: milkyWay_SIDM | |
frequency: 100 | |
secrets: inherit | |
Profile-Dark-Matter-Only-Subhalos-GProf: | |
needs: Build-Executables-Instrumented-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: gprof | |
cacheData: 0 | |
name: darkMatterOnlySubHalos | |
secrets: inherit | |
Profile-Milky-Way-GProf: | |
needs: Build-Executables-Instrumented-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: gprof | |
cacheData: 1 | |
name: milkyWay | |
Profile-Milky-Way-SIDM-GProf: | |
needs: Build-Executables-Instrumented-Linux | |
uses: ./.github/workflows/profile.yml | |
with: | |
profiler: gprof | |
cacheData: 1 | |
name: milkyWay_SIDM | |
# Validation | |
Validate-Dark-Matter-Only-Subhalos: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: python3 python3-h5py python3-numpy python3-git | |
file: validate-darkMatterOnlySubhalos.py | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 0 | |
uploadFile: ./testSuite/outputs/*.json | |
uploadName: validate-darkMatterOnlySubhalos | |
secrets: inherit | |
Validate-Milky-Way-Model: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: python3 python3-h5py python3-numpy python3-git | |
file: validate-milkyWay.py | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 1 | |
uploadFile: ./testSuite/outputs/*.json | |
uploadName: validate-milkyWayModel | |
secrets: inherit | |
Validate-PonosV: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: python3 python3-h5py python3-numpy python3-git | |
file: validate-PonosV.py | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 0 | |
uploadFile: ./testSuite/outputs/*.json | |
uploadName: validate-PonosV | |
secrets: inherit | |
Validate-Baryonic-Suppression: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: python3 python3-h5py python3-numpy python3-git | |
file: validate-baryonicSuppression.py | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 0 | |
uploadFile: ./testSuite/outputs/*.json | |
uploadName: validate-baryonicSuppression | |
secrets: inherit | |
Validate-Idealized-Subhalo-Simulations: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: python3 python3-h5py python3-numpy python3-git | |
file: validate-idealizedSubhaloSimulations.py | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
cacheData: 0 | |
uploadFile: ./testSuite/outputs/*.json | |
uploadName: validate-idealizedSubhaloSimulations | |
secrets: inherit | |
# Tests | |
## Linux | |
### Test Codes | |
Codes: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
executable: [ tests.nodes.exe, | |
tests.parameters.exe, | |
tests.files.exe, | |
tests.IO.XML.exe, | |
tests.ODE_solver.exe, | |
tests.random.exe, | |
tests.random.quasi.exe, | |
tests.arrays.exe, | |
tests.meshes.exe, | |
tests.convex_hulls.exe, | |
tests.comparisons.exe, | |
tests.geometry.coordinate_systems.exe, | |
tests.hashes.exe, | |
tests.hashes.perfect.exe, | |
tests.regular_expressions.exe, | |
tests.hashes.cryptographic.exe, | |
tests.integration.exe, | |
tests.integration2.exe, | |
tests.differentiation.exe, | |
tests.tables.exe, | |
tests.interpolation.exe, | |
tests.interpolation.2D.exe, | |
tests.make_ranges.exe, | |
tests.mass_distributions.exe, | |
tests.math_special_functions.exe, | |
tests.math_distributions.exe, | |
tests.math.fast.exe, | |
tests.math.arithmetic.exe, | |
tests.math.linear_algebra.exe, | |
tests.root_finding.exe, | |
tests.multi_dimensional_minimizer.exe, | |
tests.search.exe, | |
tests.Roman_numerals.exe, | |
tests.SI_prefixes.exe, | |
tests.sort.exe, | |
tests.sort.topological.exe, | |
tests.string_utilities.exe, | |
tests.vectors.exe, | |
tests.multi_counters.exe, | |
tests.tensors.exe, | |
tests.cosmic_age.exe, | |
tests.spherical_collapse.open.exe, | |
tests.spherical_collapse.flat.exe, | |
tests.spherical_collapse.dark_energy.EdS.exe, | |
tests.spherical_collapse.dark_energy.open.exe, | |
tests.spherical_collapse.dark_energy.lambda.exe, | |
tests.spherical_collapse.dark_energy.constantEoSminusHalf.exe, | |
tests.spherical_collapse.dark_energy.constantEoSminusTwoThirds.exe, | |
tests.spherical_collapse.dark_energy.constantEoSminus0.6.exe, | |
tests.spherical_collapse.dark_energy.constantEoSminus0.8.exe, | |
tests.spherical_collapse.baryons_dark_matter.exe, | |
tests.spherical_collapse.nonlinear.exe, | |
tests.warm_dark_matter.exe, | |
tests.linear_growth.cosmological_constant.exe, | |
tests.linear_growth.EdS.exe, | |
tests.linear_growth.open.exe, | |
tests.linear_growth.dark_energy.exe, | |
tests.linear_growth.baryons.EdS.exe, | |
tests.halo_mass_function.Tinker.exe, | |
tests.halo_mass_function.Reed2007.exe, | |
tests.halo_mass_function.environment_averaged.exe, | |
tests.comoving_distance.exe, | |
tests.mass_accretion_history.Correa2015.exe, | |
tests.Zhao2009_algorithms.dark_energy.exe, | |
tests.Zhao2009_algorithms.EdS.exe, | |
tests.Zhao2009_algorithms.open.exe, | |
tests.NFW96_concentration.dark_energy.exe, | |
tests.Prada2011_concentration.exe, | |
tests.DiemerKravtsov2014_concentration.exe, | |
tests.concentration.Correa2015.exe, | |
tests.concentrations.exe, | |
tests.biases.exe, | |
tests.kepler_orbits.exe, | |
tests.abundances.exe, | |
tests.sigma.exe, | |
tests.power_spectrum.primordial.exe, | |
tests.power_spectrum.exe, | |
tests.transfer_functions.exe, | |
tests.black_hole_fundamentals.exe, | |
tests.bug745815.exe, | |
tests.gaunt_factors.exe, | |
tests.cooling_functions.exe, | |
tests.accretion_disks.exe, | |
tests.mass_accretion_history.Hearin2021.exe, | |
tests.mass_accretion_history.Hearin2021_stochastic.exe, | |
tests.dark_matter_profiles.exe, | |
tests.dark_matter_profiles.projected.exe, | |
tests.dark_matter_profiles.adiabaticGnedin2004.exe, | |
tests.dark_matter_profiles.heated.exe, | |
tests.dark_matter_halo_radius_enclosing_mass.exe, | |
tests.dark_matter_profiles.tidal_tracks.exe, | |
tests.dark_matter_profiles.generic.exe, | |
tests.dark_matter_profiles.finite_resolution.exe, | |
tests.dark_matter_profiles.Zhao1996.exe, | |
tests.spectra.postprocess.Inoue2014.exe, | |
tests.recombination_computed.exe, | |
tests.recombination_cooling.Hummer.exe, | |
tests.locks.exe, | |
tests.initial_mass_functions.exe, | |
tests.stellar_populations.exe, | |
tests.stellar_populations.luminosities.exe, | |
tests.excursion_sets.exe, | |
tests.merger_tree_branching.exe, | |
tests.event_hooks.exe, | |
tests.tree_branch_destroy.exe, | |
tests.binary_search_trees.exe, | |
tests.orbits.exe, | |
tests.debugging.exe, | |
tests.hashes.cryptographic.exe ] | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: ${{ matrix.executable }} | |
artifact: test-execs | |
secrets: inherit | |
### Test HDF5 IO | |
IO-HDF5: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: tests.IO.HDF5.exe | |
artifact: test-execs | |
requirePython: 1 | |
secrets: inherit | |
### Test Crash | |
Crash: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: tests.crash.exe | |
artifact: test-execs | |
expectCrash: 1 | |
secrets: inherit | |
### Test Fail | |
Fail: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: tests.fail.exe | |
artifact: test-execs | |
expectFail: 1 | |
secrets: inherit | |
### MPI Test Codes | |
Codes-MPI: | |
needs: Build-Executables-MPI-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
executable: [ tests.MPI.exe, | |
tests.radiative_transfer.atomic_matter.state_solver.exe ] | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: ${{ matrix.executable }} | |
artifact: test-execs-MPI | |
mpi: 1 | |
secrets: inherit | |
### Debugging Test Codes | |
Codes-Debugging: | |
needs: Build-Executables-Debugging-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
executable: [ tests.debugging.exe ] | |
uses: ./.github/workflows/testCode.yml | |
with: | |
executable: ${{ matrix.executable }} | |
artifact: test-execs-debugging | |
secrets: inherit | |
### Cosmology | |
Cosmology: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:2", "2:2" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-cosmology.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
### Mass Conservation | |
Mass-Conservation: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ "test-mass-conservation-simple.pl", "test-mass-conservation-standard.pl", "test-mass-conservation-coldMode.pl" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4" | |
secrets: inherit | |
### Merger Trees | |
Merger-Tree-Builder: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:4", "2:4", "3:4", "4:4" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-merger-tree-builder.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
Merger-Tree-Write: | |
needs: Build-Executable-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-merger-tree-write.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4" | |
needsIRATE: 1 | |
secrets: inherit | |
## Model Integration | |
Model-Integration: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:2", "2:2" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-model-integration.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
## Misc Models | |
Miscellaneous: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ test-allowed-parameters.pl, | |
test-bar-instability.pl, | |
test-transfer-functions-axion.pl, | |
test-mass-definitions.pl, | |
test-branchlessTrees.pl, | |
test-branchSubsampling.pl, | |
test-CGM-mass-cooled.pl, | |
test-concentration-Ludlow2016.pl, | |
test-concentration-Johnson2021.pl, | |
test-tidallyTruncatedNFWFit.pl, | |
test-constraint-deterministic-spins.pl, | |
test-constraint-mass-function.pl, | |
test-extract-directives.pl, | |
test-fortran-utils.pl, | |
test-halo-mass-functions.py, | |
test-inactive_luminosities.pl, | |
test-interoutput-star-formation-rate.pl, | |
test-mass-host-maximum.pl, | |
test-noninstantaneous-recycling.pl, | |
test-satellite-distance-minimum.pl, | |
test-treeFilterLabels.pl, | |
test-output.pl, | |
test-output-times.pl, | |
test-output-tree-contiguousity.pl, | |
test-outputSelector.pl, | |
test-parameter-validation.pl, | |
test-perl-modules.pl, | |
test-reproducibility.pl, | |
test-splitForests.pl, | |
test-parameters-diff.py, | |
test-parameters-extract.py, | |
test-output-datasets-suffixes.py, | |
test-star-formation-histories.py, | |
test-star-formation-histories-adaptive.py, | |
test-star-formation-histories-inSitu.py, | |
test-star-formation-histories-fixedAge.py, | |
test-mostMassiveProgenitorIsSubhalo.py, | |
test-lightcone-crossing.py, | |
test-massProfileSatelliteBoundMass.py, | |
test-UniverseMachine.py, | |
test-spheroid-power-law.py, | |
test-stateRestore.pl, | |
test-checkpointing.pl, | |
test-stellar-mass-weighted-ages.pl, | |
test-tidalTracks.pl, | |
test-transferFunctionHalfModeSlope.pl, | |
test-galacticStructureStateDeallocateBug.pl, | |
test-inactiveNumerics.pl, | |
test-impulsiveHeating.pl, | |
test-haloTriaxiality.pl, | |
test-parallelTreeBuild.pl, | |
test-duplicatedOutputPropertyName.pl ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
secrets: inherit | |
Miscellaneous-IRATE: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ test-Bolshoi-tree-builder.pl, | |
test-Millennium-tree-builder.pl ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
install: python3 python3-h5py python3-numpy | |
runPath: ./testSuite | |
needsIRATE: 1 | |
secrets: inherit | |
Miscellaneous-Deep: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ test-parameter-migration.pl ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
fetchDepth: 0 | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
secrets: inherit | |
Miscellaneous-Cached: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ test-constrained-merger-trees.pl ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
cacheData: 1 | |
runPath: ./testSuite | |
secrets: inherit | |
Miscellaneous-Models: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ testSuite/parameters/mergerTreeEvolverThreaded.xml ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
secrets: inherit | |
### Outputs | |
Outputs: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:10", "2:10", "3:10", "4:10", "5:10", "6:10", "7:10", "8:10", "9:10", "10:10" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-outputs.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
### Regressions | |
Regressions: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ testSuite/regressions/bug1066052.pl, | |
testSuite/regressions/adaptiveSFHLengths.py, | |
testSuite/regressions/mergerTreeBoxSizeWeight.pl, | |
testSuite/regressions/satellitePresetBoundMassNonZero.pl, | |
testSuite/regressions/setProperties.pl, | |
testSuite/regressions/cosmicEmu.pl, | |
testSuite/regressions/bug1053153.xml, | |
testSuite/regressions/bug711424.xml, | |
testSuite/regressions/bug725315.xml, | |
testSuite/regressions/coincidentMergerAndBranchJump.xml, | |
testSuite/regressions/deadlockMergeTargetInDescendentOfMergee2.xml, | |
testSuite/regressions/deadlockMergeTargetInDescendentOfMergee.xml, | |
testSuite/regressions/finalTimeBeforeOutputTime.xml, | |
testSuite/regressions/immediateSubSubMergerThenBranchJump.xml, | |
testSuite/regressions/initialSatelliteNoPrimaryProgenitor.xml, | |
testSuite/regressions/linearGrowthForFutureModel.xml, | |
testSuite/regressions/ludlowScaleSetBeforeTreeInitialization.xml, | |
testSuite/regressions/mergerAtFinalTimeInTree.xml, | |
testSuite/regressions/particulate.xml, | |
testSuite/regressions/subhaloMergesAtFinalTimeOfTree.xml, | |
testSuite/regressions/subhaloTwoConsecutiveMergers.xml, | |
testSuite/regressions/treeWithInitialSatelliteInProgenitorlessHost.xml, | |
testSuite/regressions/treeWithNoPrimaryProgenitor.xml, | |
testSuite/regressions/preInfallEvolutionNotOnMainBranch.xml, | |
testSuite/regressions/outputRank2ExtendSegFault.xml, | |
testSuite/regressions/barInstabilityFPE.xml, | |
testSuite/regressions/haloMassFunctionWDMIndeterminateCollapseTime.xml, | |
testSuite/regressions/lightconeCrossingTests.xml, | |
testSuite/regressions/lightconeCrossingTestsSubresolutionMerging.xml, | |
testSuite/regressions/lightconeCrossingAtCurrentTime.xml ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
secrets: inherit | |
Regressions-Cached: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
file: [ testSuite/regressions/cole2000TreeBuilderWDMNodeWellOrdering.xml, | |
testSuite/regressions/issue142.xml ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: ${{ matrix.file }} | |
artifact: galacticus-exec | |
cacheData: 1 | |
secrets: inherit | |
### Methods | |
Methods: | |
needs: Build-Executable-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:20", "2:20", "3:20", "4:20", "5:20", "6:20", "7:20", "8:20", "9:20", "10:20", "11:20", "12:20", "13:20", "14:20", "15:20", "16:20", "17:20", "18:20", "19:20", "20:20" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-methods.pl | |
artifact: galacticus-exec | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 4 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
### MPI Misc Models | |
MPI-State-Restore: | |
needs: Build-Executables-MPI-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-stateRestore_MPI.pl | |
artifact: galacticus-exec-MPI | |
runPath: ./testSuite | |
options: --processesPerNode 8 --allow-run-as-root yes | |
secrets: inherit | |
MPI-Radiative-Transfer-Stromgren-Sphere: | |
needs: Build-Executables-MPI-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-radiativeTransfer-StromgrenSphere_MPI.pl | |
artifact: galacticus-exec-MPI | |
runPath: ./testSuite | |
options: --processesPerNode 4 --allow-run-as-root yes | |
secrets: inherit | |
MPI-MCMC: | |
needs: Build-Executables-MPI-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: parameters/tutorials/mcmcConfig.xml | |
artifact: galacticus-exec-MPI | |
mpi: 1 | |
processesPerNode: 4 | |
secrets: inherit | |
### MPI Methods | |
Methods-MPI: | |
needs: Build-Executables-MPI-Linux | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
instance: [ "1:2", "2:2" ] | |
uses: ./.github/workflows/testModel.yml | |
with: | |
file: test-methods_MPI.pl | |
artifact: galacticus-exec-MPI | |
runPath: ./testSuite | |
options: "--launchMethod local --threadMaximum 1 --ompThreads 1 --instance ${{ matrix.instance }}" | |
secrets: inherit | |
### Memory leaks (non-MPI) | |
Memory-Leaks: | |
needs: Build-Executable-Linux-Non-Static | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: valgrind | |
file: test-memory-leaks.pl | |
artifact: galacticus-exec-non-static | |
runPath: ./testSuite | |
options: --mpi 0 | |
secrets: inherit | |
### Memory leaks (MPI) | |
Memory-Leaks-MPI: | |
needs: Build-Executables-MPI-Linux | |
uses: ./.github/workflows/testModel.yml | |
with: | |
install: valgrind | |
file: test-memory-leaks.pl | |
artifact: galacticus-exec-MPI | |
runPath: ./testSuite | |
options: --mpi 1 | |
secrets: inherit | |
## Python Interface | |
Python-Interface: | |
runs-on: ubuntu-latest | |
container: ghcr.io/galacticusorg/buildenv:latest | |
needs: Build-Library-Linux | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "PYTHONPATH=$GITHUB_WORKSPACE/galacticus/python" >> $GITHUB_ENV | |
- name: Install Python | |
run: | | |
apt -y update && apt -y upgrade | |
apt -y install python3 | |
- name: Download library | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-library | |
- name: Test interface | |
run: | | |
tar xvfj libgalacticus.tar.bz2 | |
python3 testSuite/test-Python-interface.py | |
- run: echo "This job's status is ${{ job.status }}." | |
## MacOS | |
### Test Codes | |
Codes-MacOS: | |
needs: Build-Executable-MacOS | |
strategy: | |
# Ensure all jobs are run, even if some fail. | |
fail-fast: false | |
matrix: | |
executable: [ tests.hashes.cryptographic.exe ] | |
uses: ./.github/workflows/testCode.yml | |
with: | |
runner: macos-13 | |
executable: ${{ matrix.executable }} | |
artifact: test-execs-MacOS | |
secrets: inherit | |
### Test Python Interface | |
Python-Interface-MacOS: | |
runs-on: macos-13 | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job is now running on a ${{ runner.os }} server." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up build environment | |
uses: ./.github/actions/buildMacOS | |
- name: "Set environmental variables" | |
run: | | |
echo "GALACTICUS_EXEC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "PYTHONPATH=$GITHUB_WORKSPACE/galacticus/python" >> $GITHUB_ENV | |
- name: Install Python | |
run: | | |
sudo port install python312 | |
sudo port select --set python python312 | |
sudo port select --set python3 python312 | |
- name: Build Galacticus | |
run: | | |
make -j`sysctl -n hw.activecpu` USEGIT2=no GALACTICUS_BUILD_OPTION=lib libgalacticus.so | |
mkdir galacticus | |
mkdir galacticus/lib | |
mkdir galacticus/python | |
mv galacticus.py galacticus/python/ | |
mv libgalacticus.so galacticus/lib/ | |
- name: Test interface | |
run: | | |
python3 testSuite/test-Python-interface.py | |
- run: echo "This job's status is ${{ job.status }}." | |
# Validate, deploy and update | |
Validate: | |
runs-on: ubuntu-latest | |
needs: [ Benchmark-Dark-Matter-Only-Subhalos, Benchmark-Milky-Way-Model, Validate-Dark-Matter-Only-Subhalos, Validate-Milky-Way-Model, Validate-PonosV, Validate-Baryonic-Suppression, Validate-Idealized-Subhalo-Simulations ] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: 'Dark matter-only subhalos benchmarks' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Dark matter-only subhalos benchmarks' | |
type: 'benchmark' | |
suffix: 'darkMatterOnlySubhalos' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Milky Way model benchmarks' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Milky Way model benchmarks' | |
type: 'benchmark' | |
suffix: 'milkyWayModel' | |
threshold: '140%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Dark matter-only subhalos validation' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Dark matter-only subhalos benchmarks' | |
type: 'validate' | |
suffix: 'darkMatterOnlySubhalos' | |
threshold: '125%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Milky Way model validation' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Milky Way model benchmarks' | |
type: 'validate' | |
suffix: 'milkyWayModel' | |
threshold: '240%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.005; γ=1.5)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.005; γ=1.5)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.005_gamma1.5' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.01; γ=1.5)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.01; γ=1.5)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.01_gamma1.5' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.05; γ=0.5)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.05; γ=0.5)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.05_gamma0.5' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.05; γ=1.0)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.05; γ=1.0)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.05_gamma1.0' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=0.0)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=0.0)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.2_gamma0.0' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=0.5)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=0.5)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.2_gamma0.5' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=1.0)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.2; γ=1.0)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.2_gamma1.0' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Idealized subhalo simulations (rₚ/rₐ=0.4; γ=0.0)' | |
uses: ./.github/actions/benchmark | |
with: | |
name: 'Idealized subhalo simulations (rₚ/rₐ=0.4; γ=0.0)' | |
type: 'validate' | |
artifact: 'validate-idealizedSubhaloSimulations' | |
suffix: 'idealizedSubhaloSimulation_rpra0.4_gamma0.0' | |
threshold: '110%' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download artifacts (validate-PonosV) | |
uses: actions/download-artifact@v4 | |
with: | |
name: validate-PonosV | |
- name: Download artifacts (validate-baryonicSuppression) | |
uses: actions/download-artifact@v4 | |
with: | |
name: validate-baryonicSuppression | |
- name: Download artifacts (build-profile) | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-profile | |
- name: Push validation results | |
run: | | |
git checkout gh-pages | |
mkdir -p dev/valid/darkMatterOnlySubhalos | |
mkdir -p dev/valid/milkyWayModel | |
mkdir -p dev/valid/strongLensing | |
mkdir -p dev/valid/idealizedSubhaloSimulations | |
mv results_darkMatterOnlySubhalos.json dev/valid/darkMatterOnlySubhalos/results.json | |
mv results_milkyWayModel.json dev/valid/milkyWayModel/results.json | |
mv results_PonosV.json dev/valid/strongLensing/results_PonosV.json | |
mv results_baryonicSuppression.json dev/valid/baryonicSuppression/results_baryonicSuppression.json | |
mv results_idealizedSubhaloSimulation_*.json dev/valid/idealizedSubhaloSimulations/ | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-action-validate" | |
git add dev/valid/darkMatterOnlySubhalos/results.json dev/valid/milkyWayModel/results.json dev/valid/strongLensing/results_PonosV.json dev/valid/baryonicSuppression/results_baryonicSuppression.json dev/valid/idealizedSubhaloSimulations/results_idealizedSubhaloSimulation_*.json | |
git commit -m "Update validation results" | |
git push --set-upstream origin gh-pages | |
git checkout - | |
if: github.event_name != 'pull_request' | |
- name: Push build profile | |
run: | | |
git checkout gh-pages | |
mkdir -p dev/bench/meta | |
mv buildProfile.html dev/bench/meta/buildProfile.html | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-action-validate" | |
git add dev/bench/meta/buildProfile.html | |
git commit -m "Update build profile" | |
git push --set-upstream origin gh-pages | |
git checkout - | |
if: github.event_name != 'pull_request' | |
Deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: [ Build-Executable-Linux, | |
Build-Executables-Instrumented-Linux, | |
Build-Executables-MPI-Linux, | |
Build-Library-Linux, | |
Build-Docker-Linux, | |
Build-Documentation-Linux, | |
Build-Tools, | |
Build-Executable-MacOS, | |
Build-Executable-MacOS-M1, | |
Build-Library-MacOS, | |
Build-Tools-MacOS, | |
Build-Tools-MacOS-M1, | |
Profile-Dark-Matter-Only-Subhalos, | |
Profile-Milky-Way-Model, | |
Profile-Milky-Way-SIDM-Model, | |
Profile-Dark-Matter-Only-Subhalos-GProf, | |
Profile-Milky-Way-GProf, | |
Profile-Milky-Way-SIDM-GProf, | |
Codes, | |
Crash, | |
Fail, | |
Codes-MPI, | |
Codes-Debugging, | |
Memory-Leaks, | |
Memory-Leaks-MPI, | |
Cosmology, | |
Mass-Conservation, | |
Merger-Tree-Builder, | |
Merger-Tree-Write, | |
Model-Integration, | |
Miscellaneous, | |
Miscellaneous-Cached, | |
Miscellaneous-IRATE, | |
Miscellaneous-Deep, | |
Miscellaneous-Models, | |
Outputs, | |
Regressions, | |
Regressions-Cached, | |
Methods, | |
Methods-MPI, | |
MPI-State-Restore, | |
MPI-Radiative-Transfer-Stromgren-Sphere, | |
MPI-MCMC, | |
Python-Interface, | |
Codes-MacOS, | |
Python-Interface-MacOS, | |
Validate ] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Download artifacts (executable-linux) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-exec | |
- name: Download artifacts (library-linux) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-library | |
- name: Download artifacts (docs) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-docs | |
- name: Download artifacts (tools-linux) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-tools | |
- name: Upload assets to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload bleeding-edge ./Galacticus.exe ./libgalacticus.tar.bz2 ./Galacticus_Usage.pdf ./Galacticus_Physics.pdf ./Galacticus_Development.pdf ./Galacticus_Source.pdf ./tools.tar.bz2 --clobber | |
rm ./Galacticus.exe ./libgalacticus.tar.bz2 ./Galacticus_Usage.pdf ./Galacticus_Physics.pdf ./Galacticus_Development.pdf ./Galacticus_Source.pdf ./tools.tar.bz2 | |
- name: Download artifacts (executable-macos) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-exec-MacOS | |
- name: Download artifacts (debug-macos) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-debug-MacOS | |
- name: Download artifacts (executable-macos-m1) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-exec-MacOS-M1 | |
- name: Download artifacts (debug-macos-m1) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-debug-MacOS-M1 | |
- name: Download artifacts (library-macos) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-library-MacOS | |
- name: Download artifacts (tools-macos) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-tools-MacOS | |
- name: Download artifacts (tools-macos-m1) | |
uses: actions/download-artifact@v4 | |
with: | |
name: galacticus-tools-MacOS-M1 | |
- name: Upload assets to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload bleeding-edge ./Galacticus_MacOS.exe ./Galacticus_MacOS-M1.exe ./libgalacticusMacOS.zip ./toolsMacOS.zip ./toolsMacOSM1.zip ./debugSymbolsMacOS.zip ./debugSymbolsMacOS-M1.zip --clobber | |
rm ./Galacticus_MacOS.exe ./libgalacticusMacOS.zip ./toolsMacOS.zip ./toolsMacOSM1.zip ./debugSymbolsMacOS.zip | |
- name: Download artifacts (perf-darkMatterOnlySubHalos) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-darkMatterOnlySubHalos | |
- name: Download artifacts (perf-milkyWay) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-milkyWay | |
- name: Download artifacts (perf-milkyWay_SIDM) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-milkyWay_SIDM | |
- name: Download artifacts (perf-darkMatterOnlySubHalos-gprof) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-darkMatterOnlySubHalos-gprof | |
- name: Download artifacts (perf-milkyWay-gprof) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-milkyWay-gprof | |
- name: Download artifacts (perf-milkyWay_SIDM-gprof) | |
uses: actions/download-artifact@v4 | |
with: | |
name: perf-milkyWay_SIDM-gprof | |
- name: Upload assets to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload bleeding-edge ./darkMatterOnlySubHalos.perf.bz2 ./milkyWay.perf.bz2 ./milkyWay_SIDM.perf.bz2 ./darkMatterOnlySubHalos.gprof.bz2 ./milkyWay.gprof.bz2 ./milkyWay_SIDM.gprof.bz2 --clobber | |
rm ./darkMatterOnlySubHalos.perf.bz2 ./milkyWay.perf.bz2 ./milkyWay_SIDM.perf.bz2 ./darkMatterOnlySubHalos.gprof.bz2 ./milkyWay.gprof.bz2 ./milkyWay_SIDM.gprof.bz2 | |
Update-Release-Tag: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: Deploy | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Update tag | |
run: | | |
git tag -f bleeding-edge | |
git push origin -f bleeding-edge | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "This job's status is ${{ job.status }}." |