-
Notifications
You must be signed in to change notification settings - Fork 9
72 lines (70 loc) · 2.54 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 autoconf-archive 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
- name: Build BPAK
run: |
git clone https://github.com/jonasblixt/bpak --depth 1 --branch v0.8.6
pushd bpak
cmake .
make
sudo make install
sudo ldconfig
popd
- name: Build punchboot-tools
run: |
git clone https://github.com/jonasblixt/punchboot-tools --depth 1 --branch v0.3.1
pushd punchboot-tools
cmake -DPB_TOOLS_BUILD_SOCKET=1 .
make
sudo make install
sudo ldconfig
popd
- name: Build pbstate
run: |
pushd tools/pbstate
autoreconf -fi
./configure
make
sudo make install
sudo ldconfig
popd
- name: Build punchboot and run tests
run: |
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 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 }}