Unverified Commit 45035d24 authored by Bolea Sanchez, Vicente Adolfo's avatar Bolea Sanchez, Vicente Adolfo Committed by GitHub
Browse files

Merge pull request #5007 from vicentebolea/add-linux-aarch64-ci

ci: add ubuntu aarch64 jobs
parents ef3fe6a3 2477163b
Loading
Loading
Loading
Loading
+21 −15
Original line number Diff line number Diff line
@@ -113,15 +113,12 @@ jobs:
    needs: [format, git_checks]
    if: needs.git_checks.outputs.num_code_changes > 0

    runs-on: ubuntu-22.04
    runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
    permissions:
      contents: read
      actions: write  # for cache save
    container:
      image: ghcr.io/ornladios/adios2:ci-spack-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.deps == 'external' && '-external' || '' }}
      options: --shm-size=1g
    env:
        GH_YML_JOBNAME: ${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ matrix.parallel }}
      GH_YML_JOBNAME: ${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ matrix.parallel }}
      GH_YML_BASE_OS: Linux
      GH_YML_MATRIX_OS: ${{ matrix.os }}
      GH_YML_MATRIX_COMPILER: ${{ matrix.compiler }}
@@ -130,6 +127,9 @@ jobs:
      CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
      CCACHE_COMPRESS: true
      CCACHE_COMPRESSLEVEL: 6
    container:
      image: ghcr.io/ornladios/adios2:ci-spack-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}${{ matrix.deps == 'external' && '-external' || '' }}
      options: --shm-size=1g

    strategy:
      fail-fast: false
@@ -179,6 +179,11 @@ jobs:
            compiler: gcc12
            parallel: mpich
            deps: external
          - os: ubuntu22.04
            compiler: gcc11
            parallel: serial
            runner: ubuntu-22.04-arm
            arch: aarch64

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
@@ -193,12 +198,13 @@ jobs:
        id: restore-cache
        with:
          path: .ccache
          key: ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ github.sha }}
          key: ccache-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ github.sha }}
          restore-keys: |
            ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}
            ccache-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}
      - name: Configure cache
        run: ccache -z
      - name: Setup
        if: ${{ !matrix.arch }}
        run: gha/scripts/ci/gh-actions/linux-setup.sh
      - name: Update
        run: gha/scripts/ci/gh-actions/run.sh update
@@ -214,7 +220,7 @@ jobs:
        id: save-cache
        with:
          path: .ccache
          key: ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ github.sha }}
          key: ccache-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}-${{ matrix.parallel }}${{ matrix.shared == 'static' && '-static' || '' }}${{ matrix.deps == 'external' && '-external' || '' }}-${{ github.sha }}
      - name: Test
        if: ${{ matrix.constrains != 'build_only' }}
        run: gha/scripts/ci/gh-actions/run.sh test
+36 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
#
# SPDX-License-Identifier: Apache-2.0

include(ProcessorCount)
ProcessorCount(NCPUS)
math(EXPR N2CPUS "${NCPUS}*2")

set(ENV{CC}  gcc)
set(ENV{CXX} g++)
set(ENV{FC}  gfortran)

set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON

ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_ZeroMQ:BOOL=ON

CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
CMAKE_C_FLAGS:STRING=-Wall -Wno-psabi
CMAKE_CXX_FLAGS:STRING=-Wall -Wno-psabi
CMAKE_Fortran_FLAGS:STRING=-Wall
")

#set(CTEST_TEST_ARGS EXCLUDE "KillReader|KillWriter|PreciousTimestep")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
+33 −0
Original line number Diff line number Diff line
#mpich SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
# SPDX-License-Identifier: Apache-2.0

# vim: ft=dockerfile
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y --no-install-recommends \
    build-essential \
    ca-certificates \
    ccache \
    cmake \
    curl \
    git \
    gfortran \
    libblosc-dev \
    libbz2-dev \
    libcurl4-gnutls-dev \
    libzmq3-dev \
    ninja-build \
    python3-dev \
    python3-numpy && \
    apt autoremove --purge -y && \
    apt clean && \
    rm -rf /var/lib/apt/lists/*

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 && \
    update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 && \
    update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-11 100


ENTRYPOINT ["/bin/bash", "--login"]
+85 −55
Original line number Diff line number Diff line
@@ -10,6 +10,12 @@
###
### IMAGE_BUILD_TOOL=docker IMAGE_TAG_PREFIX=ghcr.io/scottwittenburg/adios2 ./build-ubuntu.sh
###
### To build only a specific architecture:
###
### ./build-ubuntu.sh x86_64
### ./build-ubuntu.sh aarch64
### ./build-ubuntu.sh          # builds and pushes both
###

set -ex

@@ -17,6 +23,9 @@ set -ex
BUILD_TOOL="${IMAGE_BUILD_TOOL:-podman}"
TAG_PREFIX="${IMAGE_TAG_PREFIX:-ghcr.io/ornladios/adios2}"

ARCH="${1:-all}"

build_x86_64() {
  # Build the base image
  ${BUILD_TOOL} build --progress=plain \
    --build-arg PATCH_VARIANT_XROOTD=ON \
@@ -77,3 +86,24 @@ ${BUILD_TOOL} push "${TAG_PREFIX}:ci-spack-ubuntu22.04-clang14"
  ${BUILD_TOOL} push "${TAG_PREFIX}:ci-spack-ubuntu22.04-gcc11"
  ${BUILD_TOOL} push "${TAG_PREFIX}:ci-spack-ubuntu22.04-gcc12"
  ${BUILD_TOOL} push "${TAG_PREFIX}:ci-spack-ubuntu22.04-gcc12-external"
}

build_aarch64() {
  ${BUILD_TOOL} build --rm \
    --platform linux/arm64 \
    -f ./Dockerfile.ci-spack-ubuntu22.04-aarch64-base \
    -t "${TAG_PREFIX}:ci-spack-ubuntu22.04-gcc11-aarch64" \
    .

  ${BUILD_TOOL} push "${TAG_PREFIX}:ci-spack-ubuntu22.04-gcc11-aarch64"
}

case "${ARCH}" in
  x86_64)  build_x86_64 ;;
  aarch64) build_aarch64 ;;
  all)     build_x86_64; build_aarch64 ;;
  *)
    echo "Usage: $0 [x86_64|aarch64]  (default: all)"
    exit 1
    ;;
esac
+9 −0
Original line number Diff line number Diff line
#!/bin/bash

# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
#
# SPDX-License-Identifier: Apache-2.0

update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-11)"
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-11)"
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-11)"
Loading