Skip to content

Commit 37f57c1

Browse files
cleanups, first attempt at pages upload
1 parent 1eb8e7f commit 37f57c1

File tree

3 files changed

+66
-17
lines changed

3 files changed

+66
-17
lines changed

.github/workflows/autobuild.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ on:
66
- cron: '15 06 * * *' # UTC 6:15am, corresponds to 00:15 CST or 01:15 CDT
77
push:
88
paths:
9-
# Also run the build when this file gets modified as part of a PR
9+
# Also run the build when these files are modified as part of a PR
1010
- '.github/workflows/autobuild.yml'
1111
- '.github/workflows/delta-sbatch-slurm.sh'
12+
- '.github/workflows/jobmonitor.sh'
1213

1314

1415
# Cancel in progress CI runs when a new run targeting the same PR or branch/tag is triggered.
@@ -18,7 +19,7 @@ concurrency:
1819
cancel-in-progress: true
1920

2021
jobs:
21-
Delta:
22+
delta:
2223
timeout-minutes: 60
2324

2425
runs-on: delta
@@ -36,15 +37,45 @@ jobs:
3637
pwd
3738
- name: build
3839
run: |
39-
set -ex
40+
set -x
4041
export target="mpi-linux-x86_64"
4142
.github/workflows/jobmonitor.sh .github/workflows/delta-sbatch-slurm.sh
4243
- name: results
4344
run: |
45+
set -x
46+
cat result.latest
4447
if grep '0' result.latest
4548
then
4649
echo "Success"
4750
else
4851
echo "Failure"
49-
fi
50-
# should also https://github.com/marketplace/actions/send-email
52+
fi
53+
54+
mkdir -p output_html
55+
cp output.latest output_html/Delta_mpi-linux-x86_64_$(date '+%Y-%m-%dT%H-%M-%S%z')_output.txt
56+
ls -l output_html
57+
# should also https://github.com/marketplace/actions/send-email
58+
59+
- name: Fix permissions
60+
run: |
61+
set -x
62+
chmod -v -R a+rX output_html/
63+
64+
- name: Upload artifacts
65+
uses: actions/upload-pages-artifact@v2
66+
with:
67+
path: 'output_html'
68+
69+
deploy-pages:
70+
runs-on: ubuntu-latest
71+
needs: delta
72+
permissions:
73+
pages: write # to deploy to Pages
74+
id-token: write # to verify the deployment originates from an appropriate source
75+
environment:
76+
name: github-pages
77+
url: ${{ steps.deployment.outputs.page_url }}
78+
steps:
79+
- name: Deploy to GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v2

.github/workflows/delta-sbatch-slurm.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,24 @@
77
#SBATCH -J autobuild
88
#SBATCH -p cpu
99
#SBATCH -A mzu-delta-cpu
10-
#cd $indir
10+
1111
set -x
12+
1213
module load libfabric; module load cmake
13-
./build all-test $target --with-production --enable-error-checking -j64 -g
14-
#
14+
15+
mkdir -p $target
16+
17+
# ./build all-test $target --with-production --enable-error-checking -j64 -g
18+
1519
cd $target
16-
make -C tests test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
17-
make -C examples test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
18-
make -C benchmarks test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
20+
# make -C tests test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
21+
# make -C examples test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
22+
# make -C benchmarks test OPTS="$flags" TESTOPTS="$testopts" $maketestopts
23+
24+
# For debugging:
25+
echo "Just 4 debugging"
26+
true
27+
1928
# Save make exit status
2029
status=$?
2130
echo $status > ../$SLURM_JOBID.result

.github/workflows/jobmonitor.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ End() {
1010
$queue_kill $jobid
1111
exit $1
1212
}
13+
1314
echo "Submitting batch job for> $target OPTS=$flags"
1415
echo " using the command> $queue_qsub $script"
1516
chmod 755 $script
17+
1618
while [ -z "$jobid" ]
1719
do
1820
$queue_qsub $script > .status.$$ 2>&1
@@ -25,12 +27,16 @@ do
2527
jobid=`cat .status.$$ | tail -1 | awk '{print $4}'`
2628
rm -f .status.$$
2729
done
30+
2831
echo "Job enqueued under job ID $jobid"
32+
2933
export output=$jobid.output
3034
export result=$jobid.result
35+
3136
# kill job if interrupted
3237
trap 'End 1' 2 3
3338
retry=0
39+
3440
# Wait for the job to complete, by checking its status
3541
while [ true ]
3642
do
@@ -40,9 +46,9 @@ do
4046
#if [[ $exitstatus != 0 || $linecount != 2 ]]
4147
if [[ $linecount != 2 ]]
4248
then
43-
# The job is done-- print its output
49+
# The job is done-- print its output
4450
rm tmp.$$
45-
# When job hangs, result file does not exist
51+
# When job hangs, result file does not exist
4652
test -f $result && status=`cat $result` || status=1
4753
echo "==================================== OUTPUT (STDOUT & STDERR) ========================================"
4854
cat $output
@@ -57,12 +63,15 @@ do
5763
cat $result
5864
echo "======================================================================================================"
5965
fi
60-
# mv result and output to result.latest
61-
mv $result result.latest
62-
mv $output output.latest
66+
67+
# mv result and output to result.latest
68+
mv $result result.latest
69+
mv $output output.latest
70+
6371
exit $status
6472
fi
65-
# The job is still queued or running-- print status and wait
73+
74+
# The job is still queued or running-- print status and wait
6675
tail -1 tmp.$$
6776
rm tmp.$$
6877
sleep 60

0 commit comments

Comments
 (0)