mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-22 13:55:11 +00:00
Build combined archives with starter packs.
This commit is contained in:
parent
deace3b79a
commit
251d7cae71
1 changed files with 18 additions and 12 deletions
30
.build.yml
30
.build.yml
|
@ -18,8 +18,8 @@ sources:
|
|||
- https://git.sr.ht/~rabbits/uxn
|
||||
tasks:
|
||||
- prepare: |
|
||||
rm -f out
|
||||
mkdir -p out
|
||||
rm -f out build
|
||||
mkdir -p out build/linux-amd64 build/windows-64bit build/macos build/rompack/uxn
|
||||
umask 077
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s\n' "${SSH_HOST_KEYS}" > ~/.ssh/known_hosts
|
||||
|
@ -27,9 +27,7 @@ tasks:
|
|||
- build-linux: |
|
||||
cd uxn
|
||||
./build.sh --no-run
|
||||
mv bin uxn
|
||||
tar -czf ../out/uxn-linux-amd64.tar.gz uxn
|
||||
cd ..
|
||||
mv bin ../build/linux-amd64/uxn
|
||||
- build-rompack: |
|
||||
mkdir -p rompack/uxn
|
||||
for F in uxn/projects/software/calc.tal uxn/projects/software/launcher.tal uxn/projects/examples/demos/piano.tal uxn/projects/examples/demos/clock.tal catclock/src/main.tal dexe/src/main.tal donsol/src/main.tal left/src/main.tal nasu/src/main.tal noodle/src/main.tal orca-toy/src/main.tal:orca.rom turye/src/main.tal; do
|
||||
|
@ -43,17 +41,25 @@ tasks:
|
|||
F="${F%:*}"
|
||||
fi
|
||||
[ -d "${PROJECT}" ] || git clone "https://git.sr.ht/~rabbits/${PROJECT}"
|
||||
( cd "${PROJECT}" && ../uxn/uxn/uxnasm "${F#*/}" "../rompack/uxn/${ROMNAME}" || rm -f "../rompack/uxn/${ROMNAME}" )
|
||||
( cd "${PROJECT}" && ../build/linux-amd64/uxn/uxnasm "${F#*/}" "../build/rompack/uxn/${ROMNAME}" || rm -f "../build/rompack/uxn/${ROMNAME}" )
|
||||
done
|
||||
tar -czf out/uxn-rompack.tar.gz -C rompack uxn
|
||||
( cd rompack && zip -qr ../out/uxn-rompack.zip uxn )
|
||||
[ -e ~/.ssh/id_rsa ] || complete-build
|
||||
- build-windows: |
|
||||
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"
|
||||
rsync win:uxn-windows-64bit.zip out/
|
||||
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"
|
||||
rsync -rp win:uxn/bin/ build/windows-64bit/uxn/
|
||||
- build-macos: |
|
||||
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"
|
||||
rsync mac:uxn-macos.tar.gz out/
|
||||
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"
|
||||
rsync -rp mac:uxn/bin/ build/macos/uxn/
|
||||
- archive: |
|
||||
for PROJECT in linux-amd64 windows-64bit macos rompack; do
|
||||
tar -czf "out/uxn-${PROJECT}.tar.gz" -C "build/${PROJECT}" uxn
|
||||
( cd "build/${PROJECT}" && zip -qr "../../out/uxn-${PROJECT}.zip" uxn )
|
||||
if [ "${PROJECT}" != rompack ]; then
|
||||
cp build/rompack/uxn/* "build/${PROJECT}/"
|
||||
tar -czf "out/uxn-starter-${PROJECT}.tar.gz" -C "build/${PROJECT}" uxn
|
||||
( cd "build/${PROJECT}" && zip -qr "../../out/uxn-starter-${PROJECT}.zip" uxn )
|
||||
fi
|
||||
done
|
||||
- upload: |
|
||||
if [ "$(cd uxn && git rev-parse HEAD)" != "$(cd uxn && git rev-parse origin/main)" ]; then exit; fi
|
||||
ls -l out
|
||||
|
|
Loading…
Reference in a new issue