From 5307ee100d8945f4706c31d2386bab641419c579 Mon Sep 17 00:00:00 2001
From: Ulrich Schwickerath <Ulrich.Schwickerath@cern.ch>
Date: Thu, 25 May 2023 12:45:32 +0200
Subject: [PATCH] autobuild for aarm64

---
 .gitlab-ci.yml     |   4 ++
 CI/al8_aarch64.yml | 163 +++++++++++++++++++++++++++++++++++++++++++++
 CI/al9_aarch64.yml | 162 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 329 insertions(+)
 create mode 100644 CI/al8_aarch64.yml
 create mode 100644 CI/al9_aarch64.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f4ec36e..f61a8024 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,8 @@
     IMAGECS9: gitlab-registry.cern.ch/delphi/docker/builder-cs9:latest
     IMAGEAL8: gitlab-registry.cern.ch/delphi/docker/builder-al8:latest
     IMAGEAL9: gitlab-registry.cern.ch/delphi/docker/builder-al9:latest
+    IMAGEAL8ARM: gitlab-registry.cern.ch/delphi/docker/builder-al8-arm:latest
+    IMAGEAL9ARM: gitlab-registry.cern.ch/delphi/docker/builder-al9-arm:latest
     IMAGEUBUNTU18: gitlab-registry.cern.ch/delphi/docker/builder-ubuntu18:latest
     IMAGEUBUNTU20: gitlab-registry.cern.ch/delphi/docker/builder-ubuntu20:latest
     IMAGEUBUNTU22: gitlab-registry.cern.ch/delphi/docker/builder-ubuntu22:latest
@@ -33,6 +35,8 @@ include:
   - CI/al8_32.yml
   - CI/al9_64.yml
   - CI/al9_32.yml
+  - CI/al8_aarch64.yml
+  - CI/al9_aarch64.yml
   - CI/ubuntu18_64.yml
   - CI/ubuntu20_64.yml
   - CI/ubuntu22_64.yml
diff --git a/CI/al8_aarch64.yml b/CI/al8_aarch64.yml
new file mode 100644
index 00000000..bec33968
--- /dev/null
+++ b/CI/al8_aarch64.yml
@@ -0,0 +1,163 @@
+---
+#########################################################################
+#########################################################################
+cernlib_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: cernlib
+  before_script:
+    - dnf -y --enablerepo powertools install openssl-devel cmake
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make clean setup cernlib
+  artifacts:
+    paths:
+      - delphi
+
+dstana_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: dstana
+  dependencies:
+    - cernlib_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make dstana
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+lep1simana_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: lep2simana
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make v95d v94c v93d v92e
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+lep2simana_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: lep2simana
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make va0u va0e v99e v98e v97g v96g
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+delgra_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: delgra
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - dnf -y  --enablerepo powertools install libGLEW glew-devel
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make openphigs delgra
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+des_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: des
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+    - lep1simana_al8_aarm64
+    - lep2simana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make des
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+examples_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: examples
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make examples docs
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+idea_al8_aarm64:
+  image: $IMAGEAL8ARM
+  tags:
+    - docker-aarch64
+  stage: idea
+  before_script:
+    - dnf -y install gcc-c++
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - echo "${CI_PASSWD}" | kinit ${CI_USER}@CERN.CH
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make idea
+  allow_failure: true
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+artifacts_al8_aarm64:
+  image: $IMAGECS9
+  tags:
+    - docker-aarch64
+  stage: artifacts
+  dependencies:
+    - cernlib_al8_aarm64
+    - dstana_al8_aarm64
+    - lep1simana_al8_aarm64
+    - lep2simana_al8_aarm64
+    - des_al8_aarm64
+    - delgra_al8_aarm64
+    - idea_al8_aarm64
+    - examples_al8_aarm64
+  script:
+    - export GROUP_DIR=`pwd`/delphi/*
+    - delphi/*/scripts/check_install
+    - echo "Packaging artifacts..."
+  artifacts:
+    paths:
+      - delphi
diff --git a/CI/al9_aarch64.yml b/CI/al9_aarch64.yml
new file mode 100644
index 00000000..e9fabdeb
--- /dev/null
+++ b/CI/al9_aarch64.yml
@@ -0,0 +1,162 @@
+---
+#########################################################################
+#########################################################################
+cernlib_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: cernlib
+  before_script:
+    - yum -y install openssl-devel cmake
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make clean setup cernlib
+  artifacts:
+    paths:
+      - delphi
+dstana_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: dstana
+  dependencies:
+    - cernlib_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make dstana
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+lep1simana_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: lep2simana
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make v95d v94c v93d v92e
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+lep2simana_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: lep2simana
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make va0u va0e v99e v98e v97g v96g
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+delgra_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: delgra
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - yum -y install libGLEW glew-devel
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make openphigs delgra
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+des_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: des
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+    - lep1simana_al9_aarm64
+    - lep2simana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make des
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+examples_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: examples
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - . /etc/kinit.sh ; klist
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make examples docs
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+idea_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: idea
+  before_script:
+    - dnf -y install gcc-c++
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+  script:
+    - echo "[http]" > ~/.gitconfig; echo "    emptyAuth = true" >> ~/.gitconfig; echo >>  ~/.gitconfig
+    - echo "${CI_PASSWD}" | kinit ${CI_USER}@CERN.CH
+    - path=`pwd`; cd install; export DELPHI_INSTALL_DIR=$path/delphi; make profiles; . delphi.sh; make idea
+  allow_failure: true
+  artifacts:
+    paths:
+      - delphi
+    expire_in: '1 day'
+
+artifacts_al9_aarm64:
+  image: $IMAGEAL9ARM
+  tags:
+    - docker-aarch64
+  stage: artifacts
+  dependencies:
+    - cernlib_al9_aarm64
+    - dstana_al9_aarm64
+    - lep1simana_al9_aarm64
+    - lep2simana_al9_aarm64
+    - delgra_al9_aarm64
+    - des_al9_aarm64
+    - idea_al9_aarm64
+    - examples_al9_aarm64
+  script:
+    - export GROUP_DIR=`pwd`/delphi/*
+    - delphi/*/scripts/check_install
+    - echo "Packaging artifacts..."
+  artifacts:
+    paths:
+      - delphi
-- 
GitLab