Skip to content

Commit 6e3b465

Browse files
committed
Merge branch 'main-dev' of https://github.com/ashvardanian/fork_union into main-dev
2 parents d9dd0c4 + 39d6839 commit 6e3b465

File tree

18 files changed

+735
-392
lines changed

18 files changed

+735
-392
lines changed

.clang-tidy

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
Checks: >
3+
bugprone-*,
4+
cert-dcl37-c,
5+
cert-dcl51-cpp,
6+
performance-*,
7+
-bugprone-easily-swappable-parameters,
8+
-bugprone-narrowing-conversions,
9+
-bugprone-signed-char-misuse,
10+
-bugprone-unhandled-self-assignment,
11+
-bugprone-macro-parentheses,
12+
-performance-avoid-endl,
13+
modernize-use-nullptr,
14+
readability-redundant-control-flow
15+
16+
CheckOptions:
17+
- key: performance-unnecessary-value-param.AllowedTypes
18+
value: 'std::shared_ptr;std::unique_ptr'
19+
20+
HeaderFilterRegex: '.*'
21+
FormatStyle: file

.github/workflows/prerelease.yml

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323
with:
2424
fetch-depth: 0
2525
persist-credentials: false
@@ -31,6 +31,9 @@ jobs:
3131
update-version-in: |
3232
CMakeLists.txt:^\s*VERSION (\d+\.\d+\.\d+)
3333
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
34+
README.md:^\s*GIT_TAG v(\d+\.\d+\.\d+)
35+
README.md:^\s*fork_union\s*=\s*"(\d+\.\d+\.\d+)"
36+
README.md:^\s*fork_union\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
3437
update-major-version-in: |
3538
include/fork_union.hpp:^#define FORK_UNION_VERSION_MAJOR (\d+)
3639
update-minor-version-in: |
@@ -40,29 +43,27 @@ jobs:
4043
dry-run: "true"
4144

4245
test_ubuntu_gcc:
43-
name: Ubuntu (GCC 14)
46+
name: Ubuntu (GCC)
4447
runs-on: ubuntu-24.04
4548
env:
4649
CC: gcc
4750
CXX: g++
4851

4952
steps:
50-
- uses: actions/checkout@v4
51-
- run: git submodule update --init --recursive
53+
- name: Checkout
54+
uses: actions/checkout@v5
5255

53-
# C/C++
5456
- name: Build C/C++
5557
run: |
5658
sudo apt update
57-
sudo apt install -y cmake build-essential libomp-dev gcc-12 g++-12
59+
sudo apt install -y cmake build-essential libomp-dev
5860
cmake -B build_artifacts -D CMAKE_BUILD_TYPE=RelWithDebInfo
5961
cmake --build build_artifacts --config RelWithDebInfo
6062
- name: Test C++
6163
run: |
62-
build_artifacts/scripts/fork_union_test_cpp17
63-
build_artifacts/scripts/fork_union_test_cpp20
64+
build_artifacts/fork_union_test_cpp17
65+
build_artifacts/fork_union_test_cpp20
6466
65-
# Rust
6667
- name: Set up Rust
6768
run: |
6869
rustup update stable
@@ -74,18 +75,17 @@ jobs:
7475
run: cargo test
7576

7677
test_ubuntu_clang:
77-
name: Ubuntu (Clang 18)
78+
name: Ubuntu (Clang)
7879
runs-on: ubuntu-24.04
7980
env:
8081
CC: clang
8182
CXX: clang++
8283

8384
steps:
84-
- uses: actions/checkout@v4
85-
- run: git submodule update --init --recursive
85+
- name: Checkout
86+
uses: actions/checkout@v5
8687

8788
# C/C++
88-
# Clang 16 isn't available from default repos on Ubuntu 22.04, so we have to install it manually
8989
- name: Build C/C++
9090
run: |
9191
sudo apt update
@@ -94,10 +94,9 @@ jobs:
9494
cmake --build build_artifacts --config RelWithDebInfo
9595
- name: Test C++
9696
run: |
97-
build_artifacts/scripts/fork_union_test_cpp17
98-
build_artifacts/scripts/fork_union_test_cpp20
97+
build_artifacts/fork_union_test_cpp17
98+
build_artifacts/fork_union_test_cpp20
9999
100-
# Rust
101100
- name: Set up Rust
102101
run: |
103102
rustup update stable
@@ -113,10 +112,9 @@ jobs:
113112
runs-on: macos-14
114113

115114
steps:
116-
- uses: actions/checkout@v4
117-
- run: git submodule update --init --recursive
115+
- name: Checkout
116+
uses: actions/checkout@v5
118117

