test 7
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user