Skip to content

Commit 51aaca3

Browse files
committed
linuxci: test compiling linux
Similarly to Xen, CBMC should be able to compile the linux kernel. As compiling the full kernel is very time consuming, and with CBMC also space consuming, only compile a core part all its dependencies, with the smalles configuration possible. For this core part, we select the KVM hypervisor. Once this is working, the configuration, as well as targets to be compiled can be increased. When the linuxci fails, we want to be able to easily understand the failure. The used one-line-scan tool already captures input files that cannot be handled by goto-cc. Hence, also archives these files for easy access in the web UI. Signed-off-by: Norbert Manthey <[email protected]>
1 parent 1e16939 commit 51aaca3

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Linux partially with CPROVER tools
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
CompileLinux:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: true
15+
- name: Install Packages
16+
env:
17+
# This is needed in addition to -yq to prevent apt-get from asking for
18+
# user input
19+
DEBIAN_FRONTEND: noninteractive
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
23+
sudo apt-get install --no-install-recommends -y libssl-dev libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
24+
sudo apt-get install --no-install-recommends -y gawk jq
25+
26+
- name: Prepare ccache
27+
uses: actions/cache@v2
28+
with:
29+
path: .ccache
30+
key: ${{ runner.os }}-20.04-make-${{ github.ref }}-${{ github.sha }}-KERNEL
31+
restore-keys: |
32+
${{ runner.os }}-20.04-make-${{ github.ref }}
33+
${{ runner.os }}-20.04-make
34+
- name: ccache environment
35+
run: |
36+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
37+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
38+
- name: Zero ccache stats and limit in size
39+
run: ccache -z --max-size=500M
40+
- name: Build CBMC tools
41+
run: |
42+
make -C src minisat2-download
43+
make -C src CXX='ccache /usr/bin/g++' cbmc.dir goto-cc.dir goto-diff.dir -j2
44+
- name: Print ccache stats
45+
run: ccache -s
46+
47+
- name: Run (Docker Based) Linux Build test
48+
run: integration/linux/compile_linux.sh
49+
50+
- uses: actions/upload-artifact@v2
51+
with:
52+
name: CPROVER-faultyInput
53+
path: CPROVER/faultyInput/*

0 commit comments

Comments
 (0)