-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (63 loc) · 2 KB
/
validate.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
name: Validate
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CI: 1
CARGO_TERM_COLOR: always
RENODE_DIR: /opt/renode/
# Used by renode-test to generate snapshots of failed tests
RENODE_CI_MODE: YES
DLA_BIN: dla
jobs:
build-dla-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: rustup target add riscv64imac-unknown-none-elf
- name: Build examples
working-directory: ./examples/hpc/hello-dla
run: cargo build --example dla
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: $DLA_BIN
path: ./examples/hpc/target/riscv64imac-unknown-none-elf/debug/examples/dla
if-no-files-found: error
retention-days: 14
run-dla-example:
needs: build-dla-example
runs-on: ubuntu-latest
container:
image: antmicro/renode:1.14.0
options: --user root
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: $DLA_BIN
- name: Create Renode peripheral symlinks
run: ln -s $(readlink -f "./vp/devel/python_peripherals/DLA.py") "$RENODE_DIR/scripts/pydev/DLA.py"
- name: Run example
run: renode-test scripts/robot/hello_dla.robot --variable BIN:"$(readlink -f $DLA_BIN)"
- name: Upload snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
path: snapshots/
build-ffi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: rustup target add riscv64imac-unknown-none-elf riscv32imc-unknown-none-elf
- name: Build FFI without RT on SysCtrl
working-directory: ./examples/headsail-bsp-ffi
run: cargo build --target=riscv32imc-unknown-none-elf -Fpanic-uart
- name: Build FFI without RT on HPC
working-directory: ./examples/headsail-bsp-ffi
run: cargo build --target=riscv64imac-unknown-none-elf -Fpanic-uart