mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Add missing packages creation to build train (#3632)
* Add missing packages creation to build train * Improved HASH calculation Now it also checks series which were before invisible. * Revert * Bugfix * Save git hash of patch files and kernel configuration file (#3636) * Save git hash of patch files and kernel configuration file * Storing values to the file. Now we have config hash separate. todo: adjust on the checking side Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com> Co-authored-by: The-going <48602507+The-going@users.noreply.github.com>
This commit is contained in:
37
.github/workflows/build-train.yml
vendored
37
.github/workflows/build-train.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: small
|
||||
steps:
|
||||
- uses: n1hility/cancel-previous-runs@v2
|
||||
with:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
##########################################################################################
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
# Merge master into nighly image from which we build packages #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
|
||||
Merge:
|
||||
name: Merging
|
||||
needs: Cancel
|
||||
@@ -79,6 +79,25 @@ jobs:
|
||||
KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
||||
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Build changed firmware, zsh, armbian-config #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
Firmware:
|
||||
needs: Check
|
||||
if: ${{ success() && github.repository_owner == 'Armbian' }}
|
||||
uses: armbian/scripts/.github/workflows/build-firmware.yml@master
|
||||
|
||||
with:
|
||||
reference: nightly
|
||||
runner: small
|
||||
|
||||
secrets:
|
||||
KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }}
|
||||
KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }}
|
||||
|
||||
##########################################################################################
|
||||
# #
|
||||
# Build changed desktop packages #
|
||||
@@ -183,7 +202,7 @@ jobs:
|
||||
##########################################################################################
|
||||
|
||||
Deploy:
|
||||
needs: [Kernel,Desktop,legacy,current,edge]
|
||||
needs: [Kernel,Desktop,Firmware,legacy,current,edge]
|
||||
if: ${{ success() && github.repository_owner == 'Armbian' }}
|
||||
uses: armbian/scripts/.github/workflows/deploy.yml@master
|
||||
|
||||
@@ -209,7 +228,7 @@ jobs:
|
||||
with:
|
||||
KEY_ID: 'repository'
|
||||
|
||||
secrets:
|
||||
secrets:
|
||||
KEY_REPOSITORY: ${{ secrets.KEY_REPOSITORY }}
|
||||
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
|
||||
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
|
||||
@@ -224,7 +243,7 @@ jobs:
|
||||
with:
|
||||
KEY_ID: 'repository-beta'
|
||||
|
||||
secrets:
|
||||
secrets:
|
||||
KEY_REPOSITORY: ${{ secrets.KEY_REPOSITORY_BETA }}
|
||||
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
|
||||
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
|
||||
@@ -256,7 +275,7 @@ jobs:
|
||||
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
||||
|
||||
with:
|
||||
|
||||
|
||||
variant: 'cli:beta'
|
||||
runner: "small"
|
||||
sourcerepo: 'nightly'
|
||||
@@ -316,7 +335,7 @@ jobs:
|
||||
uses: armbian/scripts/.github/workflows/build-with-docker.yml@master
|
||||
|
||||
with:
|
||||
|
||||
|
||||
variant: 'cli:beta'
|
||||
runner: "small"
|
||||
sourcerepo: 'nightly'
|
||||
@@ -350,7 +369,7 @@ jobs:
|
||||
runner: "big"
|
||||
sourcerepo: 'nightly'
|
||||
part: 1
|
||||
of: 1
|
||||
of: 1
|
||||
include: ''
|
||||
exclude: 'grep -v uefi-x86 | '
|
||||
uploading: false
|
||||
@@ -393,7 +412,7 @@ jobs:
|
||||
# Update download links and create torrents #
|
||||
# #
|
||||
##########################################################################################
|
||||
|
||||
|
||||
Torrents:
|
||||
name: Torrents
|
||||
needs: [x86-cli-images,x86-desktop-images,cli-images,desktop-images]
|
||||
|
||||
@@ -546,7 +546,7 @@ CUSTOM_KERNEL_CONFIG
|
||||
if [[ -z ${KERNEL_VERSION_LEVEL} ]]; then
|
||||
git -C ${kerneldir} cat-file -t ${OLDHASHTARGET} >/dev/null 2>&1
|
||||
[[ $? -ne 0 ]] && OLDHASHTARGET=$(git -C ${kerneldir} show HEAD~199 --pretty=format:"%H" --no-patch)
|
||||
else
|
||||
else
|
||||
git -C ${kerneldir} cat-file -t ${OLDHASHTARGET} >/dev/null 2>&1
|
||||
[[ $? -ne 0 ]] && OLDHASHTARGET=$(git -C ${kerneldir} rev-list --max-parents=0 HEAD)
|
||||
fi
|
||||
@@ -566,10 +566,16 @@ CUSTOM_KERNEL_CONFIG
|
||||
# create change log
|
||||
git --no-pager -C ${kerneldir} log --abbrev-commit --oneline --no-patch --no-merges --date-order --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%C(black bold)%ad%Creset%C(auto) | %s | <%an> | <a href='$URL'%H>%H</a>' ${OLDHASHTARGET}..${hash} > "${HASHTARGET}.gitlog"
|
||||
|
||||
# hash origin
|
||||
echo "${hash}" > "${HASHTARGET}.githash"
|
||||
hash_watch_1=$(LC_COLLATE=C find -L "${SRC}/patch/kernel/${KERNELPATCHDIR}"/ -name '*.patch' -mindepth 1 -maxdepth 1 -printf '%s %P\n' 2> /dev/null | LC_COLLATE=C sort -n)
|
||||
hash_watch_2=$(cat "${SRC}/config/kernel/${LINUXCONFIG}.config")
|
||||
echo "${hash_watch_1}${hash_watch_2}" | improved_git hash-object --stdin >> "${HASHTARGET}.githash"
|
||||
|
||||
# hash_patches=
|
||||
git -C $SRC log --format="%H" -1 -- \
|
||||
$(realpath --relative-base="$SRC" "${SRC}/patch/kernel/${KERNELPATCHDIR}") >> "${HASHTARGET}.githash"
|
||||
|
||||
# hash_kernel_config=
|
||||
git -C $SRC log --format="%H" -1 -- \
|
||||
$(realpath --relative-base="$SRC" "${SRC}/config/kernel/${LINUXCONFIG}.config") >> "${HASHTARGET}.githash"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user