Skip to content

Commit 9863769

Browse files
ancientmodernavagin
authored andcommitted
ci: add workflow for riscv64
Signed-off-by: Haorong Lu <[email protected]>
1 parent 6636782 commit 9863769

File tree

7 files changed

+117
-2
lines changed

7 files changed

+117
-2
lines changed

.github/workflows/cross-compile-daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
target: [armv7-stable-cross, aarch64-stable-cross, ppc64-stable-cross, mips64el-stable-cross]
13+
target: [armv7-stable-cross, aarch64-stable-cross, ppc64-stable-cross, mips64el-stable-cross, riscv64-stable-cross]
1414
branches: [criu-dev, master]
1515

1616
steps:

.github/workflows/cross-compile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
aarch64-stable-cross,
2222
ppc64-stable-cross,
2323
mips64el-stable-cross,
24+
riscv64-stable-cross,
2425
]
2526
include:
2627
- experimental: true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ubuntu:jammy
2+
3+
ENV ARCH=riscv64
4+
ENV DEBIAN_ARCH=riscv64
5+
ENV CROSS_TRIPLET=riscv64-linux-gnu
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
COPY scripts/ci/apt-install /bin/apt-install
2+
3+
# Add the cross compiler sources
4+
RUN apt-get clean -y && apt-get update -y && apt-get install -y --no-install-recommends gnupg2
5+
6+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C 8D69674688B6CB36 B523E5F3FC4E5F2C
7+
8+
COPY scripts/ci/riscv64-cross/amd64-sources.list /etc/apt/sources.list
9+
10+
COPY scripts/ci/riscv64-cross/riscv64-sources.list /etc/apt/sources.list.d/
11+
12+
RUN dpkg --add-architecture ${DEBIAN_ARCH} && \
13+
apt-get update -y
14+
15+
# Install required packages
16+
RUN apt-get install -y --no-install-recommends \
17+
build-essential \
18+
pkg-config \
19+
git \
20+
crossbuild-essential-${DEBIAN_ARCH} \
21+
libc6-dev-${DEBIAN_ARCH}-cross \
22+
libc6-${DEBIAN_ARCH}-cross \
23+
libbz2-dev:${DEBIAN_ARCH} \
24+
libexpat1-dev:${DEBIAN_ARCH} \
25+
ncurses-dev:${DEBIAN_ARCH} \
26+
libssl-dev:${DEBIAN_ARCH} \
27+
protobuf-c-compiler \
28+
protobuf-compiler \
29+
python3-protobuf \
30+
libnl-3-dev:${DEBIAN_ARCH} \
31+
libprotobuf-dev:${DEBIAN_ARCH} \
32+
libnet-dev:${DEBIAN_ARCH} \
33+
libprotobuf-c-dev:${DEBIAN_ARCH} \
34+
libcap-dev:${DEBIAN_ARCH} \
35+
libaio-dev:${DEBIAN_ARCH} \
36+
libnl-route-3-dev:${DEBIAN_ARCH} \
37+
libnftables-dev:${DEBIAN_ARCH} \
38+
libgnutls28-dev:${DEBIAN_ARCH} \
39+
iproute2:${DEBIAN_ARCH}
40+
41+
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
42+
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
43+
AS=/usr/bin/${CROSS_TRIPLET}-as \
44+
AR=/usr/bin/${CROSS_TRIPLET}-ar \
45+
CC=/usr/bin/${CROSS_TRIPLET}-gcc \
46+
CPP=/usr/bin/${CROSS_TRIPLET}-cpp \
47+
CXX=/usr/bin/${CROSS_TRIPLET}-g++ \
48+
LD=/usr/bin/${CROSS_TRIPLET}-ld \
49+
FC=/usr/bin/${CROSS_TRIPLET}-gfortran
50+
51+
ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
52+
PKG_CONFIG_PATH=/usr/lib/${CROSS_TRIPLET}/pkgconfig
53+
54+
COPY . /criu
55+
WORKDIR /criu
56+
57+
RUN make mrproper && date && make -j $(nproc) zdtm && date

scripts/build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARCHES := x86_64 fedora-asan fedora-rawhide armv7hf centos8
2-
STABLE_CROSS_ARCHES := armv7-stable-cross aarch64-stable-cross ppc64-stable-cross mips64el-stable-cross
2+
STABLE_CROSS_ARCHES := armv7-stable-cross aarch64-stable-cross ppc64-stable-cross mips64el-stable-cross riscv64-stable-cross
33
UNSTABLE_CROSS_ARCHES := armv7-unstable-cross aarch64-unstable-cross ppc64-unstable-cross mips64el-unstable-cross
44
NON_CLANG := $(UNSTABLE_CROSS_ARCHES) $(STABLE_CROSS_ARCHES)
55
CREATE_DOCKERFILES := $(ARCHES) $(NON_CLANG)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted
2+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
3+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy universe
4+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates universe
5+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy multiverse
6+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
7+
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
8+
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted
9+
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security universe
10+
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security multiverse
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
2+
# newer versions of the distribution.
3+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
4+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
5+
6+
## Major bug fix updates produced after the final release of the
7+
## distribution.
8+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
9+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
10+
11+
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
12+
## team. Also, please note that software in universe WILL NOT receive any
13+
## review or updates from the Ubuntu security team.
14+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy universe
15+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy universe
16+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe
17+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe
18+
19+
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
20+
## team, and may not be under a free licence. Please satisfy yourself as to
21+
## your rights to use the software. Also, please note that software in
22+
## multiverse WILL NOT receive any review or updates from the Ubuntu
23+
## security team.
24+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy multiverse
25+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy multiverse
26+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse
27+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse
28+
29+
## N.B. software from this repository may not have been tested as
30+
## extensively as that contained in the main release, although it includes
31+
## newer versions of some applications which may provide useful features.
32+
## Also, please note that software in backports WILL NOT receive any review
33+
## or updates from the Ubuntu security team.
34+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
35+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
36+
37+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted
38+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted
39+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security universe
40+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security universe
41+
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security multiverse
42+
# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security multiverse

0 commit comments

Comments
 (0)