Compare commits

21 Commits

Author SHA1 Message Date
1d97069ebd [Fix] value库 double_from写错了靠
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-01-02 19:28:20 +08:00
6423d844e0 [pwp] w~ 2026-01-02 18:44:41 +08:00
65324d935d iam tired ddd
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-01-02 17:58:50 +08:00
8981d55641 iam tired
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-01-02 17:37:53 +08:00
f3492a4d28 cnm 2026-01-02 17:37:00 +08:00
a1aea72a45 test www 2026-01-02 17:35:47 +08:00
9cee00ac61 test ! 2026-01-02 17:33:52 +08:00
c397859ae0 test 7 2026-01-02 17:32:15 +08:00
59ba60567f test 6 2026-01-02 17:31:02 +08:00
c2c25c13b3 test 5 2026-01-02 17:29:50 +08:00
41f8201b36 test 4
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-01-02 16:59:32 +08:00
6d557622b9 test 3 2026-01-02 16:57:05 +08:00
4dca435307 test build again! again! 2026-01-02 16:48:10 +08:00
3252344911 test build again! 2026-01-02 16:37:53 +08:00
6ca33f9b05 test build 2026-01-02 16:36:33 +08:00
3e8946fac7 修正xmake.lua
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-02 16:32:26 +08:00
29d46a0cf4 test build again!
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful
2026-01-02 15:40:41 +08:00
281ae3e008 test build 2026-01-02 15:39:47 +08:00
07d9e5543b 测试构建 2026-01-02 15:37:21 +08:00
20094dbcac 迁移
Some checks are pending
Build and Release / version-info (push) Waiting to run
Build and Release / build-linux (aarch64, debug) (push) Blocked by required conditions
Build and Release / build-linux (aarch64, release) (push) Blocked by required conditions
Build and Release / build-linux (x86_64, debug) (push) Blocked by required conditions
Build and Release / build-linux (x86_64, release) (push) Blocked by required conditions
Build and Release / build-windows (x64, debug) (push) Blocked by required conditions
Build and Release / build-windows (x64, release) (push) Blocked by required conditions
Build and Release / build-windows (x86, debug) (push) Blocked by required conditions
Build and Release / build-windows (x86, release) (push) Blocked by required conditions
Build and Release / build-macos (arm64, debug) (push) Blocked by required conditions
Build and Release / build-macos (arm64, release) (push) Blocked by required conditions
Build and Release / build-macos (x86_64, debug) (push) Blocked by required conditions
Build and Release / build-macos (x86_64, release) (push) Blocked by required conditions
Build and Release / build-cross-platform (android) (push) Blocked by required conditions
Build and Release / build-cross-platform (ios) (push) Blocked by required conditions
Build and Release / build-cross-platform (mingw) (push) Blocked by required conditions
Build and Release / create-release (push) Blocked by required conditions
2026-01-02 14:59:34 +08:00
3d58b7615f [FEAT] 测试Github Action构建 2026-01-02 13:18:57 +08:00
8 changed files with 83 additions and 9 deletions

60
.woodpecker.yml Normal file
View File

@@ -0,0 +1,60 @@
steps:
- name: build-cross
image: "ubuntu:24.04"
when:
event:
- push
- tag
environment:
SHELL: "/bin/bash"
commands:
# 使用国内源加速
- cp /etc/apt/sources.list /etc/apt/sources.list.backup
- |
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
- cp `/root/.xmake/bin/xmake u -o`/Fig dist/Fig-linux
# 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++
- /root/.xmake/bin/xmake -v
- cp `/root/.xmake/bin/xmake u -o`/Fig.exe dist/Fig-windows.exe
- name: gitea-release
image: "ubuntu:24.04"
when:
event:
- tag
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
commands:
- TAG=${DRONE_TAG}
- echo "Uploading Fig binaries for tag $TAG to Gitea"
# Linux binary
- |
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-F "name=Fig-linux" -F "file=@dist/Fig-linux" \
"https://git.fig-lang.cn/api/v1/repos/PuqiAR/Fig/releases/${TAG}/assets"
# Windows binary
- |
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-F "name=Fig-windows.exe" -F "file=@dist/Fig-windows.exe" \
"https://git.fig-lang.cn/api/v1/repos/PuqiAR/Fig/releases/${TAG}/assets"

View File

@@ -0,0 +1,3 @@
from tqdm import tqdm
import requests

View File

@@ -0,0 +1,2 @@
requests
tqdm

View File

@@ -1,5 +1,7 @@
# Fig Language - A Modern Scripting Language
The repository has been migrated from github! No more updates. New repository: [Fig](https://git.fig-lang.cn/PuqiAR/Fig)
[简体中文](README_ZH-CN.md "Chinese version")
**Fig** is a statically-typed, expression-oriented programming language designed for clarity, safety, and modern development practices. With features inspired by Go, Rust, and JavaScript, Fig aims to provide a productive development experience while maintaining strong type safety.

View File

@@ -1,5 +1,7 @@
# Fig 语言 - 现代脚本语言
仓库已从github迁移不再更新新的仓库: [Fig](https://git.fig-lang.cn/PuqiAR/Fig)
[English](README.md "英文版本")
**Fig** 是一种静态类型、面向表达式的编程语言专为清晰性、安全性和现代开发实践而设计。Fig 融合了 Go、Rust 和 JavaScript 的灵感,旨在提供高效的开发体验,同时保持强大的类型安全。

View File

@@ -38,6 +38,7 @@ public func double_parse(number: String) -> Double
public func double_from(number: Any) -> Any
{
var ntype := type(number);
if ntype == "Int" or ntype == "Bool"
{
return __fvalue_double_from(number);

View File

@@ -22,7 +22,7 @@
| / | '. | '. | | \'. __// \ \._,\ '/| | | | \'. __// ' .'| '/\ \._,\ '/\'. __//
`'-' '---' '---' |_| `'---' `--' `" '--' '--' `'---' `-' `--' `--' `" `'---'
Copyright (C) 2020-2025 PuqiAR
Copyright (C) 2020-2026 PuqiAR
This software is licensed under the MIT License. See LICENSE.txt for details.
*/

View File

@@ -5,13 +5,17 @@ set_policy("run.autobuild", false)
target("Fig")
set_kind("binary")
set_languages("c++23")
set_plat("mingw")
set_languages("c++23")
add_cxxflags("-static")
add_cxxflags("-stdlib=libc++")
add_ldflags("-Wl,--stack,268435456")
if is_plat("windows") then
set_plat("mingw")
end
if is_plat("mingw") then
add_cxxflags("-static")
add_cxxflags("-stdlib=libc++")
add_ldflags("-Wl,--stack,268435456")
end
add_files("src/main.cpp")
add_files("src/Core/warning.cpp")
@@ -19,9 +23,9 @@ target("Fig")
add_files("src/Lexer/lexer.cpp")
add_files("src/Parser/parser.cpp")
add_files("src/Value/value.cpp")
add_includedirs("src")
set_warnings("all")
add_defines("__FCORE_COMPILE_TIME=\"" .. os.date("%Y-%m-%d %H:%M:%S") .. "\"")
add_defines("__FCORE_COMPILE_TIME=\"" .. os.date("%Y-%m-%d %H:%M:%S") .. "\"")