Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4bc580d
Add macOS CI build
victorapm Sep 10, 2026
747b808
Fix macOS MPI setup
victorapm Sep 10, 2026
03a2a0a
Fix macOS formula install
victorapm Sep 10, 2026
e17d4d1
Update macOS pkgconf
victorapm Sep 10, 2026
ea2f8ee
Refresh macOS Homebrew pins after formula drift.
victorapm Sep 23, 2026
f680faa
Run macOS artifact upload on Node.js 24.
victorapm Sep 23, 2026
c4123ba
Stop failing macOS setup when Homebrew rewrites a formula file.
victorapm Sep 23, 2026
71031a9
Build macOS TPLs on the macOS 26 arm64 runner.
victorapm Sep 23, 2026
ca02a2b
Publish the macOS TPL install as a tagged image.
victorapm Sep 24, 2026
6a3aee9
Export GEOS_TPL_DIR from the TPL images.
victorapm Sep 24, 2026
3e54716
Fix the workflow parse error that skipped the image check.
victorapm Sep 24, 2026
7e52d5b
Build the macOS TPL image in the build_images matrix.
victorapm Sep 24, 2026
cfa0f55
Start Docker on the macOS runner before packaging the TPL image.
victorapm Sep 24, 2026
5a6741f
Use generic names for the shared image build steps.
victorapm Sep 24, 2026
50d1167
Merge branch 'master' into ci/paludettomag1/macos
victorapm Sep 24, 2026
570b21d
Publish the macOS TPL image without a local Docker daemon.
victorapm Sep 24, 2026
7da60cb
Package the GEOS host-config instead of the LvArray one.
victorapm Sep 24, 2026
ac6480e
Do not add -march=native or -mtune=native for Apple Clang.
victorapm Sep 25, 2026
f6cd1bf
Build hypredrive against the pinned hypre in every TPL image.
victorapm Sep 26, 2026
61b4b48
Rely on the hypredrive default instead of listing it in every spec.
victorapm Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 128 additions & 3 deletions .github/workflows/docker_build_tpls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ jobs:
SPACK_BUILD_JOBS: 8
SPEC: "+rocm ~uncrustify ~openmp ~pygeosx ~docs ~trilinos ~petsc amdgpu_target=gfx942 %%amdclang-19 ^caliper~papi~gotcha~sampler~libunwind~libdw"

# Built natively. The published image carries the macOS prefix; it is
# not a Linux container produced by docker-build.sh.
- name: macOS 26 - Apple Clang (arm64)
RUNS_ON: macos-26
DOCKER_REPOSITORY: geosx/macos-26-apple-clang
SPEC: "~pygeosx ~docs ~openmp %c,cxx=apple-clang %fortran=gcc@16.2.0"
SPACK_BUILD_JOBS: 2

steps:
- name: Checkout
uses: actions/checkout@v7
Expand All @@ -182,7 +190,7 @@ jobs:

- name: Set up Docker Buildx
id: buildx_hosted
if: matrix.RUNS_ON != 'streak2'
if: matrix.RUNS_ON != 'streak2' && matrix.RUNS_ON != 'macos-26'
uses: docker/setup-buildx-action@v4
with:
cleanup: true
Expand All @@ -200,6 +208,7 @@ jobs:

- name: Compose DOCKER_BASE_IMAGE
id: base
if: matrix.RUNS_ON != 'macos-26'
run: |
# Rows that do not build on a docker_base_images image (e.g. ROCm)
# pin their base image directly.
Expand Down Expand Up @@ -264,16 +273,119 @@ jobs:
DOCKER_BUILDER: ${{ steps.buildx_streak2.outputs.name || steps.buildx_hosted.outputs.name }}
DOCKER_LOAD: 1
DOCKER_NETWORK: ${{ matrix.RUNS_ON == 'streak2' && 'host' || '' }}
if: matrix.RUNS_ON != 'macos-26'
run: bash -x ./scripts/docker-build.sh
- name: Set up Python for Uberenv
if: matrix.RUNS_ON == 'macos-26'
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Set up build environment
if: matrix.RUNS_ON == 'macos-26'
env:
HOMEBREW_NO_ANALYTICS: 1
run: |
python3 -m pip install clingo
short_sha=${GITHUB_SHA:0:7}
docker_tag="${{ github.event.number }}-${{ github.run_number }}"
echo "SPACK_PYTHON=$(command -v python3)" >> "$GITHUB_ENV"
echo "DOCKER_TAG=${docker_tag}" >> "$GITHUB_ENV"
echo "GEOS_TPL_DIR=/opt/GEOS/GEOS_TPL-${docker_tag}-${short_sha}" >> "$GITHUB_ENV"
echo "SPACK_CONFIG=$RUNNER_TEMP/geosx-macos-spack.yaml" >> "$GITHUB_ENV"
sudo mkdir -p /opt/GEOS
sudo chown "$(id -un)" /opt/GEOS

