From 6e76a73bb0a6ff373f13533e994e73c6d99c6780 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Fri, 6 Jan 2023 15:48:41 +0100 Subject: [PATCH] meta: add gitlab ci --- .gitlab-ci.yml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d4eb71a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,81 @@ +workflow: + rules: + - if: $CI_COMMIT_BRANCH == "master" + +stages: + - fetch + - build + - upload + +default: + image: alpine:edge + cache: + key: repodest + paths: [repodest/] + before_script: + - mkdir $HOME/.ssh + - chmod 600 $PRIVATE_KEY + - echo "repo.ptrc.gay ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTcxqAgqWGqVDH5lscsXVp6eWxFblarg+YA1EPxjUvm" > $HOME/.ssh/known_hosts + - echo "IdentityFile $PRIVATE_KEY" > $HOME/.ssh/config + - mkdir -p /home/buildozer/.abuild + - cp $PACKAGER_PRIVKEY /home/buildozer/.abuild/privkey + - echo "PACKAGER_PRIVKEY=/home/buildozer/.abuild/privkey" > /home/buildozer/.abuild/abuild.conf + - cp ptrcports-keys/*.pub /etc/apk/keys/ + - chown -R 1000:1000 /home/buildozer + - mkdir -p repodest + +fetch: + stage: fetch + script: + - apk add openssh-client rsync + - rsync --archive --update --hard-links --delete --delete-after --delay-updates buildozer@repo.ptrc.gay:repodest/ repodest/ + +build-x86_64: &build + stage: build + resource_group: build + script: + - apk add lua-aports alpine-sdk s6 + - adduser -D buildozer + - adduser buildozer abuild + - chown -R buildozer:buildozer * + - s6-setuidgid buildozer + env HOME=/home/buildozer + buildrepo + --aports $PWD/.. + --destdir $PWD/repodest + --purge + ptrcports + +build-aarch64: + <<: *build + image: arm64v8/alpine:edge + +# build-armhf: +# <<: *build +# image: arm32v6/alpine:edge + +# build-armv7: +# <<: *build +# image: arm32v7/alpine:edge + +# build-ppc64le: +# <<: *build +# image: ppc64le/alpine:edge + +# build-riscv64: +# <<: *build +# image: riscv64/alpine:edge + +# build-s390x: +# <<: *build +# image: s390x/alpine:edge + +# build-x86: +# <<: *build +# image: i386/alpine:edge + +upload: + stage: upload + script: + - apk add openssh-client rsync + - rsync --archive --update --hard-links --delete --delete-after --delay-updates repodest/ buildozer@repo.ptrc.gay:repodest/