-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (65 loc) · 1.83 KB
/
ci.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
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
linux-build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install build dependencies for simview and surelog
run: |
sudo apt-get update -qq
sudo apt install -y libunwind-dev
sudo apt install -y \
build-essential cmake ninja-build \
g++ default-jre \
google-perftools \
python3 python3-dev python3-orderedmultidict python3-psutil \
libgoogle-perftools-dev \
uuid-dev
- name: Checkout simview
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: build-cache
- name: Configure shell
run: |
echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV
echo 'PREFIX=${GITHUB_WORKSPACE}/surelog-install' >> $GITHUB_ENV
- name: Show shell configuration
run: |
env
- name: Build Surelog
run: |
git clone --recursive https://github.com/chipsalliance/Surelog.git
(cd Surelog ; make install)
- name: Build
run: |
cmake -B build -GNinja -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/surelog-install -DCMAKE_CXX_FLAGS="-Wall -W -Wextra -Werror" .
ninja -C build
- name: Test
run: |
ninja -C build test
CodeFormatting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt-get install clang-format
- name: Run formatting style check
run: ./.github/bin/run-clang-format.sh