Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 32 additions & 30 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -427,53 +427,55 @@ jobs:
strategy:
fail-fast: false
matrix:
baseos: [ubuntu-bionic]
baseos: [ubuntu-22.04]

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: ci-source
- name: Re-configure docker daemon

- name: Install Podman
if: ${{ matrix.base-img != 'self-hosted' }}
run: |
sudo systemctl stop docker
echo $'{\n "experimental": true\n}' | \
sudo tee /etc/docker/daemon.json
sudo systemctl start docker
sudo apt-get update
sudo apt-get install -y podman


- name: Build image
run: |
docker build \
--rm --squash \
podman build \
--rm \
-t ornladios/adios2:ci-tmp \
--build-arg baseos=${{ matrix.baseos }} \
--build-arg ci_source_dir=ci-source \
-f ci-source/scripts/ci/images/spack/Dockerfile \
-f ci-source/scripts/ci/images/spack/adios2-container-dist.dockerfile \
.

- name: Save image as a tar file
run: |
docker save -o ci-docker.tar ornladios/adios2:ci-tmp
ls -lah ci-docker.tar
podman save -o ci-podman.tar ornladios/adios2:ci-tmp
ls -lah ci-podman.tar
- name: Upload
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
with:
retention-days: 1
name: ci-docker ${{ matrix.baseos }} ${{ github.sha }}
path: ci-docker.tar
- name: Push image to Docker Hub
name: ci-podman ${{ matrix.baseos }} ${{ github.sha }}
path: ci-podman.tar

- name: Log in to GitHub Container Registry
if: github.event_name == 'push'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Push image to GitHub Container Registry
if: github.event_name == 'push'
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
target_tag="${GITHUB_REF##refs/heads/}-${{ matrix.baseos }}"
docker tag \
podman tag \
ornladios/adios2:ci-tmp \
ornladios/adios2:${target_tag}
docker login \
--username="${DOCKERHUB_USERNAME}" \
--password="${DOCKERHUB_PASSWORD}"
docker push \
ornladios/adios2:${target_tag}
"ghcr.io/${{ github.repository }}/ornladios/adios2:${target_tag}"
podman push \
"ghcr.io/${{ github.repository }}/ornladios/adios2:${target_tag}"

#######################################
# Contract testing jobs
Expand Down Expand Up @@ -504,7 +506,7 @@ jobs:
- code: tau
defaults:
run:
shell: bash -c "docker exec adios2-ci bash --login -e $(echo {0} | sed 's|/home/runner/work|/__w|g')"
shell: bash -c "podman exec adios2-ci bash --login -e $(echo {0} | sed 's|/home/runner/work|/__w|g')"

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
Expand All @@ -516,18 +518,18 @@ jobs:
- name: Download CI docker image
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v4
with:
name: ci-docker ubuntu-bionic ${{ github.sha }}
name: ci-podman ubuntu-22.04 ${{ github.sha }}
- name: Initialize containers
shell: bash -e {0}
run: |
sudo chown 1000:1000 .
docker load -i ci-docker.tar
docker create \
podman load -i ci-podman.tar
podman create \
--name adios2-ci --workdir /__w/ADIOS2/ADIOS2 \
-v "/home/runner/work":"/__w" \
--entrypoint "tail" ornladios/adios2:ci-tmp \
"-f" "/dev/null"
docker start adios2-ci
podman start adios2-ci
- name: Dependencies
run: /opt/adios2/source/testing/contract/${{ matrix.code }}/depends.sh
- name: Configure
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
generate_statuses:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
permissions:
contents: read
statuses: write
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/images/build-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TAG_PREFIX="${IMAGE_TAG_PREFIX:-ghcr.io/ornladios/adios2}"
# Build the base image
${BUILD_TOOL} build --progress=plain \
--build-arg PATCH_VARIANT_XROOTD=ON \
--build-arg EXTRA_SPECS="sz3" \
--build-arg EXTRA_SPECS="sz3 zstd" \
--rm -f ./Dockerfile.ci-spack-ubuntu22.04-base \
-t "${TAG_PREFIX}:ci-spack-ubuntu22.04-base" \
.
Expand Down
37 changes: 0 additions & 37 deletions scripts/ci/images/spack/Dockerfile

