cmake(ci): Remove all arm workflows

This commit is contained in:
Corentin Le Molgat
2022-09-02 10:22:54 +02:00
parent 69e409ab2e
commit 323db0a869
4 changed files with 10 additions and 109 deletions

View File

@@ -112,21 +112,6 @@ help:
@echo -e "\t${BOLD}sh_glop_<stage>${RESET}: Run a Glop <stage> container using an Ubuntu:rolling docker image (debug purpose)."
@echo -e "\t${BOLD}clean_glop_<stage>${RESET}: Remove the Glop <stage> docker image (and the save archive if any) for a specific distro."
@echo
@echo
@echo -e "\t${BOLD}arm_<target>_<step>${RESET}: cross build for aarch64 the <target> <stage> docker image."
@echo -e "\t${BOLD}save_arm_<target>_<step>${RESET}: Save for aarch64 the <target> <step> docker images."
@echo -e "\t${BOLD}clean_arm_<target>_<step>${RESET}: Remove for aarch64 the <target> <step> docker image (and the save archive if any)."
@echo
@echo -e "\tWith ${BOLD}<target>${RESET}:"
@echo -e "\t\t${BOLD}glop${RESET} Build libglop"
@echo -e "\t\t${BOLD}or-tools${RESET} Build libortools"
@echo
@echo -e "\tWith ${BOLD}<step>${RESET}:"
@echo -e "\t\t${BOLD}env${RESET}"
@echo -e "\t\t${BOLD}devel${RESET}"
@echo -e "\t\t${BOLD}build${RESET}"
@echo -e "\t\t${BOLD}test${RESET}"
@echo
@echo -e "\tGlobal targets."
@echo -e "\t${BOLD}clean${RESET}: Remove ALL caches and docker images."
@echo -e "\t${BOLD}clean_<distro>${RESET}: Remove cache and docker image for the specified distro."
@@ -409,42 +394,6 @@ $(foreach stage,$(TOOLCHAIN_STAGES),$(eval $(call toolchain-stage-target,$(stage
clean_toolchains: $(addprefix clean_toolchain_, $(TOOLCHAIN_STAGES))
-rmdir $(addprefix cache/, $(TOOLCHAIN_TARGETS))
############
## ARM 64 ##
############
TARGETS = glop or-tools
STEPS = env devel build test
define make-arm-target =
#$$(info TARGET: $1)
#$$(info Create targets: $(addprefix arm_$1_, $(STEPS)))
arm_targets = $(addprefix arm_$1_, $(STEPS))
.PHONY: $$(arm_targets)
$$(arm_targets): arm_$1_%: docker/arm/$1.Dockerfile
#@docker image rm -f ${IMAGE}:$$@ 2>/dev/null
${DOCKER_BUILD_CMD} --target=$$* --tag ${IMAGE}:$$@ -f $$< ..
save_arm_targets = $(addprefix save_arm_$1_, $(STEPS))
.PHONY: $$(save_arm_targets)
$$(save_arm_targets): save_arm_$1_%: cache/arm/docker_$1_%.tar
cache/arm/docker_$1_%.tar: arm_$1_%
@rm -f $$@
mkdir -p cache/arm
docker save ${IMAGE}:$$< -o $$@
sh_arm_targets = $(addprefix sh_arm_$1_, $(STEPS))
.PHONY: $$(sh_arm_targets)
$$(sh_arm_targets): sh_arm_$1_%: arm_$1_%
${DOCKER_RUN_CMD} -it --name ${PROJECT}_${BUILD_SYSTEM}_$$< ${IMAGE}:$$<
clean_arm_targets = $(addprefix clean_arm_$1_, $(STEPS))
.PHONY: $$(clean_arm_targets)
$$(clean_arm_targets): clean_arm_$1_%
docker image rm -f ${IMAGE}:arm_$1_$$* 2>/dev/null
rm -f cache/arm/docker_$1_$$*.tar
endef
$(foreach target,$(TARGETS),$(eval $(call make-arm-target,$(target))))
#############
## VAGRANT ##
#############

View File

@@ -38,6 +38,16 @@ Python, Java, .Net]: [![Status][docker_svg]][docker_link]
[docker_svg]: https://github.com/google/or-tools/actions/workflows/cmake_docker.yml/badge.svg?branch=main
[docker_link]: https://github.com/google/or-tools/actions/workflows/cmake_docker.yml
[![Build Status][aarch64_toolchain_status]][aarch64_toolchain_link]
[![Build Status][mips_toolchain_status]][mips_toolchain_link]
[![Build Status][powerpc_toolchain_status]][powerpc_toolchain_link]
[aarch64_toolchain_status]: https://github.com/google/or-tools/actions/workflows/aarch64_toolchain.yml/badge.svg
[aarch64_toolchain_link]: https://github.com/google/or-tools/actions/workflows/aarch64_toolchain.yml
[mips_toolchain_status]: https://github.com/google/or-tools/actions/workflows/mips_toolchain.yml/badge.svg
[mips_toolchain_link]: https://github.com/google/or-tools/actions/workflows/mips_toolchain.yml
[powerpc_toolchain_status]: https://github.com/google/or-tools/actions/workflows/powerpc_toolchain.yml/badge.svg
[powerpc_toolchain_link]: https://github.com/google/or-tools/actions/workflows/powerpc_toolchain.yml
## Introduction
<nav for="cmake"> |

View File

@@ -1,29 +0,0 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/ubuntu
FROM ubuntu:rolling AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq git wget libssl-dev build-essential \
ninja-build python3 pkgconf libglib2.0-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install CMake 3.21.1
RUN wget -q "https://cmake.org/files/v3.21/cmake-3.21.1-linux-x86_64.sh" \
&& chmod a+x cmake-3.21.1-linux-x86_64.sh \
&& ./cmake-3.21.1-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
&& rm cmake-3.21.1-linux-x86_64.sh
FROM env AS devel
WORKDIR /home/project
COPY . .
FROM devel AS build
ENV PROJECT=glop
ENV TARGET=aarch64-linux-gnu
RUN ./tools/cross_compile.sh build
FROM build AS test
RUN ./tools/cross_compile.sh qemu
RUN ./tools/cross_compile.sh test

View File

@@ -1,29 +0,0 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/ubuntu
FROM ubuntu:rolling AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq git wget libssl-dev build-essential \
ninja-build python3 pkgconf libglib2.0-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install CMake 3.21.1
RUN wget -q "https://cmake.org/files/v3.21/cmake-3.21.1-linux-x86_64.sh" \
&& chmod a+x cmake-3.21.1-linux-x86_64.sh \
&& ./cmake-3.21.1-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
&& rm cmake-3.21.1-linux-x86_64.sh
FROM env AS devel
WORKDIR /home/project
COPY . .
FROM devel AS build
ENV PROJECT=or-tools
ENV TARGET=aarch64-linux-gnu
RUN ./tools/cross_compile.sh build
FROM build AS test
RUN ./tools/cross_compile.sh qemu
RUN ./tools/cross_compile.sh test