Skip to content

Commit

Permalink
FIXUP: CI: add pmOS-grate kernel configs
Browse files Browse the repository at this point in the history
Signed-off-by: David Heidelberg <[email protected]>
  • Loading branch information
okias committed Aug 31, 2021
1 parent 5c8e10a commit 5efbdf0
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ jobs:
strategy:
fail-fast: false
matrix:
config: ['tegra_defconfig', 'postmarketos-grate']
option: ['default', 'thumb2']
cc: [gcc, clang]
include:
- config: 'tegra_defconfig'
config_url: ['']
- config: 'postmarketos-grate'
config_url: 'https://gitlab.com/postmarketOS/pmaports/-/raw/master/main/linux-postmarketos-grate/config-postmarketos-grate.armv7'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -41,41 +48,49 @@ jobs:
continue-on-error: false
with:
path: ${{ env.SCCACHE_DIR }}
key: ${{ env.KERNEL_NAME }}-${{ matrix.cc }}
key: ${{ env.KERNEL_NAME }}-${{ matrix.config }}-${{ matrix.option }}-${{ matrix.cc }}
- name: Start sccache server
run: sccache --start-server
- name: Install dependencies
run: |
sudo apt-get -qq update > /dev/null
sudo apt-get -qq install -y --no-install-recommends -o=Dpkg::Use-Pty=0 ${{ env.ARCH_SPEC_PKGS }} git build-essential binutils-multiarch device-tree-compiler fakeroot libncurses5-dev libssl-dev bison flex libelf-dev dwarves python3-pip socat > /dev/null
pip3 install -U --user tuxmake
- name: Fetch config
if: ${{ matrix.config != env.KBUILD_DEFCONFIG }}
run: >
curl -L -o ${{ matrix.config }} ${{ matrix.config_url }}
- name: Build
run: |
tuxmake --directory ./ -w sccache --target-arch=arm -k $KBUILD_DEFCONFIG $TUXMAKE_EXTRA_OPTS | sed "s|^/home/runner/work/linux/linux/|::error::|"
if [ "${{ matrix.option }}" = "thumb2" ]; then
export TUXMAKE_KCONFIG_OPTS="-K CONFIG_THUMB2_KERNEL=y"
fi
tuxmake --directory ./ -w sccache --target-arch=arm -k ${{ matrix.config }} ${TUXMAKE_KCONFIG_OPTS} | sed "s|^/home/runner/work/linux/linux/|::error::|"
export ERRS=`grep "errors" "${BUILD_PATH}"/metadata.json | cut -d":" -f2 | tr -d " ,"`
export WARNS=`grep "warnings" "${BUILD_PATH}"/metadata.json | cut -d":" -f2 | tr -d " ,"`
if [ $ERRS != "0" ]; then
RET=0
if [ "$ERRS" -gt 0 ]; then
echo "::error::Compilation failed due to $ERRS errors, please fix them."
RET=1
fi
if [ $WARNS != "0" ]; then
if [ "$WARNS" -gt 0 ]; then
echo "::error::$WARNS warnings found, please fix them."
RET=1
fi
if [ $RET = 1 ]; then
if [ $RET -eq 1 ]; then
exit 1
fi
mv /home/runner/.cache/tuxmake/builds/1/vmlinux.xz ./debug-vmlinux.xz
tar -cf linux-grate-${{ matrix.cc }}.tar -C /home/runner/.cache/tuxmake/builds/1 .
tar -cf linux-grate-${{ matrix.config }}-${{ matrix.cc }}.tar -C /home/runner/.cache/tuxmake/builds/1 .
- name: Stop sccache server
run: sccache --stop-server || true
- uses: "marvinpinto/action-automatic-releases@latest"
if: ${{!startsWith(github.ref, 'refs/pull')}}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.KERNEL_NAME }}-${{ matrix.cc }}"
automatic_release_tag: "${{ env.KERNEL_NAME }}-${{ matrix.config }}-${{ matrix.option }}-${{ matrix.cc }}"
prerelease: true
title: "Build of Grate kernel, compiled with ${{ matrix.cc }}"
title: "Build of Grate kernel, config ${{ matrix.config }} + ${{ matrix.option }} compiled with ${{ matrix.cc }}"
files: |
*.tar
*.xz
Expand Down

0 comments on commit 5efbdf0

Please sign in to comment.