From 8fff86b9a332771a290995df9227c918950c548d Mon Sep 17 00:00:00 2001 From: zjk <1553836110@qq.com> Date: Fri, 14 Aug 2026 13:28:56 +0800 Subject: [PATCH] =?UTF-8?q?CI=EF=BC=9A=E4=BF=AE=E5=A4=8D=20github=20?= =?UTF-8?q?=E8=A2=AB=E5=A2=99=E9=97=AE=E9=A2=98=E2=80=94=E2=80=94=E7=94=A8?= =?UTF-8?q?=20gh-proxy=20=E5=85=8B=E9=9A=86=20MOOS-IvP=EF=BC=8Capt=20?= =?UTF-8?q?=E8=B5=B0=E9=98=BF=E9=87=8C=E4=BA=91=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 3 ++- ci/Dockerfile | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 268af6f..316efd7 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -52,7 +52,8 @@ jobs: #------------------------------------------------------------------- - name: Register QEMU for arm64 run: | - docker run --rm --privileged tonistiigi/binfmt --install arm64 + docker run --rm --privileged tonistiigi/binfmt --install arm64 \ + || docker run --rm --privileged docker.m.daocloud.io/tonistiigi/binfmt --install arm64 #------------------------------------------------------------------- # Build the aarch64 CI image (MOOS-IvP + jsoncpp) diff --git a/ci/Dockerfile b/ci/Dockerfile index 4ed0f65..63d56ef 100755 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -4,6 +4,8 @@ # - Ubuntu 20.04 arm64 base (matches the target board) # - MOOS-IvP built from source and installed to /usr/local # - jsoncpp (the only extra dep used by pPowerManger) +# NOTE: github.com is unreachable from the CN runner, so MOOS-IvP +# is cloned via a github proxy with fallbacks. #======================================================================= FROM arm64v8/ubuntu:20.04 @@ -11,9 +13,13 @@ FROM arm64v8/ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive #----------------------------------------------------------------------- -# System toolchain + dependencies +# Use Aliyun mirror for apt (faster from CN) then install toolchain #----------------------------------------------------------------------- -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN sed -i \ + -e 's|http://ports.ubuntu.com/ubuntu-ports|http://mirrors.aliyun.com/ubuntu-ports|g' \ + -e 's|http://archive.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ @@ -31,8 +37,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ #----------------------------------------------------------------------- WORKDIR /opt -RUN git clone --depth 1 https://github.com/moos-ivp/moos-ivp.git && \ - cd moos-ivp && \ +RUN git clone --depth 1 https://gh-proxy.com/https://github.com/moos-ivp/moos-ivp.git /opt/moos-ivp \ + || git clone --depth 1 https://ghfast.top/https://github.com/moos-ivp/moos-ivp.git /opt/moos-ivp \ + || git clone --depth 1 https://github.com/moos-ivp/moos-ivp.git /opt/moos-ivp + +RUN cd /opt/moos-ivp && \ ./build-moos.sh -m -j"$(nproc)" && \ make -C build/MOOS/MOOSCore install && \ make -C build/MOOS/MOOSGeodesy install && \