-
Notifications
You must be signed in to change notification settings - Fork 33
65 lines (51 loc) · 1.67 KB
/
cmake.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
name: cmake
on:
push:
branches:
- 'main'
- 'dev**'
pull_request:
branches:
- 'main'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
systemc: [2.3.0a, 2.3.1a, 2.3.2, 2.3.3, 2.3.4, 3.0.0_pub_rev_20231129]
os: [ubuntu-20.04, ubuntu-22.04]
include:
- systemc: 2.3.3
os: self-hosted-ubuntu-22.04-arm64
name: SystemC ${{matrix.systemc}} - ${{matrix.os}}
env:
SYSTEMC_HOME: ${{github.workspace}}/systemc/${{matrix.systemc}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Dependencies
if: contains(matrix.os, 'self-hosted') == false
run: |
sudo apt-get update -y -qq
sudo apt-get install libelf-dev libsdl2-dev liblua5.3-dev libvncserver-dev libslirp-dev ninja-build
- name: Cache SystemC
id: cache-systemc
uses: actions/cache@v4
with:
path: ${{github.workspace}}/systemc
key: cache-systemc-${{matrix.systemc}}-${{runner.arch}}-${{matrix.os}}
- name: Download SystemC
if: steps.cache-systemc.outputs.cache-hit != 'true'
run: ./utils/setup-systemc -p ${{github.workspace}} -v ${{matrix.systemc}}
- name: Configure
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVCML_BUILD_TESTS=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j $(nproc)
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure