test build again! again!
This commit is contained in:
@@ -1,41 +1,52 @@
|
|||||||
when:
|
when:
|
||||||
event: tag
|
event:
|
||||||
|
include: [ tag ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
linux-build:
|
setup:
|
||||||
when:
|
|
||||||
platform: linux
|
|
||||||
image: debian:stable
|
image: debian:stable
|
||||||
environment:
|
|
||||||
VERSION: ${CI_COMMIT_TAG}
|
|
||||||
commands:
|
commands:
|
||||||
- apt update
|
- apt-get update
|
||||||
- apt install -y git build-essential curl xz-utils
|
- apt-get install -y xmake mingw-w64 zip git
|
||||||
- curl -fsSL https://xmake.io/shget.text | bash
|
|
||||||
- export PATH=$PATH:/root/.xmake
|
|
||||||
- xmake --version
|
- xmake --version
|
||||||
- xmake f -m release
|
|
||||||
|
# =========================
|
||||||
|
# Linux Build
|
||||||
|
# =========================
|
||||||
|
linux-build:
|
||||||
|
image: debian:stable
|
||||||
|
commands:
|
||||||
|
- xmake f -p linux -m release
|
||||||
- xmake
|
- xmake
|
||||||
- mkdir -p dist/linux
|
- mkdir -p dist/linux
|
||||||
- cp build/linux/x64/release/Fig dist/linux/
|
- cp build/linux/x86_64/release/Fig dist/linux/Fig
|
||||||
- cp -r src/Module/Library dist/linux/Library
|
- cp -r src/Module/Library dist/linux/Library
|
||||||
- cd dist
|
- cd dist && zip -r fig-linux-${CI_COMMIT_TAG}.zip linux
|
||||||
- tar -czf Fig-${VERSION}-linux.tar.gz linux
|
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# Windows (Mingw) Build
|
||||||
|
# =========================
|
||||||
windows-build:
|
windows-build:
|
||||||
when:
|
image: debian:stable
|
||||||
platform: windows
|
|
||||||
environment:
|
|
||||||
VERSION: ${CI_COMMIT_TAG}
|
|
||||||
commands:
|
commands:
|
||||||
- choco install -y git
|
- xmake f -p mingw -m release
|
||||||
- choco install -y xmake
|
|
||||||
- refreshenv
|
|
||||||
- xmake f -m release
|
|
||||||
- xmake
|
- xmake
|
||||||
- mkdir dist
|
- mkdir -p dist/windows
|
||||||
- mkdir dist/windows
|
- cp build/mingw/x86_64/release/Fig.exe dist/windows/Fig.exe
|
||||||
- copy build\windows\x64\release\Fig.exe dist\windows\
|
- cp -r src/Module/Library dist/windows/Library
|
||||||
- xcopy src\Module\Library dist\windows\Library /E /I
|
- cd dist && zip -r fig-windows-${CI_COMMIT_TAG}.zip windows
|
||||||
- powershell Compress-Archive dist/windows Fig-%VERSION%-windows.zip
|
|
||||||
|
# =========================
|
||||||
|
# Upload to Gitea Release
|
||||||
|
# =========================
|
||||||
|
release:
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: GITEA_TOKEN
|
||||||
|
base_url: https://git.fig-lang.cn
|
||||||
|
files:
|
||||||
|
- dist/fig-linux-${CI_COMMIT_TAG}.zip
|
||||||
|
- dist/fig-windows-${CI_COMMIT_TAG}.zip
|
||||||
|
note: "Automated build for ${CI_COMMIT_TAG}"
|
||||||
|
|||||||
@@ -5,10 +5,13 @@ set_policy("run.autobuild", false)
|
|||||||
|
|
||||||
target("Fig")
|
target("Fig")
|
||||||
set_kind("binary")
|
set_kind("binary")
|
||||||
set_languages("c++23")
|
set_languages("c++23")
|
||||||
|
|
||||||
if is_plat("windows") then
|
if is_plat("windows") then
|
||||||
set_plat("mingw")
|
set_plat("mingw")
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_plat("mingw") then
|
||||||
add_cxxflags("-static")
|
add_cxxflags("-static")
|
||||||
add_cxxflags("-stdlib=libc++")
|
add_cxxflags("-stdlib=libc++")
|
||||||
add_ldflags("-Wl,--stack,268435456")
|
add_ldflags("-Wl,--stack,268435456")
|
||||||
@@ -20,7 +23,7 @@ target("Fig")
|
|||||||
add_files("src/Lexer/lexer.cpp")
|
add_files("src/Lexer/lexer.cpp")
|
||||||
add_files("src/Parser/parser.cpp")
|
add_files("src/Parser/parser.cpp")
|
||||||
add_files("src/Value/value.cpp")
|
add_files("src/Value/value.cpp")
|
||||||
|
|
||||||
add_includedirs("src")
|
add_includedirs("src")
|
||||||
|
|
||||||
set_warnings("all")
|
set_warnings("all")
|
||||||
|
|||||||
Reference in New Issue
Block a user