-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(spack): test the right development code (#64)
- Loading branch information
1 parent
fef480d
commit 9c2d3ae
Showing
9 changed files
with
350 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: ior+mobject@develop | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- 'doc/**' | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install APT Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y autoconf | ||
sudo apt-get install -y automake | ||
sudo apt-get install -y cmake | ||
sudo apt-get install -y libtool | ||
sudo apt-get install -y libtool-bin | ||
sudo apt-get install -y mpich | ||
sudo apt-get install -y zlib1g-dev | ||
sudo apt-get install -y diffutils | ||
sudo apt-get install -y libdb-dev | ||
sudo apt-get install -y libedit-dev | ||
sudo apt-get install -y libncurses6 | ||
sudo apt-get install -y libxml2-dev | ||
sudo apt-get install -y openssl | ||
- name: Get Sources | ||
uses: actions/checkout@v3 | ||
- name: Checkout Spack | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: spack/spack | ||
path: ./spack | ||
- name: Checkout mochi-spack-packages | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mochi-hpc/mochi-spack-packages | ||
path: ./mochi-spack-packages | ||
- name: Run spack install ior | ||
run: | | ||
. ./spack/share/spack/setup-env.sh | ||
spack compiler find | ||
spack compilers | ||
spack external find autoconf | ||
spack external find automake | ||
spack external find berkeley-db | ||
spack external find boost | ||
spack external find cmake | ||
spack external find diffutils | ||
spack external find libedit | ||
spack external find libtool | ||
spack external find libiconv | ||
spack external find libxml2 | ||
spack external find m4 | ||
spack external find mpich | ||
spack external find ncurses | ||
spack external find openssl | ||
spack external find perl | ||
spack external find pkgconf | ||
spack external find zlib | ||
spack external find xz | ||
spack repo add ./mochi-spack-packages | ||
spack install mobject@develop+bedrock | ||
spack load mobject | ||
spack install ior@develop+mobject | ||
spack load ior | ||
spack view --verbose symlink install ior@develop+mobject -i | ||
export LD_LIBRARY_PATH=$PWD/install/lib:$PWD/install/lib64 | ||
echo $LD_LIBRARY_PATH | ||
ls | ||
./prepare.sh | ||
./prepare_gh.sh | ||
./configure --enable-bedrock | ||
make | ||
sudo ./ci.sh | ||
- name: Upload | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-suite.log | ||
path: ${{ runner.workspace }}/mobject/test-suite.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: ior+mobject@develop ^ | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- 'doc/**' | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install APT Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y autoconf | ||
sudo apt-get install -y automake | ||
sudo apt-get install -y cmake | ||
sudo apt-get install -y libtool | ||
sudo apt-get install -y libtool-bin | ||
sudo apt-get install -y mpich | ||
sudo apt-get install -y zlib1g-dev | ||
sudo apt-get install -y diffutils | ||
sudo apt-get install -y libdb-dev | ||
sudo apt-get install -y libedit-dev | ||
sudo apt-get install -y libncurses6 | ||
sudo apt-get install -y libxml2-dev | ||
sudo apt-get install -y openssl | ||
- name: Get Sources | ||
uses: actions/checkout@v3 | ||
- name: Checkout Spack | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: spack/spack | ||
path: ./spack | ||
- name: Checkout mochi-spack-packages | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mochi-hpc/mochi-spack-packages | ||
path: ./mochi-spack-packages | ||
- name: Run spack install ior | ||
run: | | ||
. ./spack/share/spack/setup-env.sh | ||
spack compiler find | ||
spack compilers | ||
spack external find autoconf | ||
spack external find automake | ||
spack external find berkeley-db | ||
spack external find boost | ||
spack external find cmake | ||
spack external find diffutils | ||
spack external find libedit | ||
spack external find libtool | ||
spack external find libiconv | ||
spack external find libxml2 | ||
spack external find m4 | ||
spack external find mpich | ||
spack external find ncurses | ||
spack external find openssl | ||
spack external find perl | ||
spack external find pkgconf | ||
spack external find zlib | ||
spack external find xz | ||
spack repo add ./mochi-spack-packages | ||
spack install ior@develop+mobject ^mobject@develop+bedrock ^mercury@master~boostsys | ||
spack load ior | ||
spack view --verbose symlink install ior@develop+mobject -i | ||
export LD_LIBRARY_PATH=$PWD/install/lib:$PWD/install/lib64 | ||
echo $LD_LIBRARY_PATH | ||
ls | ||
./prepare.sh | ||
./prepare_gh.sh | ||
./configure --enable-bedrock | ||
make | ||
sudo ./ci.sh | ||
- name: Upload | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-suite.log | ||
path: ${{ runner.workspace }}/mobject/test-suite.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
# | ||
# Test Mobject using GitHub Action. | ||
# | ||
# This script assumes that Spack installed dependencies under $PWD/install. | ||
# | ||
# Author: Hyokyung Lee ([email protected]) | ||
# Last Update: 2022-11-17 | ||
|
||
|
||
echo "Checking cwd" | ||
echo $PWD | ||
|
||
export LD_LIBRARY_PATH=$PWD/install/lib:$PWD/install/lib64 | ||
echo "Checking LD_LIBRARY_PATH" | ||
echo $LD_LIBRARY_PATH | ||
|
||
export PATH=$PWD/install/bin:$PATH | ||
echo "Checking PATH" | ||
echo $PATH | ||
|
||
echo "Creating /usr/local/tmp to check root permission" | ||
mkdir /usr/local/tmp | ||
|
||
echo "Running sysctl" | ||
/usr/sbin/sysctl kernel.yama.ptrace_scope=0 | ||
|
||
echo "Testing using make check" | ||
make check | ||
grep -r \\[error\\] tests/*.sh.log | ||
ls /tmp/ | ||
export MOBJECT_CLUSTER_FILE=$PWD/mobject.ssg | ||
bedrock na+sm -c $PWD/tests/config.json -v trace & | ||
ior -g -a RADOS -t 64k -b 128k --rados.user=foo --rados.pool=bar --rados.conf $MOBJECT_CLUSTER_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
echo "Copying GitHub CI files..." | ||
cp tests/config_gh.json tests/config.json | ||
cp tests/mobject-test-util-gh.sh tests/mobject-test-util.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"ssg" : [ | ||
{ | ||
"name" : "mobject", | ||
"bootstrap" : "init", | ||
"group_file" : "mobject.ssg" | ||
} | ||
], | ||
"libraries" : { | ||
"yokan" : "libyokan-bedrock-module.so", | ||
"bake" : "libbake-bedrock.so", | ||
"mobject" : "lib/.libs/libmobject-bedrock.so" | ||
}, | ||
"abt_io" : [ | ||
{ | ||
"name" : "bake_abt_io", | ||
"pool" : "__primary__" | ||
} | ||
], | ||
"providers" : [ | ||
{ | ||
"name" : "metadata", | ||
"type" : "yokan", | ||
"provider_id" : 0, | ||
"config" : { | ||
"databases" : [ | ||
{ | ||
"name" : "mobject_oid_map", | ||
"type" : "map", | ||
"config" : { | ||
"comparator" : "lib/.libs/libmobject-comparators.so:mobject_oid_map_compare" | ||
} | ||
}, | ||
{ | ||
"name" : "mobject_name_map", | ||
"type" : "map", | ||
"config" : { | ||
"comparator" : "lib/.libs/libmobject-comparators.so:mobject_name_map_compare" | ||
} | ||
}, | ||
{ | ||
"name" : "mobject_seg_map", | ||
"type" : "map", | ||
"config" : { | ||
"comparator" : "lib/.libs/libmobject-comparators.so:mobject_seg_map_compare" | ||
} | ||
}, | ||
{ | ||
"name" : "mobject_omap_map", | ||
"type" : "map", | ||
"config" : { | ||
"comparator" : "lib/.libs/libmobject-comparators.so:mobject_omap_map_compare" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name" : "storage", | ||
"type" : "bake", | ||
"provider_id" : 0, | ||
"config" : { | ||
"pipeline_enable" : true, | ||
"pipeline_npools" : 4, | ||
"pipeline_nbuffers_per_pool" : 32, | ||
"pipeline_first_buffer_size" : 65536, | ||
"pipeline_multiplier" : 4, | ||
"file_backend": { | ||
"targets": [ | ||
"/tmp/mobject.dat" | ||
] | ||
} | ||
}, | ||
"dependencies" : { | ||
"abt_io" : "bake_abt_io" | ||
} | ||
}, | ||
{ | ||
"name" : "coordinator", | ||
"type" : "mobject", | ||
"provider_id" : 1, | ||
"config" : {}, | ||
"dependencies" : { | ||
"bake_provider_handle" : "storage@local", | ||
"yokan_provider_handle" : "metadata@local" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# General test script utilities | ||
# | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
if [ -z "$TIMEOUT" ] ; then | ||
echo expected TIMEOUT variable defined to its respective command | ||
exit 1 | ||
fi | ||
|
||
function run_to() | ||
{ | ||
maxtime=${1}s | ||
shift | ||
$TIMEOUT --signal=9 $maxtime "$@" | ||
} | ||
|
||
function mobject_test_start_servers() | ||
{ | ||
startwait=${1:-15} | ||
maxtime=${2:-120} | ||
# storage=${3:-/dev/shm/mobject.dat} | ||
storage=${3:-/tmp/mobject.dat} | ||
|
||
rm -rf ${storage} | ||
# bake-mkpool -s 50M /dev/shm/mobject.dat | ||
bake-mkpool -s 50M /tmp/mobject.dat | ||
|
||
run_to $maxtime bedrock na+sm -c $SCRIPT_DIR/config.json -v trace & | ||
if [ $? -ne 0 ]; then | ||
# TODO: this doesn't actually work; can't check return code of | ||
# something executing in background. We have to rely on the | ||
# return codes of the actual client side tests to tell if | ||
# everything started properly | ||
exit 1 | ||
fi | ||
|
||
# wait for servers to start | ||
sleep ${startwait} | ||
} |