Check for empty build branch (#3)

This commit is contained in:
Vyacheslav
2023-03-20 16:16:05 +03:00
committed by GitHub
parent 1c747925a8
commit 2dce511a78

View File

@@ -40,6 +40,9 @@ jobs:
# Make a list of valid pairs from our config
echo 'JSON_CONTENT<<EOF' >> $GITHUB_OUTPUT
for BRANCH in legacy current midstream edge; do
if [ -z "${FILES}" ]; then
continue
fi
FILES=$(cat os/targets/*.conf | grep $BRANCH | grep -v "^$" | grep -v "^#" | sed -n $LINE'p' | cut -d " " -f1 | uniq)
while IFS= read -r line; do
BOARDFAMILY=$(cat build/config/boards/$line.* | grep BOARDFAMILY | cut -d'"' -f2)
@@ -53,7 +56,7 @@ jobs:
RUNNER=ubuntu-latest
[[ "${ARCH}" == arm64 ]] && RUNNER=aarch64
[[ "${BRANCH}" == current ]] && RUNNER=alfa
[[ "${BRANCH}" == edge ]] && RUNNER=beta
[[ "${BRANCH}" == edge ]] && RUNNER=beta
echo "${LINUXFAMILY}:${BOARDFAMILY}:${BRANCH}:${line}:${RUNNER}"
done <<< "$FILES"
done | sort | uniq | sort -u -t: -k1,3 | cut -d":" -f3,4,5 | sort | uniq | sed "s/:/ /g" | awk '{ printf "%s%s%s\n", "{\"board\":\""$2"\",", "\"branch\":\""$1"\",", "\"runner\":\""$3"\"}" }' | jq -s >> $GITHUB_OUTPUT
@@ -65,9 +68,9 @@ jobs:
fail-fast: false # let other jobs try to complete if one fails
matrix:
include: ${{ fromJSON(needs.prepare.outputs.matrix) }}
runs-on: "${{ matrix.runner }}"
name: "${{ matrix.board }} ${{ matrix.branch }} ${{ matrix.runner }}"
env:
BRANCH: "${{ matrix.branch }}"
@@ -100,7 +103,7 @@ jobs:
bash ./compile.sh kernel "BRANCH=${{env.BRANCH}}" "BOARD=${{env.BOARD}}" SHARE_LOG=yes CLEAN_LEVEL="alldebs" FORCE_ARTIFACTS_DOWNLOAD="yes"
ls -l output/debs/
du output
- name: "Generate key id" # We need this in case we run multiple runners on one machine
run: echo "RANDOM=ID_$((RANDOM%1000000))" >> $GITHUB_ENV
shell: bash
@@ -120,4 +123,3 @@ jobs:
sudo apt-get -y -qq install lftp
fi
lftp -u upload, -e "set sftp:connect-program ssh -ax -i $HOME/.ssh/${{ env.RANDOM }}; set net:timeout 4;set net:max-retries 6;mirror -R --include-glob *.deb --no-empty-dirs --parallel=8 --no-perms output/debs/. debs-beta/ ;bye" sftp://users.armbian.com