Mercurial > repos > blastem
annotate build_upload_nightly @ 1569:0ec89dadb36d
Add code for loading PNG images. Added 360 controller image. WIP work on gamepad mapping UI
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 19 Apr 2018 00:51:10 -0700 |
parents | 8e3adc6264d3 |
children | 0d942ecf38c5 |
rev | line source |
---|---|
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #!/bin/sh |
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 |
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 name=$1 |
1241
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
4 . "$HOME/$name.params" |
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
5 echo Starting $CONTAINER_NAME |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 lxc-start -n "$CONTAINER_NAME" |
1241
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
7 if [ $? -ne 0 ]; then |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 exit $? |
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 fi |
1243
50700d370a33
Seems like network in the container takes a moment to work, added a sleep to build_upload_nightly to compensate
Michael Pavone <pavone@retrodev.com>
parents:
1242
diff
changeset
|
10 sleep 10 |
1241
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
11 echo Starting build by $BUILD_USER in $CONTAINER_NAME |
1252
8e3adc6264d3
Don't depend on USER being set in build_nightly as it does not seem to work when build job is run from cron
Michael Pavone <pavone@retrodev.com>
parents:
1251
diff
changeset
|
12 lxc-attach -n "$CONTAINER_NAME" -- /home/$BUILD_USER/blastem/build_nightly $BUILD_USER needsu 2>&1 > /tmp/build_${name}_out.log |
1251
f249fd91b0f5
More logging. Fix path in upload step of build_upload_win_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1250
diff
changeset
|
13 result=$? |
f249fd91b0f5
More logging. Fix path in upload step of build_upload_win_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1250
diff
changeset
|
14 if [ $result -ne 0 ]; then |
f249fd91b0f5
More logging. Fix path in upload step of build_upload_win_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1250
diff
changeset
|
15 echo Build falied with return code $result stopping $CONTAINER_NAME |
1241
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
16 lxc-stop -n "$CONTAINER_NAME" |
1252
8e3adc6264d3
Don't depend on USER being set in build_nightly as it does not seem to work when build job is run from cron
Michael Pavone <pavone@retrodev.com>
parents:
1251
diff
changeset
|
17 exit $result |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 fi |
1250
738c8aa2c741
Add some logging to build_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1243
diff
changeset
|
19 echo "Build succeeded, stopping $CONTAINER_NAME" |
1241
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
20 lxc-stop -n "$CONTAINER_NAME" |
23a2cf9782a7
Fixes for nightly build upload script
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
21 . $HOME/remote.params |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 artifact=$(tail -n 1 /tmp/build_${name}_out.log) |
1250
738c8aa2c741
Add some logging to build_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1243
diff
changeset
|
23 echo "Uploaing $artifact to $REMOTE_HOST" |
1242
73003ad27518
Use public key auth rather than trying to make passowrd auth work in a script
Michael Pavone <pavone@retrodev.com>
parents:
1241
diff
changeset
|
24 scp -i "$REMOTE_IDENT" "$HOME/.local/share/lxc/$CONTAINER_NAME/rootfs/home/$BUILD_USER/blastem/$artifact" $REMOTE_USER@$REMOTE_HOST:/home/$REMOTE_USER/nightlies |
1250
738c8aa2c741
Add some logging to build_nightly
Michael Pavone <pavone@retrodev.com>
parents:
1243
diff
changeset
|
25 echo "Done" |