add support for manylinux2014-x64

This commit is contained in:
Jonas Vautherin 2019-12-17 15:00:47 +01:00
parent 218a9c0945
commit 42b7dd5602
3 changed files with 74 additions and 2 deletions

View File

@ -16,11 +16,11 @@ BIN = ./bin
STANDARD_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv5-musl linux-armv6 linux-armv7 linux-armv7a linux-mips linux-mipsel linux-ppc64le windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix STANDARD_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv5-musl linux-armv6 linux-armv7 linux-armv7a linux-mips linux-mipsel linux-ppc64le windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix
# Generated Dockerfiles. # Generated Dockerfiles.
GEN_IMAGES = linux-s390x linux-mips manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 web-wasm linux-arm64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv5 linux-armv5-musl linux-ppc64le GEN_IMAGES = linux-s390x linux-mips manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 web-wasm linux-arm64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv5 linux-armv5-musl linux-ppc64le
GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
# These images are expected to have explicit rules for *both* build and testing # These images are expected to have explicit rules for *both* build and testing
NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows
@ -97,6 +97,30 @@ web-wasm.test: web-wasm
$(BIN)/dockcross-web-wasm python test/run.py --exe-suffix ".js" $(BIN)/dockcross-web-wasm python test/run.py --exe-suffix ".js"
rm -rf web-wasm/test rm -rf web-wasm/test
#
# manylinux2014-x64
#
manylinux2014-x64: manylinux2014-x64/Dockerfile
mkdir -p $@/imagefiles && cp -r imagefiles $@/
$(DOCKER) build -t $(ORG)/manylinux2014-x64:latest \
--build-arg IMAGE=$(ORG)/manylinux2014-x64 \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
-f manylinux2014-x64/Dockerfile .
$(DOCKER) build -t $(ORG)/manylinux2014-x64:$(TAG) \
--build-arg IMAGE=$(ORG)/manylinux2014-x64 \
--build-arg VERSION=$(TAG) \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
-f manylinux2014-x64/Dockerfile .
rm -rf $@/imagefiles
manylinux2014-x64.test: manylinux2014-x64
$(DOCKER) run $(RM) dockcross/manylinux2014-x64 > $(BIN)/dockcross-manylinux2014-x64 && chmod +x $(BIN)/dockcross-manylinux2014-x64
$(BIN)/dockcross-manylinux2014-x64 /opt/python/cp35-cp35m/bin/python test/run.py
# #
# manylinux2010-x64 # manylinux2010-x64
# #

View File

@ -0,0 +1,37 @@
FROM quay.io/pypa/manylinux2014_x86_64
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux2014-x64
#include "common.manylinux"
#include "common.docker"
ENV CROSS_TRIPLE x86_64-linux-gnu
ENV CROSS_ROOT /opt/rh/devtoolset-8/root/usr/bin
ENV AS=${CROSS_ROOT}/as \
AR=${CROSS_ROOT}/ar \
CC=${CROSS_ROOT}/gcc \
CPP=${CROSS_ROOT}/cpp \
CXX=${CROSS_ROOT}/g++ \
LD=${CROSS_ROOT}/ld \
FC=${CROSS_ROOT}/gfortran
COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
COPY manylinux2014-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG IMAGE=dockcross/manylinux2014-x64
ARG VERSION=latest
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.version=$VERSION \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0"
ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION}

View File

@ -0,0 +1,11 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_CROSSCOMPILING FALSE)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(MANYLINUX2014 TRUE)
set(CMAKE_C_COMPILER /opt/rh/devtoolset-8/root/usr/bin/gcc)
set(CMAKE_CXX_COMPILER /opt/rh/devtoolset-8/root/usr/bin/g++)
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_Fortran_COMPILER /opt/rh/devtoolset-8/root/usr/bin/gfortran)