-
Notifications
You must be signed in to change notification settings - Fork 9
122 lines (110 loc) · 3.45 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: test-verilated-peripherals
on:
pull_request:
push:
workflow_dispatch:
inputs:
renode_gitrev:
description: 'Renode git revision'
required: false
default: ''
env:
RENODE_GITREV: "${{ github.event.inputs.renode_gitrev }}"
VERILATOR_VERSION: "4.200"
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- { arch: "x86_64", os: "ubuntu-20.04" }
- { arch: "x86_64", os: "macos-latest" }
- { arch: "x86_64", os: "windows-latest" }
defaults:
run:
shell: bash
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ccache
key: ${{ runner.os }}-${{ matrix.config.arch }}
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' }}
with:
update: true
install: >-
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
patch
- uses: actions/setup-python@v4
with:
python-version: '3.11.5' # newer version breaks pip on Windows
- name: Download and build Renode
run: |
set -ex
RUNNER_OS=${{ runner.os }}
source .github/scripts/build-renode.sh
mkdir -p artifacts
tar -czf artifacts/renode.tar.gz renode/
- name: Build peripherals for Windows
if: ${{ runner.os == 'Windows' }}
shell: msys2 {0}
run: |
set -ex
RUNNER_OS="Windows"
MAKE_BIN="mingw32-make.exe"
BUILD_ARCH=${{ matrix.config.arch }}
git submodule update --init --recursive
source .github/scripts/build-verilator.sh
source .github/scripts/build.sh
- name: Build peripherals for ${{ runner.os }}
if: ${{ runner.os != 'Windows' }}
run: |
set -ex
RUNNER_OS=${{ runner.os }}
MAKE_BIN="make"
BUILD_ARCH=${{ matrix.config.arch }}
git submodule update --init --recursive
source .github/scripts/build-verilator.sh
source .github/scripts/build.sh
- uses: actions/upload-artifact@v3
with:
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }}
path: artifacts/*
test:
needs: build
strategy:
fail-fast: false
matrix:
config:
- { arch: "x86_64", os: "ubuntu-20.04" }
- { arch: "x86_64", os: "macos-latest" }
- { arch: "x86_64", os: "windows-latest" }
defaults:
run:
shell: bash
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }}
path: artifacts
- uses: actions/setup-python@v4
with:
python-version: '3.11.5' # newer version breaks pip on Windows
- name: Test peripherals for ${{ runner.os }}
run: |
set -ex
tar -xf artifacts/renode.tar.gz
source .github/scripts/test.sh
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }}
path: renode/output/tests/*