diff options
author | Aki <please@ignore.pl> | 2022-10-16 02:03:42 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-10-16 02:03:42 +0200 |
commit | 49bc1ee46dcbe1b9113959d04f21b81647112a36 (patch) | |
tree | 97dd4ee7ffc4306bb60fd928fa154430fdc69ab1 | |
parent | 081f071ac11ab6ebaee1f7a2367fa1f9ecad784a (diff) | |
download | starshatter-49bc1ee46dcbe1b9113959d04f21b81647112a36.zip starshatter-49bc1ee46dcbe1b9113959d04f21b81647112a36.tar.gz starshatter-49bc1ee46dcbe1b9113959d04f21b81647112a36.tar.bz2 |
Implemented simple CI scripts to handle common tasks in pipeline
-rwxr-xr-x | ci/build.sh | 2 | ||||
-rwxr-xr-x | ci/deploy-itchio.sh | 3 | ||||
-rwxr-xr-x | ci/generate.sh | 2 | ||||
-rwxr-xr-x | ci/setup-arch.sh | 15 |
4 files changed, 22 insertions, 0 deletions
diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index 0000000..bda4f3c --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cmake --build $builddir diff --git a/ci/deploy-itchio.sh b/ci/deploy-itchio.sh new file mode 100755 index 0000000..8177d8f --- /dev/null +++ b/ci/deploy-itchio.sh @@ -0,0 +1,3 @@ +#!/bin/sh +DESTDIR=$staging cmake --install $builddir +butler push $staging $target:$branch-full-windows-x86 --userversion-file $builddir/version diff --git a/ci/generate.sh b/ci/generate.sh new file mode 100755 index 0000000..d62095a --- /dev/null +++ b/ci/generate.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cmake -B $builddir -S $srcdir --toolchain=$srcdir/cmake/toolchains/i686-w64-mingw32.cmake --install-prefix=/starshatter diff --git a/ci/setup-arch.sh b/ci/setup-arch.sh new file mode 100755 index 0000000..b861535 --- /dev/null +++ b/ci/setup-arch.sh @@ -0,0 +1,15 @@ +#!/bin/sh +config=/etc/pacman.conf +cache=/var/cache/pacman/pkg +if ! grep '^\[multilib\]' $config; then + echo "[multilib]" >$config + echo "Include = /etc/pacman.d/mirrorlist" >$config +fi +packages=$(mktemp) +ls $cache >$packages +pacman --noconfirm -Syyuu && pacman --noconfirm -S git cmake mingw-w64-toolchain wine # assume base-devel +if [ "$1" = "-C" ]; then + ls $cache >>$packages + sort $packages | uniq -D | xargs rm -f +fi +rm -f $packages |