119-
# C/C++
120118
- name: Build C/C++
121119
run: |
122120
brew update
@@ -125,10 +123,9 @@ jobs:
125123
cmake --build build_artifacts --config RelWithDebInfo
126124
- name: Test C++
127125
run: |
128-
build_artifacts/scripts/fork_union_test_cpp17
129-
build_artifacts/scripts/fork_union_test_cpp20
126+
build_artifacts/fork_union_test_cpp17
127+
build_artifacts/fork_union_test_cpp20
130128
131-
# Rust
132129
- name: Set up Rust
133130
run: |
134131
rustup update stable
@@ -143,21 +140,21 @@ jobs:
143140
name: Windows
144141
runs-on: windows-2022
145142
steps:
146-
- uses: actions/checkout@v4
147-
- run: git submodule update --init --recursive
143+
- name: Checkout
144+
uses: actions/checkout@v5
148145

149-
# C/C++
150146
- name: Build C/C++
151147
run: |
152148
choco install cmake
153149
cmake -B build_artifacts -D CMAKE_BUILD_TYPE=RelWithDebInfo
154150
cmake --build build_artifacts --config RelWithDebInfo
151+
- name: List build artifacts
152+
run: Get-ChildItem -Recurse .\build_artifacts
155153
- name: Test C++
156154
run: |
157-
.\build_artifacts\scripts\fork_union_test_cpp17.exe
158-
.\build_artifacts\scripts\fork_union_test_cpp20.exe
155+
.\build_artifacts\fork_union_test_cpp17.exe
156+
.\build_artifacts\fork_union_test_cpp20.exe
159157
160-
# Rust
161158
- name: Set up Rust
162159
run: |
163160
rustup update stable

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-24.04
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
fetch-depth: 0
2828
persist-credentials: false
@@ -34,6 +34,9 @@ jobs:
3434
update-version-in: |
3535
CMakeLists.txt:^\s*VERSION (\d+\.\d+\.\d+)
3636
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
37+
README.md:^\s*GIT_TAG v(\d+\.\d+\.\d+)
38+
README.md:^\s*fork_union\s*=\s*"(\d+\.\d+\.\d+)"
39+
README.md:^\s*fork_union\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
3740
update-major-version-in: |
3841
include/fork_union.hpp:^#define FORK_UNION_VERSION_MAJOR (\d+)
3942
update-minor-version-in: |
@@ -51,7 +54,7 @@ jobs:
5154
runs-on: ubuntu-22.04
5255
steps:
5356
- name: Checkout the latest code
54-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
5558
with:
5659
fetch-depth: 0
5760

@@ -74,10 +77,10 @@ jobs:
7477
runs-on: ubuntu-24.04
7578
needs: versioning
7679
steps:
77-
- uses: actions/checkout@v4
80+
- uses: actions/checkout@v5
7881
with:
7982
ref: "main"
80-
- run: git submodule update --init --recursive
83+
8184
- uses: actions-rs/toolchain@v1
8285
with:
8386
toolchain: nightly

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333

3434
# Build directories
3535
build/
36+
build_test/
3637
build_debug/
3738
build_release/
39+
build_artifacts/
3840
Testing/
3941

4042
# Rust build artifacts

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "cppdbg",
1010
"request": "launch",
1111
"preLaunchTask": "Build: Debug with GDB",
12-
"program": "${workspaceFolder}/build_debug/scripts/fork_union_test_cpp20",
12+
"program": "${workspaceFolder}/build_debug/fork_union_test_cpp20",
1313
"cwd": "${workspaceFolder}",
1414
"args": [],
1515
"setupCommands": [
@@ -49,7 +49,7 @@
4949
"type": "cppdbg",
5050
"request": "launch",
5151
"preLaunchTask": "Build: Debug with LLDB",
52-
"program": "${workspaceFolder}/build_debug/scripts/fork_union_test_cpp20",
52+
"program": "${workspaceFolder}/build_debug/fork_union_test_cpp20",
5353
"cwd": "${workspaceFolder}",
5454
"args": [],
5555
"setupCommands": [
@@ -78,7 +78,7 @@
7878
"type": "cppdbg",
7979
"request": "launch",
8080
"preLaunchTask": "Build: Debug with GDB",
81-
"program": "${workspaceFolder}/build_debug/scripts/fork_union_nbody",
81+
"program": "${workspaceFolder}/build_debug/fork_union_nbody",
8282
"cwd": "${workspaceFolder}",
8383
"args": [],
8484
"setupCommands": [

0 commit comments

Comments
 (0)