test build
This commit is contained in:
@@ -1,6 +1,54 @@
|
|||||||
steps:
|
pipeline:
|
||||||
build:
|
linux-build:
|
||||||
image: alpine
|
image: ubuntu:22.04
|
||||||
|
environment:
|
||||||
|
VERSION: ${CI_COMMIT_TAG}
|
||||||
commands:
|
commands:
|
||||||
- echo "Fig CI Works!"
|
- apt update
|
||||||
- uname -a
|
- 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
|
||||||
|
|||||||
Reference in New Issue
Block a user