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