@@ -2,33 +2,126 @@ name: CI
2
2
3
3
on : [push, pull_request, workflow_dispatch]
4
4
5
+ defaults :
6
+ run :
7
+ shell : bash
8
+
5
9
jobs :
6
- build :
7
- runs-on : ubuntu-22.04
10
+ test :
11
+ strategy :
12
+ fail-fast : false
13
+ matrix :
14
+ include :
15
+ # Ubuntu Installations
16
+ # - name: ubuntu-20.04
17
+ # os: ubuntu-20.04
18
+ # container: null
19
+ # regressionFail: true
20
+ - name : ubuntu-22.04
21
+ os : ubuntu-22.04
22
+ container : null
23
+ # - name: ubuntu-24.04
24
+ # os: ubuntu-24.04
25
+ # container: null
26
+ # # Debian Installations
27
+ # - name: debian-12
28
+ # os: ubuntu-latest
29
+ # image: debian:12
30
+ # imageFamily: debian
31
+ # - name: debian-11
32
+ # os: ubuntu-latest
33
+ # image: debian:11
34
+ # imageFamily: debian
35
+ # # Red Hat Installations
36
+ # - name: rocky-8
37
+ # os: ubuntu-latest
38
+ # image: rockylinux:8
39
+ # imageFamily: redhat
40
+ # regressionFail: true
41
+ # - name: rocky-9
42
+ # os: ubuntu-latest
43
+ # image: rockylinux:9
44
+ # imageFamily: redhat
45
+ # - name: almalinux-8
46
+ # os: ubuntu-latest
47
+ # image: almalinux:8
48
+ # imageFamily: redhat
49
+ # regressionFail: true
50
+ # - name: almalinux-9
51
+ # os: ubuntu-latest
52
+ # image: almalinux:9
53
+ # imageFamily: redhat
54
+ # # SUSE Installations
55
+ # - name: opensuse-15.6
56
+ # os: ubuntu-latest
57
+ # image: opensuse/leap:15.6
58
+ # imageFamily: suse
59
+ # # User level installation
60
+ # - name: user-install
61
+ # os: ubuntu-latest
62
+ # image: null
63
+ # user: true
64
+ # # Custom location installation
65
+ # - name: custom-install
66
+ # os: ubuntu-latest
67
+ # image: null
68
+ # riscv_path: /home/riscv
69
+ # # Custom location user level installation
70
+ # - name: custom-user-install
71
+ # os: ubuntu-latest
72
+ # image: null
73
+ # user: true
74
+ # riscv_path: $HOME/riscv-toolchain
75
+
76
+ # run on selected version of ubuntu or on ubuntu-latest with docker image
77
+ runs-on : ${{ matrix.os }}
78
+ container :
79
+ image : ${{ matrix.image }}
80
+ options : --privileged --mount type=bind,source=/,target=/host --pid=host --entrypoint /bin/bash # Allow for connection with host
81
+
8
82
steps :
9
- - name : Install packages
10
- run : sudo apt install -y --no-install-recommends zlib1g-dev pkg-config libgmp-dev curl
11
- - name : Check out repository code
12
- uses : actions/checkout@HEAD
13
- with :
14
- submodules : true
15
- - name : Ensure pre-commit checks pass
16
- run : python3 -m pip install pre-commit && pre-commit run --all-files --show-diff-on-failure --color=always
17
- - name : Install sail from binary
18
- run : |
19
- sudo mkdir -p /usr/local
20
- curl --location https://github.com/rems-project/sail/releases/download/0.18-linux-binary/sail.tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1
21
- - name : Build and test simulators
22
- run : test/run_tests.sh
23
- - name : Upload test results
24
- if : always()
25
- uses : actions/upload-artifact@v4
26
- with :
27
- name : tests.xml
28
- path : test/tests.xml
29
- - name : Upload event payload
30
- if : always()
31
- uses : actions/upload-artifact@v4
32
- with :
33
- name : event.json
34
- path : ${{ github.event_path }}
83
+ # Docker images need git installed or the checkout action fails
84
+ - name : Install Dependencies for Container Image
85
+ run : |
86
+ if [ ${{ matrix.imageFamily }} == "debian" ]; then
87
+ apt-get update
88
+ apt-get install -y sudo git curl tar
89
+ elif [ ${{ matrix.imageFamily }} == "redhat" ]; then
90
+ dnf install -y sudo git tar
91
+ dnf install curl -y --allowerasing || true
92
+ elif [ ${{ matrix.imageFamily }} == "suse" ]; then
93
+ zypper install -y sudo git curl tar
94
+ else
95
+ sudo apt-get update
96
+ sudo apt-get install -y git curl tar
97
+ fi
98
+ - name : Check out repository code
99
+ uses : actions/checkout@HEAD
100
+ with :
101
+ submodules : true
102
+ - name : Install sail from binary
103
+ run : |
104
+ sudo mkdir -p /usr/local
105
+ curl --location https://github.com/user-attachments/files/17933831/riscv_sim_RV64.tar.gz | sudo tar xvz --directory=/usr/local/bin
106
+ # export PATH=$PATH:/usr/local/bin
107
+ - name : check install
108
+ run : which riscv_sim_RV64
109
+ - name : Run tests
110
+ run : |
111
+ cd test/riscv-tests
112
+ ls -lh
113
+ riscv_sim_RV64 rv64ui-p-bge.elf
114
+ - name : Build and test simulators
115
+ run : test/run_tests.sh
116
+ # - name: Upload test results
117
+ # if: always()
118
+ # uses: actions/upload-artifact@v4
119
+ # with:
120
+ # name: tests.xml
121
+ # path: test/tests.xml
122
+ # - name: Upload event payload
123
+ # if: always()
124
+ # uses: actions/upload-artifact@v4
125
+ # with:
126
+ # name: event.json
127
+ # path: ${{ github.event_path }}
0 commit comments