2021-09-23 20:19:02 +00:00
|
|
|
image: debian/oldstable
|
|
|
|
packages:
|
|
|
|
- curl
|
|
|
|
- build-essential
|
|
|
|
- libsdl2-dev
|
|
|
|
- rsync
|
|
|
|
oauth: pages.sr.ht/PAGES:RW
|
|
|
|
environment:
|
|
|
|
SITE: rabbits.srht.site
|
|
|
|
SSH_HOST_KEYS: |
|
|
|
|
[w1.uxn-build.ald.nu]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP+IYCB4JrKklFjWSMRkPBTqUjBqUuhlDQy6/X3l8xj5
|
2021-10-10 20:34:16 +00:00
|
|
|
[m1.uxn-build.ald.nu]:2223 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDvWVqlHh3XQ5ziEbT55K896/mW2BVDdkU6hWgIfU9md
|
2021-09-23 20:19:02 +00:00
|
|
|
secrets:
|
|
|
|
- 138ad607-a4ec-4d74-88a1-8f3be2ba2d03
|
|
|
|
tasks:
|
|
|
|
- prepare: |
|
|
|
|
rm -f out
|
|
|
|
mkdir -p out
|
|
|
|
umask 077
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
printf '%s\n' "${SSH_HOST_KEYS}" > ~/.ssh/known_hosts
|
2021-10-10 20:34:16 +00:00
|
|
|
printf 'User build\nStrictHostKeyChecking yes\nCheckHostIP no\nHost win\nHostName w1.uxn-build.ald.nu\nPort 2222\nHost mac\nHostName m1.uxn-build.ald.nu\nPort 2223\n' > ~/.ssh/config
|
2021-09-23 20:19:02 +00:00
|
|
|
- build-linux: |
|
|
|
|
cd uxn
|
2021-10-14 22:38:29 +00:00
|
|
|
./build.sh --no-run
|
2021-09-23 20:19:02 +00:00
|
|
|
mv bin uxn
|
|
|
|
tar -czf ../out/uxn-linux-amd64.tar.gz uxn
|
|
|
|
cd ..
|
|
|
|
- build-windows: |
|
2021-10-14 22:38:29 +00:00
|
|
|
ssh win "rm -f uxn-windows-64bit.zip; export PATH=\"\${PATH}:/mingw64/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); MSYSTEM=MSYS ./build.sh --no-run; mv bin uxn; zip -qr ../uxn-windows-64bit.zip uxn"
|
2021-09-23 20:19:02 +00:00
|
|
|
rsync win:uxn-windows-64bit.zip out/
|
2021-10-10 20:34:16 +00:00
|
|
|
- build-macos: |
|
2021-10-14 22:38:29 +00:00
|
|
|
ssh mac "rm -f uxn-macos.tar.gz; export PATH=\"\${PATH}:/usr/local/bin\"; set -ex; cd uxn; git fetch; git checkout .; git clean -xfd; git checkout $(cd uxn && git rev-parse HEAD); ./build.sh --no-run; mv bin uxn; tar -zcf ../uxn-macos.tar.gz uxn"
|
2021-10-10 20:34:16 +00:00
|
|
|
rsync mac:uxn-macos.tar.gz out/
|
2021-09-23 20:19:02 +00:00
|
|
|
- upload: |
|
2021-10-14 23:20:57 +00:00
|
|
|
if [ "$(cd uxn && git rev-parse HEAD)" != "$(cd uxn && git rev-parse origin/main)" ]; then exit; fi
|
2021-09-23 20:19:02 +00:00
|
|
|
ls -l out
|
2021-10-10 20:34:16 +00:00
|
|
|
tar -czf out.tar.gz -C out uxn-linux-amd64.tar.gz uxn-windows-64bit.zip uxn-macos.tar.gz
|
2021-09-23 20:19:02 +00:00
|
|
|
acurl() {
|
|
|
|
set +x
|
|
|
|
curl -H "Authorization: Bearer ${OAUTH2_TOKEN}" "${@}"
|
|
|
|
set -x
|
|
|
|
}
|
|
|
|
acurl -f "https://pages.sr.ht/publish/${SITE}" -Fcontent=@out.tar.gz
|
|
|
|
acurl -f "https://pages.sr.ht/publish/${SITE}" -Fcontent=@out.tar.gz -Fprotocol=GEMINI
|