test build again!

This commit is contained in:
2026-01-02 16:37:53 +08:00
parent 6ca33f9b05
commit 3252344911

View File

@@ -1,54 +1,41 @@
pipeline: when:
event: tag
steps:
linux-build: linux-build:
image: ubuntu:22.04 when:
platform: linux
image: debian:stable
environment: environment:
VERSION: ${CI_COMMIT_TAG} VERSION: ${CI_COMMIT_TAG}
commands: commands:
- apt update - apt update
- apt install -y git build-essential wget unzip - apt install -y git build-essential curl xz-utils
- wget https://xmake.io/shget.text -O - | bash - curl -fsSL https://xmake.io/shget.text | bash
- export PATH=~/.local/bin:$PATH - export PATH=$PATH:/root/.xmake
- xmake --version - xmake --version
# 构建
- xmake f -m release - xmake f -m release
- xmake - xmake
- mkdir -p dist/linux
# 输出目录 - cp build/linux/x64/release/Fig dist/linux/
- mkdir -p dist/Linux - cp -r src/Module/Library dist/linux/Library
- cp build/linux/x86_64/release/Fig dist/Linux/Fig
- cp -r src/Module/Library dist/Linux/Library
# 打包
- cd dist - cd dist
- tar -czf Fig-${VERSION}-linux-x86_64.tar.gz Linux - tar -czf Fig-${VERSION}-linux.tar.gz linux
when:
event: tag
windows-build: windows-build:
image: mcr.microsoft.com/windows/servercore:ltsc2022 when:
platform: windows platform: windows
environment: environment:
VERSION: ${CI_COMMIT_TAG} VERSION: ${CI_COMMIT_TAG}
commands: commands:
- choco install -y git - choco install -y git
- choco install -y xmake - choco install -y xmake
- refreshenv - refreshenv
- xmake --version
# 构建
- xmake f -m release - xmake f -m release
- xmake - xmake
# 输出
- mkdir dist - mkdir dist
- mkdir dist\\Windows - mkdir dist/windows
- copy build\\windows\\x86_64\\release\\Fig.exe dist\\Windows\\Fig.exe - copy build\windows\x64\release\Fig.exe dist\windows\
- xcopy src\\Module\\Library dist\\Windows\\Library /E /I - xcopy src\Module\Library dist\windows\Library /E /I
- powershell Compress-Archive dist/windows Fig-%VERSION%-windows.zip
# 打包
- powershell -command "Compress-Archive dist\\Windows Fig-$env:VERSION-windows-x86_64.zip"
when:
event: tag