- name: Test dependency setup
if: matrix.RUNS_ON == 'macos-26'
run: bash scripts/tests/macos_homebrew/test_setupMacOS_TPL_deps.bash

- name: Prepare dependencies
if: matrix.RUNS_ON == 'macos-26'
env:
HOMEBREW_NO_ANALYTICS: 1
run: |
unset HOMEBREW_NO_INSTALL_UPGRADE HOMEBREW_NO_INSTALL_CLEANUP
brew update
python3 - <<'PY'
import json
import subprocess

with open('scripts/spack_configs/macOS/homebrew-manifest.json') as stream:
formulae = [entry['name'] for entry in json.load(stream)['formulae']]
installed = subprocess.check_output(['brew', 'list', '--formula'], text=True).split()
if 'mpich' in installed and 'open-mpi' in formulae:
formulae.remove('open-mpi')
subprocess.run(['brew', 'install', '--formula', *formulae], check=True)
PY
bash scripts/setupMacOS-TPL-deps.bash --spack-config-out "$SPACK_CONFIG" \
2>&1 | tee "$RUNNER_TEMP/macos-setup.log"

- name: Build TPLs
if: matrix.RUNS_ON == 'macos-26'
env:
HOMEBREW_NO_ANALYTICS: 1
SPEC: ${{ matrix.SPEC }}
SPACK_BUILD_JOBS: ${{ matrix.SPACK_BUILD_JOBS }}
run: |
python3 scripts/uberenv/uberenv.py \
--project-json="$GITHUB_WORKSPACE/.uberenv_config.json" \
--spack-env-file="$SPACK_CONFIG" \
--prefix="$GEOS_TPL_DIR" \
--spec="$SPEC" \
-j "$SPACK_BUILD_JOBS" 2>&1 | tee "$RUNNER_TEMP/macos-build.log"

- name: Prepare image publish
if: matrix.RUNS_ON == 'macos-26'
run: |
set -euo pipefail
curl -fsSL -o "$RUNNER_TEMP/crane.tgz" \
https://github.com/google/go-containerregistry/releases/download/v0.20.6/go-containerregistry_Darwin_arm64.tar.gz
tar -xzf "$RUNNER_TEMP/crane.tgz" -C "$RUNNER_TEMP" crane
"$RUNNER_TEMP/crane" version

