Compare commits
3 commits
9a81361936
...
bb3a67fa8c
Author | SHA1 | Date | |
---|---|---|---|
bb3a67fa8c | |||
769d183413 | |||
dee83b7b1b |
7 changed files with 48 additions and 19 deletions
|
@ -13,4 +13,4 @@ shellcheck -s ash \
|
||||||
-e SC2030 \
|
-e SC2030 \
|
||||||
-e SC2031 \
|
-e SC2031 \
|
||||||
-e SC1090 \
|
-e SC1090 \
|
||||||
-xa $CI_PROJECT_DIR/.gitlab/bin/APKBUILD_SHIM
|
-xa $GITHUB_WORKSPACE/.gitlab/bin/APKBUILD_SHIM
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC3043
|
# shellcheck disable=SC3043
|
||||||
|
|
||||||
. $CI_PROJECT_DIR/.gitlab/bin/functions.sh
|
. $GITHUB_WORKSPACE/.gitlab/bin/functions.sh
|
||||||
|
|
||||||
# shellcheck disable=SC3040
|
# shellcheck disable=SC3040
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
readonly APORTSDIR=$CI_PROJECT_DIR
|
readonly APORTSDIR=$GITHUB_WORKSPACE
|
||||||
readonly REPOS="cross backports user testing community"
|
readonly REPOS="cross backports user testing community"
|
||||||
readonly ALPINE_REPOS="main community"
|
readonly ALPINE_REPOS="main community"
|
||||||
readonly ARCH=$(apk --print-arch)
|
readonly ARCH=$(apk --print-arch)
|
||||||
# gitlab variables
|
# gitlab variables
|
||||||
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
readonly BASEBRANCH=$GITHUB_BASE_REF
|
||||||
|
|
||||||
: "${REPODEST:=$HOME/packages}"
|
: "${REPODEST:=$HOME/packages}"
|
||||||
: "${MIRROR:=https://lab.ilot.io/ayakael/repo-apk/-/raw}"
|
: "${MIRROR:=https://lab.ilot.io/ayakael/repo-apk/-/raw}"
|
||||||
: "${ALPINE_MIRROR:=http://dl-cdn.alpinelinux.org/alpine}"
|
: "${ALPINE_MIRROR:=http://dl-cdn.alpinelinux.org/alpine}"
|
||||||
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
|
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
|
||||||
: "${CI_DEBUG_BUILD:=}"
|
: "${RUNNER_DEBUG:=}"
|
||||||
|
|
||||||
: "${CI_ALPINE_BUILD_OFFSET:=0}"
|
: "${CI_ALPINE_BUILD_OFFSET:=0}"
|
||||||
: "${CI_ALPINE_BUILD_LIMIT:=9999}"
|
: "${CI_ALPINE_BUILD_LIMIT:=9999}"
|
||||||
|
@ -42,7 +42,7 @@ verbose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
debugging() {
|
debugging() {
|
||||||
[ -n "$CI_DEBUG_BUILD" ]
|
[ -n "$RUNNER_DEBUG" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
|
@ -152,7 +152,7 @@ setup_system() {
|
||||||
sudo cp $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub /etc/apk/keys/$ABUILD_KEY_NAME.rsa.pub
|
sudo cp $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub /etc/apk/keys/$ABUILD_KEY_NAME.rsa.pub
|
||||||
|
|
||||||
# patch abuild for crosscompiling
|
# patch abuild for crosscompiling
|
||||||
sudo patch -p1 -d / -i $CI_PROJECT_DIR/.gitlab/patches/abuild-cross.patch
|
sudo patch -p1 -d / -i $GITHUB_WORKSPACE/.gitlab/patches/abuild-cross.patch
|
||||||
|
|
||||||
sudo sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
|
sudo sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
|
||||||
( . /etc/abuild.conf && echo "Building with $JOBS jobs" )
|
( . /etc/abuild.conf && echo "Building with $JOBS jobs" )
|
||||||
|
@ -208,7 +208,7 @@ sudo chown -R $USER: .
|
||||||
fetch_flags="-qn"
|
fetch_flags="-qn"
|
||||||
debugging && fetch_flags="-v"
|
debugging && fetch_flags="-v"
|
||||||
|
|
||||||
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
|
git fetch $fetch_flags "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
|
||||||
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
||||||
|
|
||||||
if debugging; then
|
if debugging; then
|
||||||
|
|
|
@ -14,7 +14,7 @@ basebranch=$1
|
||||||
|
|
||||||
if ! git rev-parse --verify --quiet $basebranch >/dev/null; then
|
if ! git rev-parse --verify --quiet $basebranch >/dev/null; then
|
||||||
# The base branch does not eixst, probably due to a shallow clone
|
# The base branch does not eixst, probably due to a shallow clone
|
||||||
git fetch -v $CI_MERGE_REQUEST_PROJECT_URL.git +refs/heads/$basebranch:refs/heads/$basebranch
|
git fetch -v $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git +refs/heads/$basebranch:refs/heads/$basebranch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git --no-pager diff --diff-filter=ACMR --name-only $basebranch...HEAD -- "*/APKBUILD" | xargs -r -n1 dirname
|
git --no-pager diff --diff-filter=ACMR --name-only $basebranch...HEAD -- "*/APKBUILD" | xargs -r -n1 dirname
|
||||||
|
|
|
@ -4,7 +4,7 @@ BLUE="\e[34m"
|
||||||
MAGENTA="\e[35m"
|
MAGENTA="\e[35m"
|
||||||
RESET="\e[0m"
|
RESET="\e[0m"
|
||||||
|
|
||||||
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
readonly BASEBRANCH=$GITHUB_BASE_REF
|
||||||
|
|
||||||
verbose() {
|
verbose() {
|
||||||
echo "> " "$@"
|
echo "> " "$@"
|
||||||
|
@ -13,7 +13,7 @@ verbose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
debugging() {
|
debugging() {
|
||||||
[ -n "$CI_DEBUG_BUILD" ]
|
[ -n "$RUNNER_DEBUG" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
|
@ -28,7 +28,7 @@ sudo chown -R gitlab-runner: .
|
||||||
fetch_flags="-qn"
|
fetch_flags="-qn"
|
||||||
debugging && fetch_flags="-v"
|
debugging && fetch_flags="-v"
|
||||||
|
|
||||||
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
|
git fetch $fetch_flags "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
|
||||||
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
||||||
|
|
||||||
if debugging; then
|
if debugging; then
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
# shellcheck disable=SC3043
|
# shellcheck disable=SC3043
|
||||||
|
|
||||||
. $CI_PROJECT_DIR/.gitlab/bin/functions.sh
|
. $GITHUB_WORKSPACE/.gitlab/bin/functions.sh
|
||||||
|
|
||||||
# shellcheck disable=SC3040
|
# shellcheck disable=SC3040
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
readonly APORTSDIR=$CI_PROJECT_DIR
|
readonly APORTSDIR=$GITHUB_WORKSPACE
|
||||||
readonly REPOS="backports user"
|
readonly REPOS="backports user"
|
||||||
readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
readonly BASEBRANCH=$GITHUB_BASE_REF
|
||||||
|
|
||||||
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ for i in $(find packages -type f -name "*.apk"); do
|
||||||
done
|
done
|
||||||
|
|
||||||
fetch_flags="-qn"
|
fetch_flags="-qn"
|
||||||
git fetch $fetch_flags "$CI_MERGE_REQUEST_PROJECT_URL" \
|
git fetch $fetch_flags "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
|
||||||
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
"+refs/heads/$BASEBRANCH:refs/heads/$BASEBRANCH"
|
||||||
|
|
||||||
for repo in $(changed_repos); do
|
for repo in $(changed_repos); do
|
||||||
|
@ -49,10 +49,9 @@ for repo in $(changed_repos); do
|
||||||
for i in $(find $HOME/repo-apk/$repo -maxdepth 1 -mindepth 1 -printf '%P '); do
|
for i in $(find $HOME/repo-apk/$repo -maxdepth 1 -mindepth 1 -printf '%P '); do
|
||||||
CHOST=$i abuild index
|
CHOST=$i abuild index
|
||||||
done
|
done
|
||||||
cd "$CI_PROJECT_DIR"
|
cd "$GITHUB_WORKSPACE"
|
||||||
rm -R $repo/DUMMY
|
rm -R $repo/DUMMY
|
||||||
done
|
done
|
||||||
|
|
||||||
git -C $HOME/repo-apk add .
|
git -C $HOME/repo-apk add .
|
||||||
git -C $HOME/repo-apk commit -m "Update from $CI_MERGE_REQUEST_IID - $CI_MERGE_REQUEST_TITLE"
|
git -C $HOME/repo-apk commit -m "Update from $CI_MERGE_REQUEST_IID - $CI_MERGE_REQUEST_TITLE"
|
||||||
git -C $HOME/repo-apk annex sync --content
|
git -C $HOME/repo-apk annex sync --content
|
||||||
|
|
30
action.yml
Normal file
30
action.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
run-name: lint
|
||||||
|
on: pull_request
|
||||||
|
runs-on: ayakael-podman-x86_64
|
||||||
|
image: alpine-latest
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apk add shellcheck atools sudo abuild
|
||||||
|
export PATH="$PATH:$GITHUB_WORKSPACE/.gitlab/bin"
|
||||||
|
lint
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
build-x86_64:
|
||||||
|
run-name: Build on x86_64
|
||||||
|
runs-on: ayakael-podman-x86_64
|
||||||
|
image: alpine-latest
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apk add alpine-sdk lua-aports sudo
|
||||||
|
sudo addgroup $USER abuild
|
||||||
|
export PATH="$PATH:$GITHUB_WORKSPACE/.gitlab/bin"
|
||||||
|
sudo -Eu $USER build.sh
|
||||||
|
- name: Upload math result for job 1
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: package
|
||||||
|
path:
|
||||||
|
- packages/
|
||||||
|
- keys /
|
|
@ -2,7 +2,7 @@
|
||||||
# Maintainer:
|
# Maintainer:
|
||||||
pkgname=py3-validators
|
pkgname=py3-validators
|
||||||
pkgver=0.20.0
|
pkgver=0.20.0
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
pkgdesc="Python3 Data Validation for Humans"
|
pkgdesc="Python3 Data Validation for Humans"
|
||||||
url="https://github.com/python-validators/validators"
|
url="https://github.com/python-validators/validators"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
|
Loading…
Reference in a new issue