Skip to content

Commit

Permalink
Update workflow to add build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Heisath committed Oct 15, 2021
1 parent 6b4a5a4 commit 3ba756e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/compile-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ jobs:
- name: run build script with ghrunner config
run: ./build.sh --ghrunner


# Upload build results
- uses: actions/upload-artifact@v2
with:
name: build-results
path: output/*.tar.gz
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ read_arguments() {
ALLOW_ROOTFS_CHANGES='on'
shift;
;;
--initramfs)
--initramfs)
BUILD_INITRAMFS='on'
shift;
;;
Expand Down Expand Up @@ -221,6 +221,10 @@ build_kernel()
kernel_config="config/linux-$kernel_branch.config";
fi

if [[ $GHRUNNER == 'on' ]]; then
rm -rf "${output_dir}"
fi

# generate output directory
mkdir -p "${output_dir}"
mkdir -p "${boot_dir}"
Expand All @@ -235,7 +239,6 @@ build_kernel()
else
if [ ${CLEAN_KERNEL_SRC} = 'on' ]; then
echo "### Kernel dir does exist. Fetching and cleaning"
echo "### If you want to skip this step provide --noclean"

cd ${kernel_dir}

Expand All @@ -246,7 +249,7 @@ build_kernel()

cd ${current_dir}
else
echo "### Kernel dir does exist. --noclean provided"
echo "### Kernel dir does exist. --clean not provided"
echo "### Continuing with dirty kernel src"

fi
Expand All @@ -271,7 +274,6 @@ build_kernel()
cp dts/*.dts "${kernel_dir}"/arch/arm/boot/dts/



# cleanup old modules for this kernel, this helps when rebuilding kernel with less modules
if [ -d "${output_dir}"/lib/modules/"${kernel_version}" ]; then
rm -r "${output_dir}"/lib/modules/"$kernel_version"
Expand Down

0 comments on commit 3ba756e

Please sign in to comment.