mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
ci: Run cross compile with debian testing
Debian testing has newer compiler version and running cross compilation tests would allow us to catch any compilation errors early. Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
This commit is contained in:
parent
4c1330bb0c
commit
d514bacb40
11 changed files with 81 additions and 2 deletions
11
.github/workflows/cross-compile.yml
vendored
11
.github/workflows/cross-compile.yml
vendored
|
|
@ -8,7 +8,16 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
target: [armv7-stable-cross, aarch64-stable-cross, ppc64-stable-cross, mips64el-stable-cross]
|
||||
target: [
|
||||
armv7-stable-cross,
|
||||
armv7-testing-cross,
|
||||
aarch64-stable-cross,
|
||||
aarch64-testing-cross,
|
||||
ppc64-stable-cross,
|
||||
ppc64-testing-cross,
|
||||
mips64el-stable-cross,
|
||||
mips64el-testing-cross
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
|||
5
scripts/build/Dockerfile.aarch64-testing-cross.hdr
Normal file
5
scripts/build/Dockerfile.aarch64-testing-cross.hdr
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FROM docker.io/dockcross/base:latest
|
||||
|
||||
ENV ARCH=aarch64
|
||||
ENV DEBIAN_ARCH=arm64
|
||||
ENV CROSS_TRIPLET=aarch64-linux-gnu
|
||||
1
scripts/build/Dockerfile.aarch64-testing-cross.tmpl
Symbolic link
1
scripts/build/Dockerfile.aarch64-testing-cross.tmpl
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
Dockerfile.testing-cross.tmpl
|
||||
6
scripts/build/Dockerfile.armv7-testing-cross.hdr
Normal file
6
scripts/build/Dockerfile.armv7-testing-cross.hdr
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM docker.io/dockcross/base:latest
|
||||
|
||||
ENV ARCH=arm
|
||||
ENV SUBARCH=armv7
|
||||
ENV DEBIAN_ARCH=armhf
|
||||
ENV CROSS_TRIPLET=arm-linux-gnueabihf
|
||||
1
scripts/build/Dockerfile.armv7-testing-cross.tmpl
Symbolic link
1
scripts/build/Dockerfile.armv7-testing-cross.tmpl
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
Dockerfile.testing-cross.tmpl
|
||||
6
scripts/build/Dockerfile.mips64el-testing-cross.hdr
Normal file
6
scripts/build/Dockerfile.mips64el-testing-cross.hdr
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM dockcross/base:latest
|
||||
|
||||
ENV ARCH=mips
|
||||
ENV SUBARCH=mips
|
||||
ENV DEBIAN_ARCH=mips64el
|
||||
ENV CROSS_TRIPLET=mips64el-linux-gnuabi64
|
||||
1
scripts/build/Dockerfile.mips64el-testing-cross.tmpl
Symbolic link
1
scripts/build/Dockerfile.mips64el-testing-cross.tmpl
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
Dockerfile.testing-cross.tmpl
|
||||
5
scripts/build/Dockerfile.ppc64-testing-cross.hdr
Normal file
5
scripts/build/Dockerfile.ppc64-testing-cross.hdr
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FROM dockcross/base:latest
|
||||
|
||||
ENV ARCH=ppc64
|
||||
ENV DEBIAN_ARCH=ppc64el
|
||||
ENV CROSS_TRIPLET=powerpc64le-linux-gnu
|
||||
1
scripts/build/Dockerfile.ppc64-testing-cross.tmpl
Symbolic link
1
scripts/build/Dockerfile.ppc64-testing-cross.tmpl
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
Dockerfile.testing-cross.tmpl
|
||||
42
scripts/build/Dockerfile.testing-cross.tmpl
Normal file
42
scripts/build/Dockerfile.testing-cross.tmpl
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
COPY scripts/ci/apt-install /bin/apt-install
|
||||
|
||||
# Add the cross compiler sources
|
||||
RUN echo "deb http://deb.debian.org/debian/ testing main" >> /etc/apt/sources.list && \
|
||||
dpkg --add-architecture ${DEBIAN_ARCH}
|
||||
|
||||
RUN apt-install \
|
||||
crossbuild-essential-${DEBIAN_ARCH} \
|
||||
libc6-dev-${DEBIAN_ARCH}-cross \
|
||||
libc6-${DEBIAN_ARCH}-cross \
|
||||
libbz2-dev:${DEBIAN_ARCH} \
|
||||
libexpat1-dev:${DEBIAN_ARCH} \
|
||||
ncurses-dev:${DEBIAN_ARCH} \
|
||||
libssl-dev:${DEBIAN_ARCH} \
|
||||
protobuf-c-compiler \
|
||||
protobuf-compiler \
|
||||
python3-protobuf \
|
||||
libnl-3-dev:${DEBIAN_ARCH} \
|
||||
libprotobuf-dev:${DEBIAN_ARCH} \
|
||||
libnet-dev:${DEBIAN_ARCH} \
|
||||
libprotobuf-c-dev:${DEBIAN_ARCH} \
|
||||
libcap-dev:${DEBIAN_ARCH} \
|
||||
libaio-dev:${DEBIAN_ARCH} \
|
||||
libnl-route-3-dev:${DEBIAN_ARCH}
|
||||
|
||||
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
|
||||
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
|
||||
AS=/usr/bin/${CROSS_TRIPLET}-as \
|
||||
AR=/usr/bin/${CROSS_TRIPLET}-ar \
|
||||
CC=/usr/bin/${CROSS_TRIPLET}-gcc \
|
||||
CPP=/usr/bin/${CROSS_TRIPLET}-cpp \
|
||||
CXX=/usr/bin/${CROSS_TRIPLET}-g++ \
|
||||
LD=/usr/bin/${CROSS_TRIPLET}-ld \
|
||||
FC=/usr/bin/${CROSS_TRIPLET}-gfortran
|
||||
|
||||
ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
|
||||
PKG_CONFIG_PATH=/usr/lib/${CROSS_TRIPLET}/pkgconfig
|
||||
|
||||
COPY . /criu
|
||||
WORKDIR /criu
|
||||
|
||||
RUN make mrproper && date && make -j $(nproc) zdtm && date
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
ARCHES := x86_64 fedora-asan fedora-rawhide centos7 armv7hf centos8
|
||||
NON_CLANG := armv7-stable-cross aarch64-stable-cross ppc64-stable-cross mips64el-stable-cross
|
||||
STABLE_CROSS_ARCHES := armv7-stable-cross aarch64-stable-cross ppc64-stable-cross mips64el-stable-cross
|
||||
TESTING_CROSS_ARCHES := armv7-testing-cross aarch64-testing-cross ppc64-testing-cross mips64el-testing-cross
|
||||
NON_CLANG := $(TESTING_CROSS_ARCHES) $(STABLE_CROSS_ARCHES)
|
||||
CREATE_DOCKERFILES := $(ARCHES) $(NON_CLANG)
|
||||
TARGETS := $(ARCHES) alpine archlinux
|
||||
TARGETS_CLANG := $(addsuffix $(TARGETS),-clang)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue