Skip to content

Commit bfd40d2

Browse files
committed
Merge branch 'release/2.x' into dev
2 parents 009b967 + 378a339 commit bfd40d2

File tree

11 files changed

+241
-135
lines changed

11 files changed

+241
-135
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- '**/*.md.in'
1111
- 'docs/**'
1212
- '.github/workflows/publish.yml'
13+
- '.github/workflows/debian.yml'
1314
- 'tools/ci/make-pkg.ps1'
1415
pull_request:
1516
types: [opened, synchronize, reopened]

.github/workflows/debian.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow require self-hosted by @halx99 personal machine, so only support trigger manually
2+
name: debian
3+
4+
on:
5+
push:
6+
branches:
7+
- dev
8+
- release/*
9+
paths:
10+
- '.github/workflows/debian.yml'
11+
workflow_dispatch:
12+
inputs:
13+
cxxstd:
14+
# actions run ID
15+
description: 'Please input cxxstd, example: 20'
16+
# Default value if no value is explicitly provided
17+
default: '20'
18+
# Input has to be provided for the workflow to run
19+
required: false
20+
21+
env:
22+
__1K_CXXSTD: '${{ inputs.cxxstd }}'
23+
24+
run-name: 'build@c++${{ inputs.cxxstd || 20 }}'
25+
26+
jobs:
27+
debian-ogl:
28+
runs-on: debian-12
29+
steps:
30+
- uses: actions/checkout@v6
31+
32+
- name: Install dependencies
33+
run: |
34+
AX_ROOT=`pwd`
35+
echo -e "y" | pwsh $AX_ROOT/setup.ps1
36+
37+
- name: Build
38+
shell: pwsh
39+
run: ./tools/cmdline/axmol -p linux -a x64 -t 'cpp-tests,lua-tests' && ./tools/cmdline/axmol run -p linux -a x64 -t unit-tests -wait

.github/workflows/genbindings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- 'docs/**'
1212
- '.github/workflows/publish.yml'
1313
- 'tools/ci/make-pkg.ps1'
14+
- '.github/workflows/debian.yml'
1415

1516
workflow_dispatch:
1617
jobs:

.github/workflows/publish.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,21 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v6
3030

31-
- name: Check release ver from input
32-
if: ${{ github.event.inputs.version != '' }}
31+
- name: Check release version
3332
id: check_ver
3433
shell: pwsh
3534
run: |
36-
$release_ver = '${{ github.event.inputs.version }}'
37-
echo "release_ver=$release_ver" >> ${env:GITHUB_OUTPUT}
38-
echo "release_ver=$release_ver" >> ${env:GITHUB_ENV}
39-
40-
- name: Check release ver from commits
41-
if: ${{ steps.check_ver.outputs.release_ver == '' }}
42-
shell: pwsh
43-
run: |
44-
# commit message template: Version 2.7.0
35+
# commit message template: Version 1.8.0
4536
$commit_msg = "$(git show -s --format=%s)"
46-
echo "commit_msg: $commit_msg"
47-
$matchInfo = [Regex]::Match($commit_msg, 'Version\s(\d+\.)+(-)?(\*|\d+)')
48-
if ($matchInfo.Success) { $matchInfo = [Regex]::Match($matchInfo.Value, '(\d+\.)+(-)?(\*|\d+)') }
49-
$release_ver = if($matchInfo.Success) { $matchInfo.Value.TrimStart('Version ') }
50-
echo "release_ver=$release_ver" >> ${env:GITHUB_ENV}
51-
52-
- name: Forward release ver to step make_pkg
53-
id: forward_ver
54-
shell: pwsh
55-
run: |
56-
echo "Forwarding release_ver=$env:release_ver ..."
57-
echo "release_ver=$env:release_ver" >> ${env:GITHUB_OUTPUT}
37+
echo "Parsing release version from commit message: $commit_msg"
38+
$matchInfo = [Regex]::Match($commit_msg, '^Version\s+(?<ver>\d+\.\d+\.\d+)$')
39+
if(!$matchInfo.Success) { $matchInfo = [Regex]::Match('${{github.event.inputs.version}}', '^(?<ver>\d+\.\d+\.\d+(-\w+)?)$') }
40+
if($matchInfo.Success) { $release_ver = $matchInfo.Groups['ver'].Value } else { $release_ver='' }
41+
echo "release_ver=$release_ver"
42+
echo "release_ver=$release_ver" >> ${env:GITHUB_OUTPUT}
5843
5944
- name: Make package
60-
if: ${{ steps.forward_ver.outputs.release_ver != '' }}
45+
if: ${{ steps.check_ver.outputs.release_ver != '' }}
6146
id: make_pkg
6247
# Some projects don't allow in-source building, so create a separate build directory
6348
# We'll use this as our working directory for all subsequent commands
@@ -69,7 +54,7 @@ jobs:
6954
axmol -xc '-DAX_WITH_LZ4=ON,-DAX_WITH_CARES=ON,-DAX_WITH_YAML_CPP=ON,-DAX_WITH_KCP=ON' -c
7055
$input_commitish = "${{ github.event.inputs.commitish }}"
7156
if (!$input_commitish) { $input_commitish = $(git -C $AX_ROOT branch --show-current) }
72-
./tools/ci/publish.ps1 -version "${{ steps.forward_ver.outputs.release_ver }}" -commitish $input_commitish
57+
./tools/ci/publish.ps1 -version "${{ steps.check_ver.outputs.release_ver }}" -commitish $input_commitish
7358
echo "commitish=$input_commitish" >> ${env:GITHUB_OUTPUT}
7459
7560
- name: Publish to github release page
@@ -78,7 +63,7 @@ jobs:
7863
with:
7964
tag_name: ${{ steps.make_pkg.outputs.release_tag }}
8065
name: ${{ steps.make_pkg.outputs.release_tag }}
81-
files: steps.make_pkg.outputs.release_pkg }}
66+
files: ${{ steps.make_pkg.outputs.release_pkg }}
8267
body_path: ${{ steps.make_pkg.outputs.release_note }}
8368
prerelease: ${{ steps.make_pkg.outputs.prerelease }}
8469
target_commitish: ${{ steps.make_pkg.outputs.commitish }}

1k/1kiss.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ function setup_nasm() {
11771177
}
11781178
elseif ($IsLinux) {
11791179
if ($(which dpkg)) {
1180-
sudo apt install nasm
1180+
sudo apt-get install -y nasm
11811181
}
11821182
}
11831183
elseif ($IsMacOS) {
@@ -1226,7 +1226,7 @@ function setup_unzip() {
12261226
if (!$unzip_cmd_info) {
12271227
if ($IsLinux) {
12281228
if ($(which dpkg)) {
1229-
sudo apt install unzip
1229+
sudo apt-get install -y unzip
12301230
}
12311231
elseif($(which pacman)) {
12321232
sudo pacman -S --needed --noconfirm unzip
@@ -1259,7 +1259,7 @@ function setup_7z() {
12591259
$1k.addpath($7z_bin)
12601260
}
12611261
elseif ($IsLinux) {
1262-
if ($(which dpkg)) { sudo apt install p7zip-full }
1262+
if ($(which dpkg)) { sudo apt-get install -y p7zip-full }
12631263
}
12641264
elseif ($IsMacOS) {
12651265
brew install p7zip

1k/install-pwsh.sh

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)