Skip to content

Commit 77b5e29

Browse files
committed
Fix: CI error
1 parent 7bac928 commit 77b5e29

File tree

7 files changed

+58
-22
lines changed

7 files changed

+58
-22
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282

8383
yamllint:
8484
name: yamllint
85-
runs-on: ubuntu-20.04
85+
runs-on: ubuntu-latest
8686
steps:
8787
- name: Checkout repo
8888
uses: actions/checkout@v2
@@ -100,7 +100,7 @@ jobs:
100100

101101
shellcheck:
102102
name: shellcheck
103-
runs-on: ubuntu-20.04
103+
runs-on: ubuntu-latest
104104
steps:
105105
- name: Checkout repo
106106
uses: actions/checkout@v2

.github/workflows/release.yaml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,44 @@ jobs:
4747
mv Kdtree_UE${{ matrix.unreal_engine_version }}_${{ matrix.version }}.zip release-plugin-${{ matrix.version }}
4848
4949
- name: Upload artifact
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: Kdtree_${{ matrix.unreal_engine_version }}_${{ matrix.version }}
53+
path: "release-plugin-${{ matrix.version }}"
54+
55+
merge-plugin-pack:
56+
name: Merge packed plugins
57+
runs-on: ubuntu-latest
58+
needs: [plugin-pack]
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
version:
63+
["free", "full"]
64+
steps:
65+
- name: Download artifacts
66+
uses: actions/download-artifact@v4
67+
with:
68+
pattern: Kdtree_*_${{ matrix.version }}
69+
merge-multiple: true
70+
path: dist
71+
72+
- name: Move artifacts
73+
run: |
74+
mkdir release-plugin-${{ matrix.version }}
75+
mv dist/Kdtree_*_${{ matrix.version }}.zip release-plugin-${{ matrix.version }}
76+
77+
- name: Updload artifacts
78+
uses: actions/upload-artifact@v4
5179
with:
5280
name: Kdtree_${{ matrix.version }}
5381
path: "release-plugin-${{ matrix.version }}"
5482

83+
- name: Delete unused artifacts
84+
uses: geekyeggo/delete-artifact@v5
85+
with:
86+
name: Kdtree_*_${{ matrix.version }}
87+
5588
sample-pack:
5689
name: Pack sample sources
5790
runs-on: ubuntu-latest
@@ -66,21 +99,21 @@ jobs:
6699
mv samples/SampleProject.zip release-sample
67100
68101
- name: Upload artifact
69-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
70103
with:
71104
name: SampleProject
72105
path: "release-sample"
73106

74107
publish:
75108
name: Publish
76-
needs: [plugin-pack, sample-pack]
109+
needs: [merge-plugin-pack, sample-pack]
77110
if: startsWith(github.ref, 'refs/tags/v')
78111
runs-on: ubuntu-latest
79112
steps:
80113
- name: Checkout repo
81114
uses: actions/checkout@v2
82115
- name: Fetch Artifacts
83-
uses: actions/download-artifact@v3
116+
uses: actions/download-artifact@v4
84117
with:
85118
path: dist
86119
- name: Install hub command

Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ class FCollectFromKdtreeBoxAction : public FPendingLatentAction
195195
FLatentActionInfo LatentInfo;
196196
FAsyncTask<FCollectFromKdtreeBoxTask>* Task;
197197

198-
FCollectFromKdtreeBoxAction(const FLatentActionInfo& InLatentInfo, const FKdtree* Tree, const FBox Box,
199-
TArray<int>* Indices, TArray<FVector>* Data)
198+
FCollectFromKdtreeBoxAction(
199+
const FLatentActionInfo& InLatentInfo, const FKdtree* Tree, const FBox Box, TArray<int>* Indices, TArray<FVector>* Data)
200200
: LatentInfo(InLatentInfo), Task(nullptr)
201201
{
202202
FCollectFromKdtreeBoxTaskParams Params;

Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ void UKdtreeBPLibrary::CollectFromKdtree(
3636
}
3737
}
3838

39-
void UKdtreeBPLibrary::CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices,
40-
TArray<FVector>& Data)
39+
void UKdtreeBPLibrary::CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data)
4140
{
4241
KdtreeInternal::CollectFromKdtree(Tree.Internal, Box, &Indices);
4342
for (int Index = 0; Index < Indices.Num(); ++Index)

Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ void QuickSelect(T* First, T* Nth, T* Last, TFunctionRef<int(T, T)> Comparator)
3434

3535
while (Left <= Right)
3636
{
37-
while (Left <= Right && Comparator(*Left, *Pivot) == 1) Left++;
38-
while (Left <= Right && Comparator(*Right, *Pivot) == -1) Right--;
37+
while (Left <= Right && Comparator(*Left, *Pivot) == 1)
38+
{
39+
Left++;
40+
}
41+
while (Left <= Right && Comparator(*Right, *Pivot) == -1)
42+
{
43+
Right--;
44+
}
3945
if (Left <= Right)
4046
{
4147
Swap(Left, Right);
@@ -235,8 +241,7 @@ void CollectFromKdtree(
235241
}
236242
}
237243

238-
void CollectFromKdtree(
239-
const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FBox& Box, TArray<int>* Result)
244+
void CollectFromKdtree(const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FBox& Box, TArray<int>* Result)
240245
{
241246
if (Node == nullptr)
242247
{
@@ -259,7 +264,7 @@ void CollectFromKdtree(
259264
CollectFromKdtree(Tree, Node->ChildRight, Box, Result);
260265
}
261266
}
262-
} // namespace
267+
} // namespace
263268

264269
void BuildKdtree(FKdtreeInternal* Tree, const TArray<FVector>& Data)
265270
{

Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class KDTREE_API UAsyncKdtreeBPLibrary : public UBlueprintFunctionLibrary
3737
TArray<int>& Indices, TArray<FVector>& Data, FLatentActionInfo LatentInfo);
3838

3939
UFUNCTION(BlueprintCallable,
40-
meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject",
41-
DefaultToSelf = "WorldContextObject"),
42-
Category = "SpacialDataStructure|kd-tree", DisplayName= "Collect From Kdtree Async (Box)")
40+
meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject",
41+
DefaultToSelf = "WorldContextObject"),
42+
Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree Async (Box)")
4343
static void CollectFromKdtreeAsyncBox(const UObject* WorldContextObject, const FKdtree& Tree, const FBox Box,
4444
TArray<int>& Indices, TArray<FVector>& Data, FLatentActionInfo LatentInfo);
4545
};

Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ class KDTREE_API UKdtreeBPLibrary : public UBlueprintFunctionLibrary
2828
UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree")
2929
static void ClearKdtree(UPARAM(ref) FKdtree& Tree);
3030

31-
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Sphere)")
31+
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree (Sphere)")
3232
static void CollectFromKdtree(
3333
const FKdtree& Tree, const FVector Center, float Radius, TArray<int>& Indices, TArray<FVector>& Data);
3434

35-
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Box)")
36-
static void CollectFromKdtreeBox(
37-
const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data);
35+
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree (Box)")
36+
static void CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data);
3837

3938
UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree")
4039
static void ValidateKdtree(const FKdtree& Tree);

0 commit comments

Comments
 (0)