-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (62 loc) · 1.96 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
# DESCRIPTION: Github actions config
#
# This file ONLY is placed under the Creative Commons Public Domain, for
# any use, without warranty, 2020 by Wilson Snyder.
# SPDX-License-Identifier: CC0-1.0
name: build
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
vlt:
runs-on: ubuntu-22.04
name: build and test
env:
CI_OS_NAME: linux
CI_RUNS_ON: ubuntu-22.04
CI_COMMIT: ${{ github.sha }}
CI_M32: 0
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 4Gi
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Cache
uses: actions/cache@v4
env:
cache-name: ccache
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install packages for build
env:
CI_BUILD_STAGE_NAME: build
run: |
cd submodules/verilator && bash ci/ci-install.bash
sudo cpan -fi Bit::Vector # For t_cores_el2_cmark
- name: CCACHE maintenance
run: mkdir -p $CCACHE_DIR && cd submodules/verilator && bash ci/ci-ccache-maint.bash
- name: Build
env:
CI_BUILD_STAGE_NAME: build
run: cd submodules/verilator && bash ci/ci-script.bash
- name: Install packages for tests
env:
CI_BUILD_STAGE_NAME: test
run: |
cd submodules/verilator && bash ci/ci-install.bash
PIP_BREAK_SYSTEM_PACKAGES=1 sudo pip install --upgrade pip
PIP_BREAK_SYSTEM_PACKAGES=1 sudo pip install ../astsee
- name: Test
run: |
export VERILATOR_ROOT=$GITHUB_WORKSPACE/submodules/verilator
make test