Skip to content

try using apptainer instead of docker #21

try using apptainer instead of docker

try using apptainer instead of docker #21

Workflow file for this run

name: Linux ICD tests
on:
push:
schedule:
- cron: '0 0 * * *' # UTC time
env:
ICD_RXJS_BRANCH_NAME: ajm/icd-test-stages-lists
jobs:
Build:
name: Build ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2004-dec2023.sif
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2204-dec2023.sif
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD]
image: centos7-dec3023.sif
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
env:
SRC_DIR: build-${{ matrix.os_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ env.SRC_DIR }}
- name: Build backend
shell: bash
run: |
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
mkdir -p $BUILD_DIR
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "\
git submodule update --init --recursive && \
cmake $GITHUB_WORKSPACE/${{ env.SRC_DIR }} \
-Dtest=on \
-DCMAKE_BUILD_TYPE=Debug \
-DDevSuppressExternalWarnings=ON \
-DCMAKE_CXX_FLAGS='-O0 -g -fsanitize=address -fno-omit-frame-pointer' \
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address' && \
make -j 16"
- name: Check backend runs
shell: bash
run: |
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "./carta_backend --version"
Prepare-ICD-RxJS:
name: Prepare-ICD-RxJS ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2004-dec2023.sif
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2204-dec2023.sif
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD]
image: centos7-dec3023.sif
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
needs: Build
env:
SRC_DIR: build-${{ matrix.os_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ env.SRC_DIR }}
- name: Prepare ICD-RxJS
shell: bash
run: |
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
mkdir -p $BUILD_DIR
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "\
git clone https://github.com/CARTAvis/ICD-RxJS.git && \
cd ICD-RxJS && \
git checkout ${{ env.ICD_RXJS_BRANCH_NAME }} && \
git submodule init && git submodule update && npm install && \
cd protobuf && \
./build_proto.sh"
File-Browser-ICD-Tests:
name: File-Browser ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2004-dec2023.sif
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2204-dec2023.sif
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD]
image: centos7-dec3023.sif
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
env:
SRC_DIR: build-${{ matrix.os_version }}
needs: [Build, Prepare-ICD-RxJS]
if: always()
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
- name: File Browser ICD tests
shell: bash
run: |
TEST_STAGE="file_browser"
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
TEST_DIR=$GITHUB_WORKSPACE/${{ env.SRC_DIR }}/ICD-RxJS
LOG_FILE="/tmp/carta_icd_${{ matrix.os_version }}_${TEST_STAGE}.log"
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "\
# Start carta_backend
ASAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${SRC_DIR}/debug/asan/myasan.supp \
LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${SRC_DIR}/debug/asan/myasan-leaks.supp \
ASAN_SYMBOLIZER_PATH=llvm-symbolizer \
./carta_backend /images \
--top_level_folder /images \
--omp_threads=4 \
--debug_no_auth \
--no_frontend \
--no_database \
--verbosity=5 >> $LOG_FILE 2>&1 & \
CARTA_BACKEND_PID=$! && \
echo 'carta_backend started with PID: $CARTA_BACKEND_PID' && \
# Run ICD tests
cd $TEST_DIR && \
TEST_FILES=$(cat ICD_test_stages/${TEST_STAGE}.tests) && \
for test_file in $TEST_FILES; do
npm test -- $test_file
done && \
# Stop carta_backend
kill $CARTA_BACKEND_PID"
Animator-ICD-Tests:
name: Animator ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2004-dec2023.sif
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD]
image: ubuntu-2204-dec2023.sif
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD]
image: centos7-dec3023.sif
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD]
image: almalinux8-dec3023.sif
env:
SRC_DIR: build-${{ matrix.os_version }}
needs: [File-Browser-ICD-Tests, Prepare-ICD-RxJS]
if: always()
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
- name: Animator ICD tests
shell: bash
run: |
TEST_STAGE="animator"
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
TEST_DIR=$GITHUB_WORKSPACE/${{ env.SRC_DIR }}/ICD-RxJS
LOG_FILE="/tmp/carta_icd_${{ matrix.os_version }}_${TEST_STAGE}.log"
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "\
# Start carta_backend
ASAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${SRC_DIR}/debug/asan/myasan.supp \
LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${SRC_DIR}/debug/asan/myasan-leaks.supp \
ASAN_SYMBOLIZER_PATH=llvm-symbolizer \
./carta_backend /images \
--top_level_folder /images \
--omp_threads=4 \
--debug_no_auth \
--no_frontend \
--no_database \
--verbosity=5 >> $LOG_FILE 2>&1 & \
CARTA_BACKEND_PID=$! && \
echo 'carta_backend started with PID: $CARTA_BACKEND_PID' && \
# Run ICD tests
cd $TEST_DIR && \
TEST_FILES=$(cat ICD_test_stages/${TEST_STAGE}.tests) && \
for test_file in $TEST_FILES; do
npm test -- $test_file
done && \
# Stop carta_backend
kill $CARTA_BACKEND_PID"