This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
steps:
|
steps:
|
||||||
- name: build-cross
|
- name: build-cross
|
||||||
image: "ubuntu:24.04"
|
image: "xmake/xmake:ubuntu-latest"
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -8,35 +8,19 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
SHELL: "/bin/bash"
|
SHELL: "/bin/bash"
|
||||||
commands:
|
commands:
|
||||||
# 使用国内源加速
|
# Linux release build
|
||||||
- cp /etc/apt/sources.list /etc/apt/sources.list.backup
|
- xmake f -m release
|
||||||
- |
|
- xmake -v
|
||||||
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-get update -y
|
|
||||||
- apt-get install -y curl git build-essential clang llvm mingw-w64 ninja-build jq
|
|
||||||
|
|
||||||
# 安装 xmake
|
|
||||||
- curl -fsSL https://xmake.io/shget.text | bash
|
|
||||||
|
|
||||||
# 使用 xmake 绝对路径
|
|
||||||
- /root/.xmake/bin/xmake f -m release
|
|
||||||
- /root/.xmake/bin/xmake -v
|
|
||||||
- mkdir -p dist
|
- mkdir -p dist
|
||||||
- cp `/root/.xmake/bin/xmake u -o`/Fig dist/Fig-linux
|
- cp `xmake u -o`/Fig dist/Fig-linux
|
||||||
|
|
||||||
# Windows cross-build
|
# Windows cross-build
|
||||||
- /root/.xmake/bin/xmake f -m release --plat=windows --arch=x86_64 --cc=x86_64-w64-mingw32-g++ --cxx=x86_64-w64-mingw32-g++
|
- xmake f -m release --plat=windows --arch=x86_64 --cc=x86_64-w64-mingw32-g++ --cxx=x86_64-w64-mingw32-g++
|
||||||
- /root/.xmake/bin/xmake -v
|
- xmake -v
|
||||||
- cp `/root/.xmake/bin/xmake u -o`/Fig.exe dist/Fig-windows.exe
|
- cp `xmake u -o`/Fig.exe dist/Fig-windows.exe
|
||||||
|
|
||||||
- name: gitea-release
|
- name: gitea-release
|
||||||
image: "ubuntu:24.04"
|
image: "xmake/xmake:ubuntu-latest"
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|||||||
Reference in New Issue
Block a user