Commit 88e049e3 authored by Brad King's avatar Brad King
Browse files

ci: add docker spec to build ninja for linux-aarch64

parent eefa0ed0
#!/usr/bin/env bash
set -e
set -x
cleanup() {
docker container rm -fv "$build_container" >/dev/null 2>&1 || true
docker image rm -f "$build_image" >/dev/null 2>&1 || true
readonly suffix="-$(date -u +%Y-%m-%d)-${RANDOM}"
readonly build_container="ninja-build-linux-aarch64$suffix"
readonly build_image="ninja:build-linux-aarch64$suffix"
readonly git_tag="${1-v1.10.2}"
trap "cleanup" EXIT INT TERM
docker image build --build-arg GIT_TAG="$git_tag" --tag="$build_image" "${BASH_SOURCE%/*}/centos7-aarch64"
docker container create --name "$build_container" "$build_image"
docker cp "$build_container:/ninja/ninja" "ninja"
FROM kitware/cmake:build-linux-aarch64-base-2020-12-21
ARG GIT_TAG=v1.10.2
COPY /root/
RUN scl enable devtoolset-7 -- sh /root/ $GIT_TAG
set -e
git clone
cd ninja
git checkout "${1-v1.10.2}"
./ --bootstrap
./ninja all
strip ninja
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment