-
Notifications
You must be signed in to change notification settings - Fork 126
51 lines (45 loc) · 1.3 KB
/
build.yml
File metadata and controls
51 lines (45 loc) · 1.3 KB
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
name: Build
on:
workflow_call:
workflow_dispatch:
inputs:
ref:
description: 'The git ref (branch, tag, or SHA) to build'
required: true
type: string
jobs:
compile-difftest-so:
strategy:
matrix:
cpu: ['xs', 'xs-dual']
type: ['ref', 'ref-debug']
fail-fast: false
runs-on: ubuntu-latest
container:
image: ghcr.io/openxiangshan/xs-env:ubuntu-20.04
continue-on-error: false
name: Compile NEMU for (${{ matrix.cpu }}-${{ matrix.type }})
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Setup env
run: |
echo "NEMU_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Compile dynamic library
run: |
make riscv64-${{ matrix.cpu }}-${{ matrix.type }}_defconfig
make -j
- name: Prepare artifact
run: |
mkdir -p artifact
cp build/riscv64-nemu-interpreter-so artifact/nemu-${{ matrix.cpu }}-${{ matrix.type }}.so
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: nemu-${{ matrix.cpu }}-${{ matrix.type }}.so
path: |
artifact/nemu-${{ matrix.cpu }}-${{ matrix.type }}.so