From c397859ae0321199149be61b4f6cf1c951903842 Mon Sep 17 00:00:00 2001 From: PuqiAR Date: Fri, 2 Jan 2026 17:32:15 +0800 Subject: [PATCH] test 7 --- .woodpecker.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index af6170a..e9636b9 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,27 +1,29 @@ -# Woodpecker CI for Fig language -# Linux + Windows cross compile -# 国内源 + apt cache,适合 WSL2 Docker Runner +# Woodpecker CI for Fig project +# WSL2 Docker Runner, Linux + Windows cross compile +# 国内源 + apt cache volumes: - name: apt-cache path: /var/cache/apt steps: - - name: build-and-cross + - name: build-cross image: ubuntu:24.04 volumes: - type: cache name: apt-cache path: /var/cache/apt commands: - # 换源加速 + # 国内源加速 - cp /etc/apt/sources.list /etc/apt/sources.list.bak - - echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" > /etc/apt/sources.list - - echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse" >> /etc/apt/sources.list - - echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse" >> /etc/apt/sources.list - - echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse" >> /etc/apt/sources.list + - | + cat << EOF > /etc/apt/sources.list + deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs) main restricted universe multiverse + deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse + deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse + deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse + EOF - # 安装依赖(apt cache 会复用) - apt-get update -y - apt-get install -y curl git build-essential clang llvm mingw-w64 ninja-build jq @@ -35,7 +37,7 @@ steps: - mkdir -p dist - cp `xmake u -o`/Fig dist/Fig-linux - # 构建 Windows release (cross compile) + # 构建 Windows release - xmake f -m release --plat=windows --arch=x86_64 --cc=x86_64-w64-mingw32-g++ --cxx=x86_64-w64-mingw32-g++ - xmake -v - cp `xmake u -o`/Fig.exe dist/Fig-windows.exe