CI:修复 github 被墙问题——用 gh-proxy 克隆 MOOS-IvP,apt 走阿里云镜像
build-test-deploy / ci (push) Has been cancelled

This commit is contained in:
zjk
2026-08-14 13:28:56 +08:00
parent 8d3bbfbf8c
commit 8fff86b9a3
2 changed files with 15 additions and 5 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ jobs:
#------------------------------------------------------------------- #-------------------------------------------------------------------
- name: Register QEMU for arm64 - name: Register QEMU for arm64
run: | 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) # Build the aarch64 CI image (MOOS-IvP + jsoncpp)
+13 -4
View File
@@ -4,6 +4,8 @@
# - Ubuntu 20.04 arm64 base (matches the target board) # - Ubuntu 20.04 arm64 base (matches the target board)
# - MOOS-IvP built from source and installed to /usr/local # - MOOS-IvP built from source and installed to /usr/local
# - jsoncpp (the only extra dep used by pPowerManger) # - 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 FROM arm64v8/ubuntu:20.04
@@ -11,9 +13,13 @@ FROM arm64v8/ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive 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 \ build-essential \
cmake \ cmake \
git \ git \
@@ -31,8 +37,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
WORKDIR /opt WORKDIR /opt
RUN git clone --depth 1 https://github.com/moos-ivp/moos-ivp.git && \ RUN git clone --depth 1 https://gh-proxy.com/https://github.com/moos-ivp/moos-ivp.git /opt/moos-ivp \
cd 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)" && \ ./build-moos.sh -m -j"$(nproc)" && \
make -C build/MOOS/MOOSCore install && \ make -C build/MOOS/MOOSCore install && \
make -C build/MOOS/MOOSGeodesy install && \ make -C build/MOOS/MOOSGeodesy install && \