Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1e15fe7
add winos.file_signature function to retrieve file signature information
luadebug Feb 15, 2026
1aa5aba
retry
luadebug Feb 15, 2026
84420e5
Try filter GCC.exe
luadebug Feb 15, 2026
a8a2c62
retry MinGW
luadebug Feb 15, 2026
8d8bcef
retry for mingw
luadebug Feb 15, 2026
227449f
Fix file_signature assignment in winos.lua
luadebug Feb 15, 2026
b82ccd6
Clear
luadebug Feb 15, 2026
fc17a30
revert
luadebug Feb 15, 2026
e7fe0d2
Test for find_program
luadebug Feb 15, 2026
af2c806
retry
luadebug Feb 15, 2026
0d4a423
wrap find_program
luadebug Feb 15, 2026
92cbb94
try improve wrapper. it wont work if we pass just gcc.exe instead of …
luadebug Feb 15, 2026
caf37bd
enhance signature check for gcc.exe to handle both absolute and relat…
luadebug Feb 15, 2026
f338f19
Update comment to include issue reference for gcc.exe
luadebug Feb 15, 2026
11cc0a0
try move into find_gcc
luadebug Feb 16, 2026
86b1f8b
try wrap to style
luadebug Feb 16, 2026
1ef8c05
retry find_gcc
luadebug Feb 16, 2026
f024c37
retry
luadebug Feb 16, 2026
56581ec
retry
luadebug Feb 16, 2026
530d874
retry
luadebug Feb 16, 2026
6a89f38
retry
luadebug Feb 16, 2026
994c838
todo
luadebug Feb 17, 2026
387e1c2
tb_wtoa
luadebug Feb 17, 2026
3774d82
clear
luadebug Feb 17, 2026
05ebd2e
revert ok, errors = sandbox.load(opt.check, program)
luadebug Feb 17, 2026
26d3ba6
try fix norunfile = true
luadebug Feb 17, 2026
0b9f1b8
todo
luadebug Feb 17, 2026
1e2596c
refactor: enhance gigabyte gcc check and integrate custom check option
luadebug Feb 17, 2026
4879e24
retry
luadebug Feb 17, 2026
ad77b2a
retry
luadebug Feb 17, 2026
451bdbc
retry
luadebug Feb 17, 2026
7d1fb07
retry
luadebug Feb 17, 2026
9105a6b
test
luadebug Feb 17, 2026
39aa24a
sigh
luadebug Feb 17, 2026
4ab3a06
sigh
luadebug Feb 17, 2026
3b4d1e1
try iterate over path env var
luadebug Feb 17, 2026
81cd229
retry
luadebug Feb 17, 2026
890c96a
retry?
luadebug Feb 18, 2026
3b5a2eb
retry?
luadebug Feb 18, 2026
d9d08b4
fixup
luadebug Feb 18, 2026
b065878
Update find_gcc.lua
waruqi Feb 19, 2026
cc3ccae
add haiku ci
waruqi Feb 13, 2026
4240000
enable force-utf8 for haiku
waruqi Feb 14, 2026
457b14d
update tbox
waruqi Feb 14, 2026
92048d4
update lower
waruqi Feb 14, 2026
e7837a8
fix ci
waruqi Feb 14, 2026
9e9906c
update tbox
waruqi Feb 14, 2026
d7ec0e8
update haiku ci
waruqi Feb 14, 2026
c055710
update haiku ci
waruqi Feb 14, 2026
373932b
fix builddir
waruqi Feb 14, 2026
175e26d
improve tests for haiku
waruqi Feb 15, 2026
d98330b
fix tmpdir for haiku
waruqi Feb 19, 2026
9f1c3a8
improve os.tmpdir
waruqi Feb 19, 2026
0b89554
update comments
waruqi Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: Alpine-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Alpine
cancel-in-progress: true
steps:
- name: Prepare build tools
run: |
Expand All @@ -88,4 +88,3 @@ jobs:
run: |
xmake lua -v -D tests/run.lua
xrepo --version

13 changes: 6 additions & 7 deletions .github/workflows/archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
script: |
const fs = require('fs');
const outputFile = process.env.GITHUB_OUTPUT;

// Always run for release events
if (context.eventName === 'release') {
fs.appendFileSync(outputFile, `should-run=true\n`);
core.info('Release event detected. Will run tests.');
return;
}

