-
Notifications
You must be signed in to change notification settings - Fork 167
71 lines (69 loc) · 2.93 KB
/
compile.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
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Install packages
run: sudo apt install -y opam zlib1g-dev pkg-config libgmp-dev z3 device-tree-compiler
- name: Check out repository code
uses: actions/checkout@HEAD
with:
submodules: recursive
- name: Update submodule branch
# run : |
# git config --file=.gitmodules submodule.TEST_DIR_ROOT/riscv_tests.git.branch riscv-tests-sail ; \
# git submodule sync ; \
# git submodule update --init --recursive --remote
run : |
cd TEST_DIR_ROOT/riscv_tests.git ; \
git fetch ; \
git checkout riscv-tests-sail ;
- name: Ensure pre-commit checks pass
run: pip install pre-commit && pre-commit run --all-files --show-diff-on-failure --color=always
- name: Init opam
run: opam init --disable-sandboxing -y
- name: Install sail
run: opam install -y sail
- name: Download RISC-V toolchain (32-bit)
run: wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv32-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz
- name: Install RISC-V toolchain (32-bit)
run: sudo tar xvfz riscv32-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz --directory /opt
- name: Download RISC-V toolchain (64-bit)
run: wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv64-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz
- name: Install RISC-V toolchain (64-bit)
run: sudo tar xvfz riscv64-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz --directory /opt
- name: Build RISC-V testsuite
run: |
cd TEST_DIR_ROOT/riscv_tests.git ; \
git checkout -b riscv-tests-sail remotes/origin/riscv-tests-sail ; \
echo ${PWD} ; ls ; \
autoconf ; \
./configure --prefix=${PWD}/target ; \
export PATH=/opt/riscv/bin:${PATH} ; \
make isa ;
- name: Build and test simulators
run: eval $(opam env) && test/run_tests.sh
- name: Build and test simulators (new method)
run: |
eval $(opam env) ; \
cd TEST_DIR_ROOT/riscv_tests.git ; \
../../bin/run_tests.py --outfile=tests_new.xml --32bit=yes --64bit=yes --c_sim=yes --ocaml_sim=no --sailcov=no --clean_build=yes --test_switch_pyfile=test_command_line_switch.py --test_ignore_pyfile=test_ignore_list.py
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: tests.xml
path: test/tests.xml
- name: Upload test results (new)
if: always()
uses: actions/upload-artifact@v4
with:
name: tests_new.xml
path: TEST_DIR_ROOT/riscv_test.git/tests_new.xml
- name: Upload event payload
if: always()
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}