Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI related improvements #81

Merged
merged 6 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-cirros.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
ARCHES: ${{ matrix.arch }}
BOOTTEST: "true"
QUIET: 1
CI_BUILD: "true"
CI_BUILD_OUT: "build-ci/"

steps:
- name: Pull cirros source artifacts
Expand Down Expand Up @@ -51,4 +53,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: cirros-${{ matrix.arch }}
path: release/
path: build-ci/release/
33 changes: 26 additions & 7 deletions bin/build-release
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,19 @@ MY_D=${ME%/*}
PATH=${MY_D}:$PATH
QUIET=${QUIET:-}
BOOTTEST=${BOOTTEST:-false}
CI_BUILD=${CI_BUILD:-false}
CI_BUILD_OUT=${CI_BUILD_OUT:-}

case "$BOOTTEST" in
true|false) :;;
*) echo "Unknown value for BOOTTEST: ${BOOTTEST}"; exit 1;;
esac

case "$CI_BUILD" in
true|false) :;;
*) echo "Unknown value for CI_BUILD: ${CI_BUILD}"; exit 1;;
esac

MAKE_QUIET=
if [ ! -z $QUIET ]; then
MAKE_QUIET="-s"
Expand All @@ -53,7 +60,11 @@ fi
set -e
set -o pipefail

OUT="$PWD/../build-$VER"
if [ "$CI_BUILD" = "true" ]; then
OUT="$PWD/$CI_BUILD_OUT"
else
OUT="$PWD/../build-$VER"
fi
LOGFILE="$OUT/date.txt"
export TMPDIR="$OUT/tmp"
mkdir -p "$OUT" "$TMPDIR"
Expand Down Expand Up @@ -143,9 +154,13 @@ tstart=${_RET}

# Stage 1: DOWNLOAD
logevent "start download" -
rm -f download
mkdir -p ../download
ln -snf ../download download
if [ "$CI_BUILD" = "true" ]; then
mkdir -p download
else
rm -f download
mkdir -p ../download
ln -snf ../download download
fi
brtgz="buildroot-${BR_VER}.tar.gz"
dl "http://buildroot.uclibc.org/downloads/$brtgz" "download/$brtgz"
logevent "end download"
Expand All @@ -167,7 +182,7 @@ echo "$VER" > "src/etc/cirros/version"
logevent "end unpack"

logevent "start br-source" -
make $MAKE_QUIET ARCH=${ARCHES%% *} br-source
make $MAKE_QUIET ARCH=${ARCHES%% *} "OUT_D=$OUT/build/$arch" br-source
logevent "end br-source"

logevent "start kernel and grub downloads" -
Expand Down Expand Up @@ -199,8 +214,12 @@ logevent "end kernel and grub downloads" "$kstart"
# STAGE 2: BUILD
jobs_flag=""
parallel=true
mkdir -p ../ccache
ln -snf ../ccache ccache
if [ "$CI_BUILD" = "true" ]; then
mkdir -p ccache
else
mkdir -p ../ccache
ln -snf ../ccache ccache
fi
case "${CIRROS_PARALLEL:-none}" in
none) parallel=false;;
0|true) :;;
Expand Down