Skip to content

Commit

Permalink
opendingux: GitHub CI: Use utils/brmake
Browse files Browse the repository at this point in the history
utils/brmake produces compact output with timestamps that look like this:

```
Starting build...
2022-10-29T15:55:14 >>>   Finalizing host directory
2022-10-29T15:55:17 >>>   Finalizing target directory
2022-10-29T15:55:19 >>>   Sanitizing RPATH in target tree
2022-10-29T15:55:19 >>>   Sanity check in overlay board/opendingux/installer/overlay
2022-10-29T15:55:19 >>>   Copying overlay board/opendingux/installer/overlay
2022-10-29T15:55:19 >>>   Executing post-build script board/opendingux/installer/cleanup-rootfs.sh
2022-10-29T15:55:19 >>>   Generating root filesystems common tables
2022-10-29T15:55:19 >>>   Generating filesystem image rootfs.cpio
2022-10-29T15:55:19 >>>   Rebuilding kernel with initramfs
Done in 15s
```

The full log is available as an artifact, and now also includes timestamps.

Signed-off-by: Gleb Mazovetskiy <[email protected]>
  • Loading branch information
glebm authored and pcercuei committed Oct 30, 2022
1 parent b81f717 commit d6d6aa6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
run: ./rebuild.sh
env:
CONFIG: ${{ matrix.target }}
TOP_MAKE_COMMAND: utils/brmake
BR2_JLEVEL: 0
FORCE_UNSAFE_CONFIGURE: 1
- uses: actions/upload-artifact@v3
Expand All @@ -60,6 +61,12 @@ jobs:
name: update-${{ matrix.target }}
path: |
output/${{ matrix.target }}/images/*.opk
- uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ matrix.target }}-log
path: |
br.log
- name: Build installer
if: ${{ matrix.target == 'rs90' }}
run: |
Expand All @@ -71,6 +78,7 @@ jobs:
./rebuild.sh
env:
CONFIG: installer
TOP_MAKE_COMMAND: utils/brmake
BR2_JLEVEL: 0
FORCE_UNSAFE_CONFIGURE: 1
- uses: actions/upload-artifact@v3
Expand All @@ -85,6 +93,12 @@ jobs:
name: vmlinuz
path: |
output/installer/images/vmlinuz.bin
- uses: actions/upload-artifact@v3
if: ${{ matrix.target == 'rs90' && always() }}
with:
name: ${{ matrix.target }}-installer-log
path: |
br.log
build-win:
name: Build odbootd (Windows)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
*.rej
*~
*.pyc
br.log
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ if [ -z "$CONFIG" ] ; then
exit 1
fi

# Set TOP_MAKE_COMMAND to utils/brmake for compact output
TOP_MAKE_COMMAND="${TOP_MAKE_COMMAND:-make}"

if [ "$TOP_MAKE_COMMAND" = utils/brmake ]; then
rm -f br.log
fi

# Clear the build location.
if [ "$1" = clean ]; then
echo "Clearing build location..."
Expand All @@ -32,7 +39,7 @@ fi
echo "Starting build..."
PARALLELISM=$(getconf _NPROCESSORS_ONLN)
for target in $TARGETS; do
nice make "$target" BR2_SDK_PREFIX=${CONFIG}-toolchain O=output/${CONFIG} -j $PARALLELISM
nice ${TOP_MAKE_COMMAND} "$target" BR2_SDK_PREFIX=${CONFIG}-toolchain O=output/${CONFIG} -j $PARALLELISM
done

if [ "${TARGETS}" = sdk ] ; then
Expand Down

0 comments on commit d6d6aa6

Please sign in to comment.