File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : RISC-V CI
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ test :
9
+ runs-on : ubuntu-latest
10
+ container :
11
+ image : ghcr.io/utoss/risc-v:ci
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Build testbench
18
+ run : make build_tb
19
+
20
+ - name : Run testbench
21
+ run : make run_tb
22
+
23
+ - name : Upload VCD files
24
+ uses : actions/upload-artifact@v4
25
+ if : always()
26
+ with :
27
+ name : vcd-files
28
+ path : test/out/*.vcd
29
+ retention-days : 7
Original file line number Diff line number Diff line change
1
+ FROM public.ecr.aws/lts/ubuntu:22.04_stable
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+ ARG KEYRING_PATH=/usr/share/keyrings
5
+ ARG APT_SOURCES_PATH=/etc/apt/sources.list.d
6
+
7
+ # update and upgrade
8
+ RUN apt update && apt upgrade -y
9
+
10
+ # install essentialls
11
+ RUN apt update && \
12
+ apt install -y \
13
+ man make build-essential git zsh vim curl wget procps gnupg gnupg2 ca-certificates zip \
14
+ software-properties-common
15
+
16
+ # create dev sudo user
17
+ RUN useradd --create-home dev && \
18
+ usermod --append --groups sudo dev && \
19
+ apt update && apt install -y sudo && \
20
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
21
+
22
+ # install dumb init system
23
+ USER root
24
+ RUN apt update && apt install -y dumb-init
25
+
26
+ # build and install icarus verilog
27
+ USER dev
28
+ ARG ICARUS_SRC_TAR=v12_0.tar.gz
29
+ ARG ICARUS_SRC_URL=https://github.com/steveicarus/iverilog/archive/refs/tags/${ICARUS_SRC_TAR}
30
+ ARG ICARUS_SRC_HASH="a68cb1ef7c017ef090ebedb2bc3e39ef90ecc70a3400afb4aa94303bc3beaa7d ${ICARUS_SRC_TAR}"
31
+ RUN sudo apt update && sudo apt install -y autoconf gperf make gcc g++ bison flex && \
32
+ cd /tmp && \
33
+ wget ${ICARUS_SRC_URL} && \
34
+ echo ${ICARUS_SRC_HASH} | sha256sum -c && \
35
+ tar -xzf ${ICARUS_SRC_TAR} && \
36
+ cd iverilog-* && sh autoconf.sh && ./configure && make && make check && sudo make install && \
37
+ cd .. && rm ${ICARUS_SRC_TAR} && rm -rf ./iverilog-*
38
+
39
+ ENTRYPOINT ["/usr/bin/dumb-init", "--"]
You can’t perform that action at this time.
0 commit comments