Skip to content

Added L2 cache support - https:/Pohrom/linux-surface-rt/c… #139

Added L2 cache support - https:/Pohrom/linux-surface-rt/c…

Added L2 cache support - https:/Pohrom/linux-surface-rt/c… #139

Workflow file for this run

# SPDX-License-Identifier: GPL-2.0-or-later
name: Build
env:
KERNEL_NAME: grate
KBUILD_DEFCONFIG: tegra_defconfig
CROSS_COMPILE: arm-linux-gnueabihf- # build for armv7
ARCH_SPEC_PKGS: crossbuild-essential-armhf
ARCH: arm # build for armv7
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: /home/runner/.cache/sccache
BUILD_PATH: /home/runner/.cache/tuxmake/builds/1
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
config: ['tegra_defconfig', 'grate_defconfig']
option: ['default'] # , 'thumb2'] # FIXME after action-automatic-releases gets fixed https:/marvinpinto/actions/issues/19
cc: [gcc, clang]
include:
- config: 'tegra_defconfig'
additional_params: ''
- config: 'grate_defconfig'
additional_params: '-K pmos.config'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install sccache
env:
LINK: https:/mozilla/sccache/releases/download
SCCACHE_VERSION: 0.2.15
run: |
export SCCACHE_FILE=sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/v$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Enable cache
uses: actions/cache@v2
continue-on-error: false
with:
path: ${{ env.SCCACHE_DIR }}
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: Build
run: |
if [ "${{ matrix.option }}" = "thumb2" ]; then
export TUXMAKE_KCONFIG_OPTS="-K CONFIG_THUMB2_KERNEL=y"
fi
touch .scmversion
tuxmake --directory ./ -w sccache --target-arch=arm -k ${{ matrix.config }} ${{ matrix.additional_params }} ${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 " ,"`
RET=0
if [ "$ERRS" -gt 0 ]; then
echo "::error::Compilation failed due to $ERRS errors, please fix them."
RET=1
fi
if [ "$WARNS" -gt 0 ]; then
echo "::error::$WARNS warnings found, please fix them."
RET=1
fi
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.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.config }}-${{ matrix.option }}-${{ matrix.cc }}"
prerelease: true
title: "Binary of ${{ matrix.config }} + ${{ matrix.option }} build with ${{ matrix.cc }}"
files: |
*.tar
*.xz
dtbs:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 }} libyaml-dev 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 git+https:/devicetree-org/dt-schema.git@master
- name: Build
run: |
make grate_defconfig # verify against grate instead KBUILD_DEFCONFIG, since tegra builds lot of non-required stuff
status=0
make -j3 dtbs || echo "dtbs " > status
make -j3 dtbs_check 2> warn.log || echo "dtbs_check" > status
- name: Evaluate warnings
run: |
warn=$(wc -l warn.log| cut -f1 -d" ")
if [ "$warn" -gt "0" ]; then
cat warn.log
echo "::warning :: $warn warnings"
fi
- name: Evaluate critical warnings
run: |
grep -v "failed to match any schema with compatible:" warn.log > warn_crit.log || exit 0
warn_crit=$(wc -l warn_crit.log| cut -f1 -d" ")
if [ "$warn_crit" -gt "0" ]; then
cat warn_crit.log
echo "::warning :: $warn_crit critical warnings"
fi
exit 1
- name: Evaluate success
run: |
if [ -f status ]; then
echo ":: failed on: "
cat status
exit 1
fi
dt_bindings_check:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 }} libyaml-dev 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 git+https:/devicetree-org/dt-schema.git@master
- name: Build
run: |
make -j8 dt_binding_check 2> >(tee warn.log >&2) > /dev/null
- name: Evaluate warnings
run: |
warn=$(wc -l warn.log| cut -f1 -d" ")
if [ "$warn" -gt "0" ]; then
cat warn.log
echo "::warning :: $warn warnings"
fi