This file was deleted.

31 changes: 31 additions & 0 deletions scripts/ci/images/spack/adios2-container-dist.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ghcr.io/ornladios/adios2/adios2-deps

RUN echo ${ADIOS2_SPEC}

# Install from CI source
ARG ci_source_dir=ci-source
COPY ${ci_source_dir} /opt/adios2/source
RUN . /spack/share/spack/setup-env.sh && \
spack dev-build \
-j$(grep -c '^processor' /proc/cpuinfo) \
-d /opt/adios2/source \
--no-checksum \
--skip-patch \
--reuse \
adios2@master ${ADIOS2_SPEC} ^gcc && \
spack uninstall --all --yes-to-all gcc && \
spack clean -a

RUN . /spack/share/spack/setup-env.sh && \
spack config add "concretizer:unify:false" && \
spack env create --without-view adios2 && \
spack -e adios2 add $(spack find --format "/{hash}") && \
spack -e adios2 install -v && \
rm -rf /root/.spack && \
spack env activate adios2 && \
spack env deactivate && \
echo "source /spack/share/spack/setup-env.sh" >> ~/.bash_profile && \
echo "spack load adios2" >> ~/.bash_profile

ENTRYPOINT []
CMD ["bash", "--login"]
63 changes: 63 additions & 0 deletions scripts/ci/images/spack/adios2-deps.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM ubuntu:22.04

ARG SPACK_VERSION=v1.0.2
ARG SPACK_MIRROR="https://binaries.spack.io/v2025.07.0"
ARG ADIOS2_SPEC="~mpi~mgard~libcatalyst~bzip2~png"

RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
file \
g++-12 \
gfortran-12 \
git \
gzip \
lsb-release \
patch \
python3 \
tar \
unzip \
xz-utils \
zstd \
\
&& \
apt clean -y && \
rm -rf /var/lib/apt/lists/*

# Clone and patch spack
WORKDIR /
RUN if ! [ -d /spack ]; then \
git clone --depth 1 --single-branch --branch ${SPACK_VERSION} https://github.com/spack/spack; \
else \
git fetch --all && git checkout -t origin/${SPACK_VERSION}; \
fi && \
mkdir -p /root/.spack

COPY packages.yaml /root/.spack/packages.yaml

# Install base specs
RUN . /spack/share/spack/setup-env.sh && \
spack repo update --branch "releases/v2025.07" builtin && \
spack mirror add binaries "${SPACK_MIRROR}" && \
spack config add "packages:all:target:[haswell]" && \
spack config add "config:checksum:false" && \
spack config add "config:build_jobs:$(nproc)" && \
spack config add "concretizer:reuse:true"

RUN . /spack/share/spack/setup-env.sh && \
spack install \
-j$(nproc) \
--include-build-deps \
--no-check-signature \
--fail-fast \
--only dependencies \
adios2@master ${ADIOS2_SPEC} cmake%gcc && \
spack clean -a && \
echo "source /spack/share/spack/setup-env.sh" >> ~/.bash_profile

ENV ADIOS2_SPEC="${ADIOS2_SPEC}"

ENTRYPOINT []
CMD ["bash", "--login"]
11 changes: 11 additions & 0 deletions scripts/ci/images/spack/packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
packages:
gcc:
externals:
- spec: gcc@12.3.0 languages='c,c++,fortran'
prefix: /usr
extra_attributes:
compilers:
c: /usr/bin/gcc-12
cxx: /usr/bin/g++-12
fortran: /usr/bin/gfortran-12
buildable: false
Loading