Skip to content

Commit 8283bd7

Browse files
committed
Fix genbindings CI
1 parent 14c724a commit 8283bd7

File tree

4 files changed

+27
-20
lines changed

4 files changed

+27
-20
lines changed

.github/workflows/genbindings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- uses: actions/checkout@v6
2323

2424
- name: Setup Python
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v6
2626
with:
27-
python-version: '3.11.5'
27+
python-version: '3.12.10' # python-3.12 is last release that support axmol traditional binding generator
2828

2929
- name: Genbindings
3030
run: tools\ci\genbindings.ps1

1k/1kiss.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ function setup_7z() {
12361236
if (!$7z_cmd_info) {
12371237
if ($IsWin) {
12381238
$7z_ver = '2501'
1239-
$7z_prog = Join-Path $install_prefix '7z$7z_ver-x64/7z.exe'
1239+
$7z_prog = Join-Path $install_prefix "7z$7z_ver-x64/7z.exe"
12401240
if (!$1k.isfile($7z_prog)) {
12411241
fetch_pkg $(devtool_url '7zip' $7z_ver)
12421242
}

1k/mirrors.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@
8585
"gitee": "https://gitee.com/simdsoft/1kiss/releases/download/devtools/"
8686
}
8787
},
88+
"libclang": {
89+
"artifacts": "llvm-${ver}.7z",
90+
"mirrors": {
91+
"origin": "https://github.com/simdsoft/1kiss/releases/download/devtools/",
92+
"gitee": "https://gitee.com/simdsoft/1kiss/releases/download/devtools/"
93+
}
94+
},
8895
"axslcc": {
8996
"artifacts": {
9097
"windows": "axslcc-${ver}-win64.zip",

tools/ci/genbindings.ps1

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,10 @@ if (($stage -band 1)) {
1010
Push-Location $AX_ROOT
1111
## setup ndk
1212
. ./setup.ps1 -p android
13+
echo "$ndk_root=$ndk_root"
1314
axmol -c
1415
Pop-Location
1516

16-
$pip_cmd = @('pip3', 'pip')[$IsWin]
17-
$python_cmd = @('python3', 'python')[$IsWin]
18-
19-
if($IsLinux -and $LinuxDistro -eq 'Debian')
20-
{
21-
sudo apt-get install -y python3-yaml python3-cheetah
22-
}
23-
else
24-
{
25-
&$pip_cmd install PyYAML Cheetah3
26-
}
27-
28-
echo "after setup py_ver: $(&$python_cmd -V), PATH=$env:PATH"
29-
30-
echo "$ndk_root=$ndk_root"
31-
3217
## setup llvm libclang.dll
3318
$llvm_ver_pred = $manifest['llvm'].Split('~')
3419
$llvm_ver = [Version]$llvm_ver_pred[$llvm_ver_pred.Count -gt 1].TrimLast('+')
@@ -55,7 +40,7 @@ if (($stage -band 1)) {
5540
$llvm_pkg = "llvm-$llvm_ver.7z"
5641

5742
$prefix = Join-Path $AX_ROOT "cache/devtools"
58-
$llvm_url = devtool_url $llvm_pkg
43+
$llvm_url = devtool_url 'libclang' $llvm_ver
5944
$llvm_out = Join-Path $prefix $llvm_pkg
6045

6146
$1k.mkdirs($prefix)
@@ -66,6 +51,21 @@ if (($stage -band 1)) {
6651
Copy-Item "$prefix/llvm-$llvm_ver/lib/$suffix" -Destination $lib_path
6752
}
6853

54+
# setup python pip extensions
55+
$pip_cmd = @('pip3', 'pip')[$IsWin]
56+
$python_cmd = @('python3', 'python')[$IsWin]
57+
58+
if($IsLinux -and $LinuxDistro -eq 'Debian')
59+
{
60+
sudo apt-get install -y python3-yaml python3-cheetah
61+
}
62+
else
63+
{
64+
&$pip_cmd install PyYAML Cheetah3
65+
}
66+
67+
echo "after setup py_ver: $(&$python_cmd -V), PATH=$env:PATH"
68+
6969
## ensure $env:AX_ROOT/axmol/axmolver.h exists
7070
echo "AX_ROOT=$AX_ROOT"
7171
if (!(Test-Path "$AX_ROOT/axmol/axmolver.h" -PathType Leaf)) {

0 commit comments

Comments
 (0)