From 6ca33f9b0523692b0a3546020ab4da3d23ed11f3 Mon Sep 17 00:00:00 2001 From: PuqiAR Date: Fri, 2 Jan 2026 16:36:33 +0800 Subject: [PATCH] test build --- .woodpecker.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 5fc52a6..7f3cd06 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,54 @@ -steps: - build: - image: alpine +pipeline: + linux-build: + image: ubuntu:22.04 + environment: + VERSION: ${CI_COMMIT_TAG} commands: - - echo "Fig CI Works!" - - uname -a + - apt update + - apt install -y git build-essential wget unzip + - wget https://xmake.io/shget.text -O - | bash + - export PATH=~/.local/bin:$PATH + - xmake --version + + # 构建 + - xmake f -m release + - xmake + + # 输出目录 + - mkdir -p dist/Linux + - cp build/linux/x86_64/release/Fig dist/Linux/Fig + - cp -r src/Module/Library dist/Linux/Library + + # 打包 + - cd dist + - tar -czf Fig-${VERSION}-linux-x86_64.tar.gz Linux + + when: + event: tag + + windows-build: + image: mcr.microsoft.com/windows/servercore:ltsc2022 + platform: windows + environment: + VERSION: ${CI_COMMIT_TAG} + commands: + - choco install -y git + - choco install -y xmake + - refreshenv + - xmake --version + + # 构建 + - xmake f -m release + - xmake + + # 输出 + - mkdir dist + - mkdir dist\\Windows + - copy build\\windows\\x86_64\\release\\Fig.exe dist\\Windows\\Fig.exe + - xcopy src\\Module\\Library dist\\Windows\\Library /E /I + + # 打包 + - powershell -command "Compress-Archive dist\\Windows Fig-$env:VERSION-windows-x86_64.zip" + + when: + event: tag