- name: Package TPL image
if: matrix.RUNS_ON == 'macos-26'
env:
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
DOCKER_TAG: ${{ github.event.number }}-${{ github.run_number }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
set -euo pipefail
host_config=$(find "$GITHUB_WORKSPACE" -maxdepth 1 -name '*.cmake' ! -name 'lvarray-*' | head -n 1)
test -n "$host_config"
rm -rf \
"$GEOS_TPL_DIR/bin" \
"$GEOS_TPL_DIR/build_stage" \
"$GEOS_TPL_DIR/builtin_spack_packages_repo" \
"$GEOS_TPL_DIR/misc_cache" \
"$GEOS_TPL_DIR/spack" \
"$GEOS_TPL_DIR/spack_env" \
"$GEOS_TPL_DIR/.spack-db"
tpl_name=$(basename "$GEOS_TPL_DIR")
stage="$RUNNER_TEMP/image-root"
mkdir -p "$stage/opt/GEOS"
mv "$GEOS_TPL_DIR" "$stage/opt/GEOS/$tpl_name"
cp "$host_config" "$stage/spack-generated.cmake"
"$RUNNER_TEMP/crane" auth login index.docker.io \
-u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
image="${DOCKER_REPOSITORY}:${DOCKER_TAG}"
ref=$("$RUNNER_TEMP/crane" append --platform linux/arm64 \
-f <(tar -C "$stage" -cf - .) -t "$image")
"$RUNNER_TEMP/crane" mutate "$ref" \
-e "GEOS_TPL_DIR=/opt/GEOS/${tpl_name}" -t "$image"

- name: Login to DockerHub
if: matrix.RUNS_ON != 'macos-26'
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
logout: ${{ matrix.RUNS_ON != 'streak2' }}

- name: Push docker image
if: matrix.RUNS_ON != 'macos-26'
env:
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
DOCKER_TAG: ${{ github.event.number }}-${{ github.run_number }}
Expand All @@ -292,10 +404,23 @@ jobs:
echo "No local image to remove: ${image}"
fi

# Convenience job - passes when all docker images are built.
- name: Upload build logs and host configs
if: always() && matrix.RUNS_ON == 'macos-26'
uses: actions/upload-artifact@v7
with:
name: macos-arm64-build
path: |
${{ runner.temp }}/macos-*.log
${{ runner.temp }}/geosx-macos-spack.yaml
${{ runner.temp }}/image-root/spack-generated.cmake

# Convenience job - passes when every build_images row, including macOS, succeeds.
check_that_all_images_built:
runs-on: ubuntu-22.04
needs: [build_images]
if: always()
steps:
- name: Success
run: "true"
run: |
echo "build_images: ${{ needs.build_images.result }}"
test "${{ needs.build_images.result }}" = success
10 changes: 5 additions & 5 deletions docker/Stanford/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM $DOCKER_ROOT_IMAGE as tpl_toolchain_intersect_geosx_toolchain
ARG SRC_DIR

ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR
ENV GEOS_TPL_DIR=$INSTALL_DIR

RUN yum install -y \
ca-certificates \
Expand Down Expand Up @@ -62,27 +62,27 @@ ARG SPEC
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
mkdir -p ${GEOS_TPL_DIR} && \
source /oak/stanford/groups/tchelepi/geos-sherlock/pythonVenv/geosxEnv/bin/activate && \
./scripts/uberenv/uberenv.py \
# spack spec defined per image
--spec "${SPEC}" \
--spack-env-file=${SRC_DIR}/docker/stanford-spack.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
--prefix ${GEOS_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
cd ${GEOS_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR
COPY --from=tpl_toolchain $GEOS_TPL_DIR $GEOS_TPL_DIR

# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /
Expand Down
10 changes: 5 additions & 5 deletions docker/TotalEnergies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM $DOCKER_ROOT_IMAGE as tpl_toolchain_intersect_geosx_toolchain
ARG SRC_DIR

ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR
ENV GEOS_TPL_DIR=$INSTALL_DIR

RUN yum install --disablerepo=intel-mkl-repo -y \
ca-certificates \
Expand Down Expand Up @@ -51,26 +51,26 @@ ARG SPEC
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
mkdir -p ${GEOS_TPL_DIR} && \
./scripts/uberenv/uberenv.py \
# spack spec defined per image
--spec "${SPEC}" \
--spack-env-file=${SRC_DIR}/docker/total-spack.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
--prefix ${GEOS_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
cd ${GEOS_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR
COPY --from=tpl_toolchain $GEOS_TPL_DIR $GEOS_TPL_DIR

# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /
Expand Down
6 changes: 3 additions & 3 deletions docker/configure-tpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if [ -z "$BLD_DIR" ]; then
exit 1
fi

if [ -z "$GEOSX_TPL_DIR" ]; then
echo "Environment variable \"GEOSX_TPL_DIR\" is undefined."
if [ -z "$GEOS_TPL_DIR" ]; then
echo "Environment variable \"GEOS_TPL_DIR\" is undefined."
exit 1
fi

Expand All @@ -24,6 +24,6 @@ python3 $SRC_DIR/scripts/config-build.py \
--hostconfig $SRC_DIR/$HOST_CONFIG \
--buildtype Release \
--buildpath $BLD_DIR \
--installpath $GEOSX_TPL_DIR \
--installpath $GEOS_TPL_DIR \
-DNUM_PROC=$(nproc) \
$*
12 changes: 6 additions & 6 deletions docker/tpl-rockylinux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM ${DOCKER_BASE_IMAGE} AS tpl_toolchain_intersect_geosx_toolchain
ARG SRC_DIR

ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR
ENV GEOS_TPL_DIR=$INSTALL_DIR

# Packages needed both for the TPL build and for the downstream GEOS build.
# Some Rocky 8 vs 9 differences are handled by the base image already
Expand Down Expand Up @@ -114,7 +114,7 @@ RUN dnf -y install \
# expected external compiler paths before Spack starts so missing compilers fail
# directly instead of being discovered or built by Spack.
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
mkdir -p ${GEOS_TPL_DIR} && \
GEOSX_SPEC="${SPEC}" && \
if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then \
echo "ERROR: SPEC build-arg must be supplied" >&2 ; \
Expand Down Expand Up @@ -149,27 +149,27 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
--spec '${GEOSX_SPEC}' \
--spack-env-file=${GEOSX_SPACK_ENV_FILE} \
--project-json=${SRC_DIR}/.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
--prefix ${GEOS_TPL_DIR} \
-j ${SPACK_BUILD_JOBS} \
-k " ; \
else \
./scripts/uberenv/uberenv.py \
--spec "${GEOSX_SPEC}" \
--spack-env-file=${GEOSX_SPACK_ENV_FILE} \
--project-json=${SRC_DIR}/.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
--prefix ${GEOS_TPL_DIR} \
-j ${SPACK_BUILD_JOBS} \
-k ; \
fi && \
rm -f lvarray* && \
cp *.cmake /spack-generated.cmake && \
cd ${GEOSX_TPL_DIR} && \
cd ${GEOS_TPL_DIR} && \
rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/

# ----- Final GEOS-build image -----
FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR
COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR
COPY --from=tpl_toolchain $GEOS_TPL_DIR $GEOS_TPL_DIR
COPY --from=tpl_toolchain /spack-generated.cmake /

RUN dnf -y install \
Expand Down
16 changes: 8 additions & 8 deletions docker/tpl-ubuntu-hip.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ ENV OPENSSL_FORCE_FIPS_MODE=0 \
OPENSSL_CONF=/etc/ssl/openssl-non-fips.cnf

# Install directory provided as a docker build argument; forwarded via ENV
# (GEOSX_TPL_DIR is part of the image contract consumed by GEOS).
# (GEOS_TPL_DIR is part of the image contract consumed by GEOS).
ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR
ENV GEOS_TPL_DIR=$INSTALL_DIR

# ROCm parameters
ARG AMDGPU_TARGET=gfx942
Expand Down Expand Up @@ -166,7 +166,7 @@ RUN apt-get update && \
# for hours and spack is otherwise silent, which makes a stalled build
# indistinguishable from a slow one in CI logs.
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
mkdir -p ${GEOS_TPL_DIR} && \
GEOSX_SPEC="${SPEC}" && \
if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then \
echo "ERROR: SPEC build-arg must be supplied" >&2 ; \
Expand All @@ -176,12 +176,12 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
( while true; do \
sleep 60; \
echo "[heartbeat] $(date -Iseconds) uberenv/spack still running"; \
find ${GEOSX_TPL_DIR}/build_stage -maxdepth 2 -mindepth 2 -type d -printf '%T@ %p\n' 2>/dev/null | \
find ${GEOS_TPL_DIR}/build_stage -maxdepth 2 -mindepth 2 -type d -printf '%T@ %p\n' 2>/dev/null | \
sort -nr | head -n 3 | \
while read -r _ path; do \
echo "[heartbeat] recent stage dir: ${path}"; \
done; \
find ${GEOSX_TPL_DIR}/build_stage -maxdepth 4 \( -name spack-build-out.txt -o -name spack-build-env.txt -o -name spack-configure-args.txt \) -printf '%T@ %p\n' 2>/dev/null | \
find ${GEOS_TPL_DIR}/build_stage -maxdepth 4 \( -name spack-build-out.txt -o -name spack-build-env.txt -o -name spack-configure-args.txt \) -printf '%T@ %p\n' 2>/dev/null | \
sort -nr | head -n 3 | \
while read -r _ path; do \
echo "[heartbeat] recent stage file: ${path}"; \
Expand All @@ -199,7 +199,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
--spec "${GEOSX_SPEC}" \
--spack-env-file=${SRC_DIR}/docker/spack-rocm.yaml \
--project-json=${SRC_DIR}/.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
--prefix ${GEOS_TPL_DIR} \
-j ${SPACK_BUILD_JOBS} \
-k; \
rc=$?; \
Expand All @@ -209,7 +209,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
} && \
rm -f lvarray* && \
cp *.cmake /spack-generated.cmake && \
cd ${GEOSX_TPL_DIR} && \
cd ${GEOS_TPL_DIR} && \
rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/

# ----- Final GEOS-build image -----
Expand All @@ -228,7 +228,7 @@ ARG ROCM_VERSION
# it is actually needed.
ENV OPENSSL_CONF=""

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR
COPY --from=tpl_toolchain $GEOS_TPL_DIR $GEOS_TPL_DIR

# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /
Expand Down
Loading