wip! regulator: convert QCOM SMD-RPM regulator document to YAML schema #259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: GPL-2.0-or-later | |
name: Build | |
env: | |
KERNEL_NAME: qcom-apq8064 | |
KBUILD_DEFCONFIG: qcom_apq8064_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: ['qcom_apq8064_defconfig'] | |
option: ['default'] # , 'thumb2'] # FIXME after action-automatic-releases gets fixed https://github.com/marvinpinto/actions/issues/19 | |
cc: [gcc, clang] | |
include: | |
- config: 'qcom_apq8064_defconfig' | |
additional_params: '' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set output | |
id: vars | |
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} | |
- name: Install sccache | |
env: | |
LINK: https://github.com/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-qcom-apq8064-${{ 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: "${{ steps.vars.outputs.short_ref }}-${{ matrix.option }}-${{ matrix.cc }}" | |
prerelease: true | |
title: "Binary of ${{ steps.vars.outputs.short_ref }} with ${{ matrix.config }} + ${{ matrix.option }} build with ${{ matrix.cc }}" | |
files: | | |
*.tar | |
*.xz | |
dtbs: | |
strategy: | |
fail-fast: false | |
matrix: | |
devices: | |
- qcom-apq8064-asus-nexus7-flo | |
- qcom-apq8064-lg-nexus4-mako | |
- qcom-apq8064-samsung-jfvelte | |
- qcom-apq8064-sony-xperia-lagan-yuga | |
- qcom-msm8960-cdp | |
- qcom-msm8960-samsung-expressatt | |
- qcom-msm8960-sony-mint | |
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://github.com/devicetree-org/dt-schema.git@main | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Build | |
run: | | |
make $KBUILD_DEFCONFIG | |
status=0 | |
make -j3 qcom/${{ matrix.devices }}.dtb 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://github.com/devicetree-org/dt-schema.git@main | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- 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 |