-
Notifications
You must be signed in to change notification settings - Fork 38
/
nightly_navajo.sh
executable file
·35 lines (27 loc) · 1.1 KB
/
nightly_navajo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# TOKEN required to commit to sandmark-nightly repository
TOKEN=$1
# The default Sandmark nightly directory
SANDMARK_NIGHTLY_DIR=${SANDMARK_NIGHTLY_DIR:-"/local/scratch/sandmark_nightly_workspace"}
# Check if sandmark-nightly directory exists
function check_sandmark_subdir {
if [ ! -d $1/sandmark-nightly ]; then
git clone -b testing https://[email protected]/ocaml-bench/sandmark-nightly.git $1/sandmark-nightly
fi;
}
# Sandmark nightly directory
if [ ! -d $SANDMARK_NIGHTLY_DIR ]; then
mkdir $SANDMARK_NIGHTLY_DIR
fi;
# Check Sandmark nightly sub-directories
check_sandmark_subdir $SANDMARK_NIGHTLY_DIR
# OPAM context
eval $(opam env)
# Run!
SANDMARK_NIGHTLY_DIR=${SANDMARK_NIGHTLY_DIR} CUSTOM_FILE="https://raw.githubusercontent.com/ocaml-bench/sandmark-nightly-config/main/config/custom_navajo.json" flock -w 7200 /tmp/sandmark.lock bash /home/sandmark/production/run_all_custom.sh | ts '[%Y-%m-%d %H:%M:%S]'
# Push to sandmark-nightly
cd $SANDMARK_NIGHTLY_DIR/sandmark-nightly/
git pull origin testing
git add .
git commit -m "Automated commit (Navajo)"
git push origin testing