[pre-commit.ci] auto fixes from pre-commit.com hooks #500
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
name: Punchboot build | |
on: [push, pull_request] | |
jobs: | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install qemu-system-arm libusb-1.0-0 libusb-1.0-0-dev uuid-dev gcc-arm-none-eabi cmake uuid-runtime python3-dev libmbedtls-dev liblzma-dev uuid-dev | |
wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.4.0.zip | |
unzip v3.4.0.zip | |
- name: Build BPAK | |
run: | | |
git clone https://github.com/jonasblixt/bpak --depth 1 --branch v0.9.3 | |
pushd bpak | |
mkdir build/ | |
cmake -B build/ | |
make -C build/ | |
sudo make -C build/ install | |
sudo ldconfig | |
popd | |
- name: Build punchboot-tools | |
run: | | |
pip install . | |
- name: Build pbstate | |
run: | | |
pushd tools/pbstate | |
mkdir build | |
cmake -B build/ | |
make -C build/ | |
sudo make -C build/ install | |
sudo ldconfig | |
popd | |
- name: Build punchboot and run tests | |
run: | | |
export MBEDTLS_DIR=$(readlink -f mbedtls-3.4.0) | |
cp configs/test_defconfig .config | |
make CROSS_COMPILE=arm-none-eabi- BOARD=src/board/test Q= check | |
- name: codecov | |
run: bash <(curl -s https://codecov.io/bash) | |
- name: Download Coverity Build Tool | |
run: | | |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=jonpe960%2Fpunchboot" -O cov-analysis-linux64.tar.gz | |
mkdir cov-analysis-linux64 | |
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
env: | |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
- name: Build with cov-build | |
run: | | |
export MBEDTLS_DIR=$(readlink -f mbedtls-3.4.0) | |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH | |
make CROSS_COMPILE=arm-none-eabi- BOARD=src/board/test clean | |
cov-configure --template --compiler arm-none-eabi-gcc --comptype gcc | |
cov-build --dir cov-int make CROSS_COMPILE=arm-none-eabi- BOARD=src/board/test | |
- name: Submit the result to Coverity Scan | |
run: | | |
tar czvf pb.tgz cov-int | |
curl \ | |
--form project=jonpe960%2Fpunchboot \ | |
--form token=$TOKEN \ | |
--form email=jonpe960@gmail.com \ | |
--form file=@pb.tgz \ | |
--form version=master \ | |
--form description="punchboot" \ | |
https://scan.coverity.com/builds?project=jonpe960%2Fpunchboot | |
env: | |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |