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 27, 2023
1 parent 1eb8e7f commit 3d99bcd
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 17 deletions.
43 changes: 38 additions & 5 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,7 +19,7 @@ concurrency:
cancel-in-progress: true

jobs:
Delta:
delta:
timeout-minutes: 60

runs-on: delta
Expand All @@ -36,15 +37,47 @@ jobs:
pwd
- name: build
run: |
set -ex
set -x
export target="mpi-linux-x86_64"
.github/workflows/jobmonitor.sh .github/workflows/delta-sbatch-slurm.sh
- name: results
run: |
set -x
cat result.latest
if grep '0' result.latest
then
echo "Success"
else
echo "Failure"
fi
# should also https://github.com/marketplace/actions/send-email
fi
mkdir -p output_html
cp output.latest output_html/Delta_mpi-linux-x86_64_$(date '+%Y-%m-%dT%H-%M-%S%z')_output.txt
ls -l output_html
# should also https://github.com/marketplace/actions/send-email
- name: Fix permissions
run: |
set -x
ls -l
chmod -vv -c -R +rX output_html/
ls -l output_html
- name: Upload artifacts
uses: actions/upload-pages-artifact@v2
with:
path: 'output_html'

deploy-pages:
runs-on: ubuntu-latest
needs: delta
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
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 3d99bcd

Please sign in to comment.