// Execution probability (default 20%, can be overridden via env)
const probability = parseFloat(process.env.RUN_PROBABILITY || '0.2');

// Generate deterministic "random" number based on commit SHA, run ID, and current time
// Adding time ensures better randomness while keeping same commit/run consistent
const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60)); // Round to hour for consistency
Expand All @@ -43,7 +43,7 @@ jobs:
// Normalize to 0-1 range
const random = Math.abs(hash) / 2147483647;
const shouldRun = random < probability;

// Use environment file instead of deprecated set-output
fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`);
if (shouldRun) {
Expand All @@ -63,8 +63,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: Archlinux-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Archlinux
cancel-in-progress: true
steps:
- name: Prepare build tools
run: |
Expand All @@ -90,4 +90,3 @@ jobs:
run: |
xmake lua -v -D tests/run.lua
xrepo --version

5 changes: 2 additions & 3 deletions .github/workflows/dragonflybsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: DragonflyBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-DragonflyBSD
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -84,4 +84,3 @@ jobs:
xrepo --version
xmake l os.meminfo
xmake lua -v -D tests/run.lua

5 changes: 2 additions & 3 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: Fedora-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Fedora
cancel-in-progress: true
steps:
- name: Prepare build tools
run: |
Expand All @@ -90,4 +90,3 @@ jobs:
run: |
xmake lua -v -D tests/run.lua
xrepo --version

8 changes: 4 additions & 4 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
script: |
const fs = require('fs');
const outputFile = process.env.GITHUB_OUTPUT;

// Always run for release events
if (context.eventName === 'release') {
fs.appendFileSync(outputFile, `should-run=true\n`);
core.info('Release event detected. Will run tests.');
return;
}

// Execution probability (default 50%, can be overridden via env)
const probability = parseFloat(process.env.RUN_PROBABILITY || '0.5');

// Generate deterministic "random" number based on commit SHA, run ID, and current time
// Adding time ensures better randomness while keeping same commit/run consistent
const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60)); // Round to hour for consistency
Expand All @@ -43,7 +43,7 @@ jobs:
// Normalize to 0-1 range
const random = Math.abs(hash) / 2147483647;
const shouldRun = random < probability;

// Use environment file instead of deprecated set-output
fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`);
if (shouldRun) {
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/haiku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Haiku

on:
pull_request:
push:
release:
types: [published]

jobs:
check:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.should-run }}
steps:
- name: Random execution check
id: check
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const outputFile = process.env.GITHUB_OUTPUT;

if (context.eventName === 'release') {
fs.appendFileSync(outputFile, `should-run=true\n`);
core.info('Release event detected. Will run tests.');
return;
}

const probability = parseFloat(process.env.RUN_PROBABILITY || '0.2');
const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60));
const seed = context.sha + context.runId + timeSeed;
let hash = 0;
for (let i = 0; i < seed.length; i++) {
const char = seed.charCodeAt(i);
hash = ((hash << 5) - hash) + char;
hash = hash | 0;
}
const random = Math.abs(hash) / 2147483647;
const shouldRun = random < probability;

fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`);
if (shouldRun) {
core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`);
} else {
core.info(`Random check failed (${(random * 100).toFixed(2)}% >= ${(probability * 100).toFixed(0)}%). Skipping.`);
}
env:
RUN_PROBABILITY: ${{ vars.HAIKU_RUN_PROBABILITY || '0.2' }}

build:
needs: check
if: needs.check.outputs.should-run == 'true'
runs-on: ubuntu-latest

concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Haiku
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Tests
uses: vmactions/haiku-vm@v1
with:
usesh: true
mem: 4096
copyback: false
prepare: |
pkgman install -y git curl unzip make bash perl
run: |
./configure --prefix=`pwd`/dist
make -j2
make install
export XMAKE_ROOT=y
export PATH=`pwd`/dist/bin:$PATH
xrepo --version
xmake lua -v -D tests/run.lua
5 changes: 2 additions & 3 deletions .github/workflows/linux_luajit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
runs-on: ubuntu-latest
concurrency:
# Prevent concurrent runs of the same workflow
group: Linux-Luajit-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Linux-Luajit
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -90,4 +90,3 @@ jobs:
run: |
xmake lua -v -D tests/run.lua
xrepo --version

