Skip to content

Commit

Permalink
cleanups, first attempt at pages upload
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Nov 28, 2023
1 parent 1eb8e7f commit 49e583e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 23 deletions.
61 changes: 50 additions & 11 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ on:
- cron: '15 06 * * *' # UTC 6:15am, corresponds to 00:15 CST or 01:15 CDT
push:
paths:
# Also run the build when this file gets modified as part of a PR
# Also run the build when these files are modified as part of a PR
- '.github/workflows/autobuild.yml'
- '.github/workflows/delta-sbatch-slurm.sh'
- '.github/workflows/jobmonitor.sh'


# Cancel in progress CI runs when a new run targeting the same PR or branch/tag is triggered.
Expand All @@ -18,14 +19,20 @@ concurrency:
cancel-in-progress: true

jobs:
Delta:
delta:
timeout-minutes: 60

runs-on: delta
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

# runs-on: delta
runs-on: ubuntu-latest
name: Delta mpi-linux-x86_64 # Could test various builds (e.g., MPI, UCX, ...) via a build matrix

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Host info
run: |
set -x
Expand All @@ -36,15 +43,47 @@ jobs:
pwd
- name: build
run: |
set -ex
export target="mpi-linux-x86_64"
.github/workflows/jobmonitor.sh .github/workflows/delta-sbatch-slurm.sh
set -x
# export target="mpi-linux-x86_64"
# .github/workflows/jobmonitor.sh .github/workflows/delta-sbatch-slurm.sh
echo 0 > result.latest
echo "hello world" > output.latest
- name: Check out autobuild-logs repo
uses: actions/checkout@v4
with:
repository: UIUC-PPL/autobuild-logs
token: ${{ secrets.GITHUB_TOKEN }}
path: autobuild-logs

- name: results
run: |
set -x
cat result.latest
if grep '0' result.latest
then
echo "Success"
res="success"
else
echo "Failure"
fi
# should also https://github.com/marketplace/actions/send-email
res="failure"
fi
pwd
echo $res
cd autobuild-logs
mkdir -p delta/mpi-linux-x86_64
cd delta/mpi-linux-x86_64
cp ../../../output.latest Delta_mpi-linux-x86_64_$(date '+%Y-%m-%dT%H-%M-%S%z')_output_$res.txt
git config --global user.email "autobuild-logs@charm"
git config --global user.name "Autobuild-logs user"
git add .
git commit -m "Autobuild results for delta/mpi-linux-x86_64"
git push
# should also https://github.com/marketplace/actions/send-email
21 changes: 15 additions & 6 deletions .github/workflows/delta-sbatch-slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@
#SBATCH -J autobuild
#SBATCH -p cpu
#SBATCH -A mzu-delta-cpu
#cd $indir

set -x

module load libfabric; module load cmake
./build all-test $target --with-production --enable-error-checking -j64 -g
#

mkdir -p $target

# ./build all-test $target --with-production --enable-error-checking -j64 -g

cd $target
make -C tests test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
make -C examples test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
make -C benchmarks test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
# make -C tests test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
# make -C examples test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
# make -C benchmarks test OPTS="$flags" TESTOPTS="$testopts" $maketestopts

# For debugging:
echo "Just 4 debugging"
true

# Save make exit status
status=$?
echo $status > ../$SLURM_JOBID.result
21 changes: 15 additions & 6 deletions .github/workflows/jobmonitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ End() {
$queue_kill $jobid
exit $1
}

echo "Submitting batch job for> $target OPTS=$flags"
echo " using the command> $queue_qsub $script"
chmod 755 $script

while [ -z "$jobid" ]
do
$queue_qsub $script > .status.$$ 2>&1
Expand All @@ -25,12 +27,16 @@ do
jobid=`cat .status.$$ | tail -1 | awk '{print $4}'`
rm -f .status.$$
done

echo "Job enqueued under job ID $jobid"

export output=$jobid.output
export result=$jobid.result

# kill job if interrupted
trap 'End 1' 2 3
retry=0

# Wait for the job to complete, by checking its status
while [ true ]
do
Expand All @@ -40,9 +46,9 @@ do
#if [[ $exitstatus != 0 || $linecount != 2 ]]
if [[ $linecount != 2 ]]
then
# The job is done-- print its output
# The job is done-- print its output
rm tmp.$$
# When job hangs, result file does not exist
# When job hangs, result file does not exist
test -f $result && status=`cat $result` || status=1
echo "==================================== OUTPUT (STDOUT & STDERR) ========================================"
cat $output
Expand All @@ -57,12 +63,15 @@ do
cat $result
echo "======================================================================================================"
fi
# mv result and output to result.latest
mv $result result.latest
mv $output output.latest

# mv result and output to result.latest
mv $result result.latest
mv $output output.latest

exit $status
fi
# The job is still queued or running-- print status and wait

# The job is still queued or running-- print status and wait
tail -1 tmp.$$
rm tmp.$$
sleep 60
Expand Down

0 comments on commit 49e583e

Please sign in to comment.