Skip to content

Allow epochs to be specified as redshifts in the outputTimesUniformSpacingInTime class #743

Allow epochs to be specified as redshifts in the outputTimesUniformSpacingInTime class

Allow epochs to be specified as redshifts in the outputTimesUniformSpacingInTime class #743

Workflow file for this run

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/**'
- '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 -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
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'
- 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@v5
with:
push: ${{ steps.detectBranch.outputs.doPush }}
tags: ghcr.io/galacticusorg/galacticus:latest
labels: ${{ steps.meta.outputs.labels }}
### 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`
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
- 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-11
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 -j3 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'
## Library
Build-Library-MacOS:
runs-on: macos-11
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 -j3 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-11
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 -j3 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`
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
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
- 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 }}."
# 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_milkyWay.json
uploadName: benchmark-milkyWay
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:
file: validate-darkMatterOnlySubhalos.pl
artifact: galacticus-exec
runPath: ./testSuite
cacheData: 0
uploadFile: ./testSuite/outputs/*.json
uploadName: validation-darkMatterOnlySubhalos
secrets: inherit
Validate-Milky-Way-Model:
needs: Build-Executable-Linux
uses: ./.github/workflows/testModel.yml
with:
file: validate-milkyWay.pl
artifact: galacticus-exec
runPath: ./testSuite
cacheData: 1
uploadFile: ./testSuite/outputs/*.json
uploadName: validation-milkyWayModel
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.HDF5.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 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"
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-Bolshoi-tree-builder.pl,
test-branchlessTrees.pl,
test-branchSubsampling.pl,
test-CGM-mass-cooled.pl,
test-concentration-Ludlow2016.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.pl,
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-Millennium-tree-builder.pl,
test-output.pl,
test-output-tree-contiguousity.pl,
test-parameter-validation.pl,
test-perl-modules.pl,
test-reproducibility.pl,
test-splitForests.pl,
test-star-formation-histories-adaptive.py,
test-stateRestore.pl,
test-checkpointing.pl,
test-stellar-mass-weighted-ages.pl,
test-tidalTracks.pl,
test-galacticStructureStateDeallocateBug.pl,
test-inactiveNumerics.pl,
test-impulsiveHeating.pl,
test-haloTriaxiality.pl,
test-parallelTreeBuild.pl ]
uses: ./.github/workflows/testModel.yml
with:
file: ${{ matrix.file }}
artifact: galacticus-exec
runPath: ./testSuite
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/outputRank2ExtendSegFault.xml,
testSuite/regressions/barInstabilityFPE.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 Python2
run: |
apt -y update && apt -y upgrade
apt -y install python2.7
- name: Download library
uses: actions/download-artifact@v4
with:
name: galacticus-library
- name: Test interface
run: |
tar xvfj libgalacticus.tar.bz2
python2.7 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-11
executable: ${{ matrix.executable }}
artifact: test-execs-MacOS
secrets: inherit
### Test Python Interface
Python-Interface-MacOS:
runs-on: macos-11
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
echo "GALACTICUS_FCFLAGS=\"$GALACTICUS_FCFLAGS -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/lib/gfortran/modules -L/usr/local/lib\"" >> $GITHUB_ENV
echo "FCCOMPILER=gfortran-11" >> $GITHUB_ENV
echo "CCOMPILER=gcc-11" >> $GITHUB_ENV
echo "CPPCOMPILER=g++-11" >> $GITHUB_ENV
echo "PATH=$PATH:/opt/local/bin:/usr/local/bin" >> $GITHUB_ENV
echo "PERL_MM_USE_DEFAULT=1" >> $GITHUB_ENV
- name: Install MacPorts
run: |
curl -L https://github.com/macports/macports-base/releases/download/v2.7.1/MacPorts-2.7.1-11-BigSur.pkg --output MacPorts-2.7.1-11-BigSur.pkg
sudo installer -pkg ./MacPorts-2.7.1-11-BigSur.pkg -target /
rm ./MacPorts-2.7.1-11-BigSur.pkg
- name: Install guile
run: sudo port install guile18
- name: Install libmatheval
run: |
curl -L https://github.com/galacticusorg/libmatheval/releases/download/latest/libmatheval-1.1.12.tar.gz --output libmatheval-1.1.12.tar.gz
tar xvfz libmatheval-1.1.12.tar.gz
cd libmatheval-1.1.12
# Patch following the approach used in MacPorts (https://github.com/macports/macports-ports/tree/master/math/libmatheval).
sed -E -i~ s/"#undef HAVE_SCM_T_BITS"/"#define HAVE_SCM_T_BITS 1"/ config.h.in
sed -E -i~ s/"-lguile"/"-lguile18"/ configure
sed -E -i~ s/"libguile.h"/"libguile18.h"/g configure tests/matheval.c
# Set guile paths following the approach used in MacPorts (https://github.com/macports/macports-ports/tree/master/math/libmatheval).
CC=gcc-11 GUILE=/opt/local/bin/guile18 GUILE_CONFIG=/opt/local/bin/guile18-config GUILE_TOOLS=/opt/local/bin/guile18-tools ./configure --prefix=/usr/local
make -j3
sudo make install
cd ..
rm -rf libmatheval-1.1.12.tar.gz libmatheval-1.1.12
- name: Install qhull
run: |
curl -L http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz --output qhull-2020-src-8.0.2.tgz
tar xvfz qhull-2020-src-8.0.2.tgz
cd qhull-2020.2
make -j3 CC=gcc-11 CXX=g++-11
sudo make install
cd ..
rm -rf qhull-2020-src-8.0.2.tgz qhull-2020.2
- name: Install GSL
run: |
curl -L ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz --output gsl-2.6.tar.gz
tar xvfz gsl-2.6.tar.gz
cd gsl-2.6
CC=gcc-11 ./configure --prefix=/usr/local
make -j3
sudo make install
cd ..
rm -rf gsl-2.6 gsl-2.6.tar.gz
- name: Install HDF5
run: |
curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.20/src/hdf5-1.8.20.tar.gz --output hdf5-1.8.20.tar.gz
tar -vxzf hdf5-1.8.20.tar.gz
cd hdf5-1.8.20
CC=gcc-11 CXX=g++-11 FC=gfortran-11 ./configure --prefix=/usr/local --enable-fortran --enable-production
make -j3
sudo make install
cd ..
rm -rf hdf5-1.8.20 hdf5-1.8.20.tar.gz
- name: Install FoX
run: |
curl -L https://github.com/andreww/fox/archive/refs/tags/4.1.0.tar.gz --output FoX-4.1.0.tar.gz
tar xvfz FoX-4.1.0.tar.gz
cd fox-4.1.0
FC=gfortran-11 ./configure --prefix=/usr/local
make -j3
sudo make install
cd ..
rm -rf fox-4.1.0 FoX-4.1.0.tar.gz
- name: Install FFTW3
run: |
curl -L ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4.tar.gz --output fftw-3.3.4.tar.gz
tar xvfz fftw-3.3.4.tar.gz
cd fftw-3.3.4
F77=gfortran-11 CC=gcc-11 ./configure --prefix=/usr/local
make -j4
sudo make install
cd ..
rm -rf fftw-3.3.4 fftw-3.3.4.tar.gz
- name: Install ANN
run: |
curl -L http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz --output ann_1.1.2.tar.gz
tar xvfz ann_1.1.2.tar.gz
cd ann_1.1.2
sed -E -i~ s/"C\+\+ = g\+\+"/"C\+\+ = g\+\+\-11"/ Make-config
make macosx-g++
cp bin/* /usr/local/bin/.
cp lib/* /usr/local/lib/.
cp -R include/* /usr/local/include/.
- name: Install IO::Socket::SSL
run: |
curl -L https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.90.tar.gz --output Net-SSLeay-1.90.tar.gz
tar xvfz Net-SSLeay-1.90.tar.gz
cd Net-SSLeay-1.90
perl Makefile.PL
make -j3
sudo make install
cd ..
curl -L https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-1.966.tar.gz --output IO-Socket-SSL-1.966.tar.gz
tar xvfz IO-Socket-SSL-1.966.tar.gz
cd IO-Socket-SSL-1.966
perl Makefile.PL
make -j3
sudo make install
cd ..
cd ..
curl -L https://cpan.metacpan.org/authors/id/M/MK/MKODERER/Sys-CPU-0.52.tar.gz --output Sys-CPU-0.52.tar.gz
tar xvfz Sys-CPU-0.52.tar.gz
cd Sys-CPU-0.52
perl Makefile.PL
make -j3
sudo make install
- name: Install CPAN
run: |
sudo perl -MCPAN -e shell
sudo perl -MCPAN -e 'install Bundle::CPAN'
- name: Install Perl modules
run: |
export CFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE
sudo perl -MCPAN -e 'force("install","NestedMap")'
sudo perl -MCPAN -e 'force("install","Scalar::Util")'
sudo perl -MCPAN -e 'force("install","Term::ANSIColor")'
sudo perl -MCPAN -e 'force("install","Text::Table")'
sudo perl -MCPAN -e 'force("install","ExtUtils::ParseXS")'
sudo perl -MCPAN -e 'install Path::Tiny'
sudo perl -MCPAN -e 'install PkgConfig'
sudo perl -MCPAN -e 'install Alien::Base::Wrapper'
sudo perl -MCPAN -e 'force("install","Alien::Libxml2")'
sudo perl -MCPAN -e 'install XML::LibXML::SAX'
sudo perl -MCPAN -e 'force("install","XML::SAX::ParserFactory")'
sudo perl -MCPAN -e 'force("install","XML::Validator::Schema")'
sudo perl -MCPAN -e 'force("install","Text::Template")'
sudo perl -MCPAN -e 'force("install","List::Uniq")'
sudo perl -MCPAN -e 'force("install","IO::Util")'
sudo perl -MCPAN -e 'force("install","Class::Util")'
sudo perl -MCPAN -e 'force("install","CGI::Builder")'
sudo perl -MCPAN -e 'force("install","Simple")'
sudo perl -MCPAN -e 'force("install","Readonly")'
sudo perl -MCPAN -e 'force("install","File::Slurp")'
sudo perl -MCPAN -e 'force("install","XML::Simple")'
sudo perl -MCPAN -e 'force("install","List::MoreUtils")'
sudo perl -MCPAN -e 'force("install","Clone")'
sudo perl -MCPAN -e 'force("install","IO::Scalar")'
sudo perl -MCPAN -e 'force("install","Regexp::Common")'
sudo perl -MCPAN -e 'install LaTeX::Encode'
sudo perl -MCPAN -e 'install Sub::Identify'
- name: Build Galacticus
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/finclude -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/lib/gfortran/modules -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 -I/usr/local/include/libqhullcpp"
make -j3 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: |
python2 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 ]
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 (benchmark-darkMatterOnlySubhalos)
uses: actions/download-artifact@v4
with:
name: benchmark-darkMatterOnlySubhalos
- name: Download artifacts (benchmark-milkyWay)
uses: actions/download-artifact@v4
with:
name: benchmark-milkyWay
- name: Download artifacts (validation-darkMatterOnlySubhalos)
uses: actions/download-artifact@v4
with:
name: validation-darkMatterOnlySubhalos
- name: Download artifacts (validation-milkyWay)
uses: actions/download-artifact@v4
with:
name: validation-milkyWayModel
- name: Download artifacts (build-profile)
uses: actions/download-artifact@v4
with:
name: build-profile
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Dark matter-only subhalos benchmarks
tool: 'customSmallerIsBetter'
output-file-path: benchmark_darkMatterOnlySubhalos.json
summary-always: false
comment-on-alert: true
alert-comment-cc-users: '@abensonca'
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
benchmark-data-dir-path: dev/bench/darkMatterOnlySubhalos
gh-pages-branch: gh-pages
alert-threshold: 150%
max-items-in-chart: 256
- name: Push benchmark result
run: |
git checkout gh-pages
git push --set-upstream origin gh-pages
git checkout -
if: github.event_name != 'pull_request'
- name: Revert benchmark result
run: |
git checkout gh-pages
git reset --hard HEAD~1
git checkout -
if: github.event_name == 'pull_request'
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Milky Way model benchmarks
tool: 'customSmallerIsBetter'
output-file-path: benchmark_milkyWay.json
summary-always: false
comment-on-alert: true
alert-comment-cc-users: '@abensonca'
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
benchmark-data-dir-path: dev/bench/milkyWayModel
gh-pages-branch: gh-pages
alert-threshold: 150%
max-items-in-chart: 256
- name: Push benchmark result
run: |
git checkout gh-pages
git push --set-upstream origin gh-pages
git checkout -
if: github.event_name != 'pull_request'
- name: Revert benchmark result
run: |
git checkout gh-pages
git reset --hard HEAD~1
git checkout -
if: github.event_name == 'pull_request'
- name: Store validation result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Dark matter-only subhalos benchmarks
tool: 'customSmallerIsBetter'
output-file-path: validate_darkMatterOnlySubhalos.json
summary-always: false
comment-on-alert: true
alert-comment-cc-users: '@abensonca'
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
benchmark-data-dir-path: dev/bench/darkMatterOnlySubhalos
gh-pages-branch: gh-pages
alert-threshold: 110%
max-items-in-chart: 256
- name: Push benchmark result
run: |
git checkout gh-pages
git push --set-upstream origin gh-pages
git checkout -
if: github.event_name != 'pull_request'
- name: Revert benchmark result
run: |
git checkout gh-pages
git reset --hard HEAD~1
git checkout -
if: github.event_name == 'pull_request'
- name: Store validation result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Milky Way model benchmarks
tool: 'customSmallerIsBetter'
output-file-path: validate_milkyWayModel.json
summary-always: false
comment-on-alert: true
alert-comment-cc-users: '@abensonca'
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
benchmark-data-dir-path: dev/bench/milkyWayModel
gh-pages-branch: gh-pages
alert-threshold: 110%
max-items-in-chart: 256
- name: Push benchmark result
run: |
git checkout gh-pages
git push --set-upstream origin gh-pages
git checkout -
if: github.event_name != 'pull_request'
- name: Revert benchmark result
run: |
git checkout gh-pages
git reset --hard HEAD~1
git checkout -
if: github.event_name == 'pull_request'
- name: Push validation result
run: |
git checkout gh-pages
mv results_darkMatterOnlySubhalos.json dev/valid/darkMatterOnlySubhalos/results.json
mv results_milkyWayModel.json dev/valid/milkyWayModel/results.json
git config --local user.email "github@users.noreply.github.com"
git config --local user.name "github-action-validate"
git add dev/valid/darkMatterOnlySubhalos/results.json dev/valid/milkyWayModel/results.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 "github@users.noreply.github.com"
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-Library-MacOS,
Build-Tools-MacOS,
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-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 (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: Upload assets to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload bleeding-edge ./Galacticus_MacOS.exe ./libgalacticusMacOS.zip ./toolsMacOS.zip ./debugSymbolsMacOS.zip --clobber
rm ./Galacticus_MacOS.exe ./libgalacticusMacOS.zip ./toolsMacOS.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 }}."