5 changes: 2 additions & 3 deletions .github/workflows/netbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: NetBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-NetBSD
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -85,4 +85,3 @@ jobs:
xrepo --version
xmake l os.meminfo
xmake lua -v -D tests/run.lua

5 changes: 2 additions & 3 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: OpenBSD-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-OpenBSD
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -85,4 +85,3 @@ jobs:
xrepo --version
xmake l os.meminfo
xmake lua -v -D tests/run.lua

4 changes: 2 additions & 2 deletions .github/workflows/windows_luajit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:

concurrency:
# Prevent concurrent runs of the same workflow
group: Windows-Luajit-${{ github.event.repository.owner.login }}-${{ github.event.repository.name }}-${{ matrix.os }}-${{ matrix.arch }}
cancel-in-progress: false
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.arch }}-Windows-Luajit
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion core/src/cli/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ target("cli")

-- add links
if is_plat("windows") then
add_syslinks("ws2_32", "advapi32", "shell32")
add_syslinks("ws2_32", "advapi32", "shell32", "wintrust", "crypt32")
add_ldflags("/export:malloc", "/export:free", "/export:memmove")
elseif is_plat("android") then
add_syslinks("m", "c")
Expand Down
2 changes: 1 addition & 1 deletion core/src/cli/xmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ target "cli"
if is_plat "macosx" && is_config "runtime" "luajit"; then
add_ldflags "-all_load" "-pagezero_size 10000" "-image_base 100000000"
elif is_plat "mingw"; then
add_ldflags "-static-libgcc"
add_ldflags "-static-libgcc" "-lwintrust" "-lcrypt32"
fi

# add install files
Expand Down
2 changes: 1 addition & 1 deletion core/src/tbox/inc/haiku/tbox.config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/*#undef TB_CONFIG_MICRO_ENABLE*/
/*#undef TB_CONFIG_TYPE_HAVE_WCHAR*/
#define TB_CONFIG_TYPE_HAVE_FLOAT 1
/*#undef TB_CONFIG_FORCE_UTF8*/
#define TB_CONFIG_FORCE_UTF8 1
/*#undef TB_CONFIG_API_HAVE_DEPRECATED*/
/*#undef TB_CONFIG_EXCEPTION_ENABLE*/

Expand Down
2 changes: 1 addition & 1 deletion core/src/tbox/inc/iphoneos/tbox.config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/* #undef TB_CONFIG_MICRO_ENABLE */
/* #undef TB_CONFIG_TYPE_HAVE_WCHAR */
#define TB_CONFIG_TYPE_HAVE_FLOAT 1
/* #undef TB_CONFIG_FORCE_UTF8 */
#define TB_CONFIG_FORCE_UTF8 1
/* #undef TB_CONFIG_API_HAVE_DEPRECATED */
/* #undef TB_CONFIG_EXCEPTION_ENABLE */

Expand Down
2 changes: 1 addition & 1 deletion core/src/tbox/inc/solaris/tbox.config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/*#undef TB_CONFIG_MICRO_ENABLE*/
/*#undef TB_CONFIG_TYPE_HAVE_WCHAR*/
#define TB_CONFIG_TYPE_HAVE_FLOAT 1
/*#undef TB_CONFIG_FORCE_UTF8*/
#define TB_CONFIG_FORCE_UTF8 1
/*#undef TB_CONFIG_API_HAVE_DEPRECATED*/
/*#undef TB_CONFIG_EXCEPTION_ENABLE*/

Expand Down
2 changes: 2 additions & 0 deletions core/src/xmake/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ tb_int_t xm_winos_registry_values(lua_State *lua);
tb_int_t xm_winos_short_path(lua_State *lua);
tb_int_t xm_winos_processes(lua_State* lua);
tb_int_t xm_winos_set_error_mode(lua_State *lua);
tb_int_t xm_winos_file_signature(lua_State *lua);
#endif

// the utf8 functions
Expand Down Expand Up @@ -487,6 +488,7 @@ static luaL_Reg const g_winos_functions[] = {
{ "short_path", xm_winos_short_path },
{ "processes", xm_winos_processes },
{ "set_error_mode", xm_winos_set_error_mode },
{ "file_signature", xm_winos_file_signature },
{ tb_null, tb_null },
};
#endif
Expand Down
Loading
Loading