Skip to content

Commit 1989645

Browse files
committed
feat: add python image/secret modules, update gitignore and CI workflows
1 parent d1058a5 commit 1989645

File tree

100 files changed

+10617
-1089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+10617
-1089
lines changed

.claude/settings.local.json

Lines changed: 9 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,17 @@
11
{
22
"permissions": {
33
"allow": [
4-
"Bash(cmake:*)",
5-
"Bash(xmake:*)",
6-
"Bash(pkg-config:*)",
7-
"Bash(pacman:*)",
8-
"Read(//d/msys64/mingw64/bin/**)",
9-
"Read(//d/msys64/mingw64/**)",
10-
"Bash(./scripts/build.sh:*)",
11-
"Read(//d/msys64/**)",
12-
"Bash(grep:*)",
13-
"Bash(g++:*)",
14-
"Bash(ninja:*)",
15-
"Bash(D:/msys64/usr/bin/pacman:*)",
16-
"Bash(find:*)",
17-
"Bash(./build/cmake-release/example/async/async_async_executor.exe:*)",
18-
"Bash(./async_async_executor.exe)",
19-
"Bash(./atom_async_tests.exe:*)",
20-
"Bash(make:*)",
21-
"Bash(mingw32-make:*)",
22-
"Bash(python:*)",
23-
"Bash(./cmake-release/example/components/components_command_dispatch_example.exe:*)",
24-
"Bash(timeout:*)",
25-
"Bash(./cmake-release/example/components/components_comprehensive_integration_example.exe:*)",
26-
"Bash(ldd:*)",
27-
"Bash(PATH:*)",
28-
"Bash(chmod:*)",
29-
"Bash(for:*)",
30-
"Bash(do if [ -f \"$file\" ])",
31-
"Bash(then echo \"✅ $file exists\")",
32-
"Bash(else echo \"❌ $file missing\")",
33-
"Bash(fi:*)",
34-
"Bash(done)",
35-
"Bash(rm:*)",
36-
"Bash(do basename:*)",
37-
"Bash(do echo:*)",
38-
"Bash(if [ -f \"tests/algorithm/*/test_$header.cpp\" ])",
39-
"Bash([:*)",
40-
"Bash(then echo \"\")",
41-
"Bash(else echo \"\")",
42-
"Bash(scriptsbuild.bat --release)",
43-
"Bash(\"scripts\\build.bat\" --release)",
44-
"Read(//d/Project/sast-readium/**)",
45-
"Bash(ctest:*)",
46-
"Bash(./application_controller_test.exe)",
4+
"Bash(uv venv:*)",
5+
"Bash(source .venv/Scripts/activate)",
6+
"Bash(uv pip install:*)",
477
"Bash(echo:*)",
48-
"Bash(python3:*)",
49-
"Bash(/dev/null)",
50-
"Bash(./test_status.sh:*)",
51-
"Bash(./scripts/run_tests.sh:*)",
52-
"Bash(mkdir:*)",
53-
"Bash(./example/algorithm/algorithm_crypto_md5.exe:*)",
54-
"Bash(cp:*)",
55-
"Bash(./example/algorithm/algorithm_utils_fnmatch.exe:*)",
56-
"Bash(./example/async/async_async_worker_basic.exe:*)",
57-
"Bash(./tests/run_all_tests.exe:*)",
58-
"Read(//d/Project/**)",
59-
"Bash(doxygen:*)",
60-
"Bash(scripts/build.bat:*)",
61-
"Bash(cat:*)",
62-
"Bash(./build/example/algorithm/algorithm_core_algorithm.exe:*)",
63-
"Bash(./build/example/algorithm/algorithm_crypto_md5.exe:*)",
64-
"Bash(./build/example/algorithm/algorithm_math_matrix.exe:*)",
65-
"Bash(./build/example/algorithm/algorithm_optimization_pathfinding.exe:*)",
66-
"Bash(./build/example/async/async_async_executor.exe)",
67-
"Bash(./build/example/async/async_timer.exe)",
68-
"Bash(./build/example/async/async_message_queue.exe:*)",
69-
"Bash(./build/example/async/async_pool.exe:*)",
70-
"Bash(./build/example/components/components_component_lifecycle.exe:*)",
71-
"Bash(./build/example/components/components_command_dispatch_example.exe:*)",
72-
"Bash(./build/example/containers/containers_containers_usage.exe)",
73-
"Bash(./build/example/sysinfo/sysinfo_memory_monitoring_example.exe)",
74-
"Bash(./build/example/secret/secret_secure_storage_example.exe)",
75-
"Bash(./tests/algorithm/atom_algorithm_tests.exe:*)",
76-
"Bash(PATH=\"./atom/error:./atom/log:./atom/algorithm:$PATH\" ./tests/algorithm/atom_algorithm_tests.exe:*)",
77-
"Bash(tree:*)",
78-
"Bash(./atom_algorithm_tests.exe:*)",
79-
"Bash(build/tests/algorithm/atom_algorithm_tests.exe)",
80-
"Bash(PATH=\"./atom/error:./atom/log:$PATH\" ./tests/algorithm/atom_algorithm_tests.exe:*)",
81-
"Bash(\"/d/Project/Atom/build/cmake-release/tests/async/atom_async_tests.exe\")",
82-
"Bash(\"/d/Project/Atom/build/cmake-release/example/async/async_generator.exe\")",
83-
"Bash(\"/d/Project/Atom/build/cmake-release/example/async/async_promise.exe\")",
84-
"Bash(\"/d/Project/Atom/build/cmake-release/example/async/async_queue.exe\")",
85-
"Bash(if [ -d \"build\" ])",
86-
"Bash(then rm -rf build)",
8+
"Bash(where:*)",
9+
"Bash(cmake --preset:*)",
10+
"Bash(cmake --build:*)",
8711
"Bash(tee:*)",
88-
"Bash(ls:*)",
89-
"Bash(sed:*)",
90-
"Bash(/c/Users/Max Qian/AppData/Local/Microsoft/WindowsApps/python3:*)",
91-
"Bash(/d/msys64/mingw64/bin/python3:*)",
92-
"Bash(do kill -9 $pid)",
93-
"Bash(git checkout:*)",
94-
"Bash(./test_image_blob.exe:*)",
95-
"Bash(./atom_image_tests.exe:*)",
96-
"Bash(do if [ -d \"$dir\" ])",
97-
"Bash(then cp -v build/atom/error/libatom-error.dll build/atom/log/libatom-log.dll build/atom/log/libloguru.dll build/atom/components/libatom-component.dll \"$dir\")",
98-
"Bash(./test_abi.exe:*)",
99-
"Bash(pkill:*)",
100-
"Bash(test:*)",
101-
"Bash(dir /s /b atomsystem*.hpp atomsystem*.h atomsystem*.cpp 2)",
102-
"Bash(nul)",
103-
"Bash(powershell:*)",
104-
"Bash(xargs:*)",
105-
"Bash(dir /s \"d:\\Project\\Atom\\python\\web\")",
106-
"Bash(bash scripts/build.sh:*)"
12+
"Bash(cmake:*)",
13+
"Bash(pacman -S:*)",
14+
"Bash(test:*)"
10715
],
10816
"deny": [],
10917
"ask": []

.github/workflows/ci.yml

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
name: Continuous Integration
23

3-
on:
4+
"on":
45
push:
56
branches: [main, develop]
67
pull_request:
@@ -114,6 +115,12 @@ jobs:
114115
build_preset: release-vs
115116
triplet: x64-windows
116117
arch: x64
118+
- name: "Windows x64 RelWithDebInfo"
119+
os: windows-latest
120+
preset: relwithdebinfo-vs
121+
build_preset: relwithdebinfo-vs
122+
triplet: x64-windows
123+
arch: x64
117124

118125
# macOS Intel builds
119126
- name: "macOS x64 Debug"
@@ -128,6 +135,12 @@ jobs:
128135
build_preset: release
129136
triplet: x64-osx
130137
arch: x64
138+
- name: "macOS x64 RelWithDebInfo"
139+
os: macos-13
140+
preset: relwithdebinfo
141+
build_preset: relwithdebinfo
142+
triplet: x64-osx
143+
arch: x64
131144

132145
# macOS Apple Silicon builds
133146
- name: "macOS ARM64 Debug"
@@ -175,7 +188,9 @@ jobs:
175188
uses: actions/cache@v4
176189
with:
177190
path: build
178-
key: ${{ runner.os }}-${{ matrix.arch }}-cmake-${{ matrix.preset }}-${{ hashFiles('CMakeLists.txt', 'cmake/**') }}
191+
key: >-
192+
${{ runner.os }}-${{ matrix.arch }}-cmake-${{ matrix.preset }}-
193+
${{ hashFiles('CMakeLists.txt', 'cmake/**') }}
179194
restore-keys: |
180195
${{ runner.os }}-${{ matrix.arch }}-cmake-${{ matrix.preset }}-
181196
@@ -211,6 +226,7 @@ jobs:
211226
run: |
212227
cmake --preset ${{ matrix.preset }} \
213228
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
229+
-DUSE_VCPKG=ON \
214230
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
215231
-DATOM_BUILD_EXAMPLES=ON \
216232
-DATOM_BUILD_TESTS=ON \
@@ -228,7 +244,8 @@ jobs:
228244
# Run unified test runner with comprehensive output
229245
if [ -f "./run_all_tests" ] || [ -f "./run_all_tests.exe" ]; then
230246
echo "=== Running Unified Test Suite ==="
231-
./run_all_tests --verbose --parallel --threads=4 --output-format=json --output=test_results.json || echo "Some tests failed"
247+
./run_all_tests --verbose --parallel --threads=4 \
248+
--output-format=json --output=test_results.json || echo "Some tests failed"
232249
else
233250
echo "=== Unified test runner not found, falling back to CTest ==="
234251
ctest --output-on-failure --parallel --timeout 300
@@ -261,7 +278,7 @@ jobs:
261278
run: |
262279
cd build
263280
echo "=== CTest Validation ==="
264-
ctest --output-on-failure --parallel --timeout 300 --test-dir build || echo "CTest validation completed"
281+
ctest --output-on-failure --parallel --timeout 300 || echo "CTest validation completed"
265282
266283
- name: Show ccache stats (Linux/macOS)
267284
if: runner.os != 'Windows'
@@ -341,7 +358,8 @@ jobs:
341358
run: |
342359
# Add Python bindings to path and test
343360
export PYTHONPATH=$PWD/build/python:$PYTHONPATH
344-
python -c "import atom; print(f'Python bindings loaded successfully with Python {python.__version__}')" || echo "Python bindings not available"
361+
python -c "import atom; print('Python bindings loaded successfully')" \
362+
|| echo "Python bindings not available"
345363
346364
# Security scanning
347365
security:
@@ -440,14 +458,20 @@ jobs:
440458
if [ "${{ matrix.type }}" == "category" ]; then
441459
# Run tests by category
442460
echo "Running category: ${{ matrix.filter }}"
443-
./scripts/run_tests.sh --category "${{ matrix.filter }}" --verbose --parallel --threads=4 --output-format=json --output="${{ matrix.filter }}_results.json" --timeout ${{ matrix.timeout }} || echo "Tests in ${{ matrix.name }} completed with issues"
461+
./scripts/run_tests.sh --category "${{ matrix.filter }}" \
462+
--verbose --parallel --threads=4 \
463+
--output-format=json --output="${{ matrix.filter }}_results.json" \
464+
|| echo "Tests in ${{ matrix.name }} completed with issues"
444465
else
445466
# Run tests by modules
446467
echo "Running modules: ${{ matrix.modules }}"
447468
IFS=',' read -ra MODULE_ARRAY <<< "${{ matrix.modules }}"
448469
for module in "${MODULE_ARRAY[@]}"; do
449470
echo "=== Testing module: $module ==="
450-
./scripts/run_tests.sh --module "$module" --verbose --parallel --threads=2 --output-format=json --output="module_${module}_results.json" --timeout ${{ matrix.timeout }} || echo "Module $module tests completed with issues"
471+
./scripts/run_tests.sh --module "$module" \
472+
--verbose --parallel --threads=2 \
473+
--output-format=json --output="module_${module}_results.json" \
474+
|| echo "Module $module tests completed with issues"
451475
done
452476
fi
453477
@@ -557,7 +581,9 @@ jobs:
557581
# Try unified test runner for performance tests first
558582
if [ -f "./run_all_tests" ]; then
559583
echo "Running performance tests via unified test runner"
560-
./run_all_tests --category=performance --verbose --output-format=json --output=performance_benchmarks.json || echo "Performance tests completed with issues"
584+
./run_all_tests --category=performance --verbose \
585+
--output-format=json --output=performance_benchmarks.json \
586+
|| echo "Performance tests completed with issues"
561587
else
562588
echo "Unified test runner not found, trying traditional benchmarks"
563589
fi
@@ -576,7 +602,7 @@ jobs:
576602
elif [ -f "traditional_benchmarks.json" ]; then
577603
cp traditional_benchmarks.json benchmark_results.json
578604
else
579-
echo '{"benchmarks": [], "context": {"date": "'$(date)'", "host_name": "'$(hostname)'"}}' > benchmark_results.json
605+
echo '{"benchmarks": [], "context": {}}' > benchmark_results.json
580606
fi
581607
582608
- name: Upload benchmark results
@@ -677,7 +703,9 @@ jobs:
677703
echo "" >> $GITHUB_STEP_SUMMARY
678704
echo "## Performance Benchmarks" >> $GITHUB_STEP_SUMMARY
679705
if [ -f "all-test-results/benchmark-results/benchmark_results.json" ]; then
680-
benchmark_count=$(jq '.benchmarks | length // 0' "all-test-results/benchmark-results/benchmark_results.json" 2>/dev/null || echo "0")
706+
benchmark_count=$(jq '.benchmarks | length // 0' \
707+
"all-test-results/benchmark-results/benchmark_results.json" \
708+
2>/dev/null || echo "0")
681709
echo "- **Benchmarks Run**: $benchmark_count" >> $GITHUB_STEP_SUMMARY
682710
echo "- **Status**: ✅ Completed" >> $GITHUB_STEP_SUMMARY
683711
else
@@ -697,7 +725,9 @@ jobs:
697725
# Overall status
698726
echo "" >> $GITHUB_STEP_SUMMARY
699727
echo "## Overall Status" >> $GITHUB_STEP_SUMMARY
700-
if [ "${{ needs.comprehensive-tests.result }}" == "success" ] && [ "${{ needs.windows-tests.result }}" == "success" ]; then
728+
comp_result="${{ needs.comprehensive-tests.result }}"
729+
win_result="${{ needs.windows-tests.result }}"
730+
if [ "$comp_result" == "success" ] && [ "$win_result" == "success" ]; then
701731
echo "🎉 **All tests completed successfully!**" >> $GITHUB_STEP_SUMMARY
702732
else
703733
echo "⚠️ **Some tests had issues** - Check individual job results for details" >> $GITHUB_STEP_SUMMARY

.github/workflows/packaging.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
name: Comprehensive Packaging
23

3-
on:
4+
"on":
45
push:
56
tags:
67
- "v*"
@@ -144,7 +145,7 @@ jobs:
144145
desktop-file-utils
145146
146147
- name: Install system dependencies (macOS)
147-
if: matrix.os == 'macos-latest'
148+
if: startsWith(matrix.os, 'macos')
148149
run: |
149150
brew install ninja openssl zlib sqlite3 fmt readline python3 doxygen graphviz
150151
@@ -161,6 +162,7 @@ jobs:
161162
# Configure using CMakePresets
162163
cmake --preset ${{ matrix.preset }} \
163164
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
165+
-DUSE_VCPKG=ON \
164166
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
165167
-DATOM_BUILD_EXAMPLES=ON \
166168
-DATOM_BUILD_TESTS=OFF \
@@ -228,7 +230,7 @@ jobs:
228230
# Implementation would use signtool.exe
229231
230232
- name: Sign packages (macOS)
231-
if: matrix.os == 'macos-latest' && secrets.MACOS_SIGNING_CERT
233+
if: startsWith(matrix.os, 'macos') && secrets.MACOS_SIGNING_CERT
232234
shell: bash
233235
run: |
234236
# Code signing logic for macOS packages
@@ -342,7 +344,9 @@ jobs:
342344
name: Publish Packages
343345
runs-on: ubuntu-latest
344346
needs: [build-packages, build-python-wheels, build-containers]
345-
if: github.event.inputs.publish_packages == 'true' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
347+
if: >-
348+
github.event.inputs.publish_packages == 'true' ||
349+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
346350
environment: release
347351

348352
steps:
@@ -371,7 +375,10 @@ jobs:
371375
run: |
372376
# Collect all packages
373377
mkdir -p release_assets
374-
find artifacts/ -type f \( -name "*.tar.gz" -o -name "*.zip" -o -name "*.deb" -o -name "*.rpm" -o -name "*.whl" \) -exec cp {} release_assets/ \;
378+
find artifacts/ -type f \
379+
\( -name "*.tar.gz" -o -name "*.zip" -o -name "*.deb" \
380+
-o -name "*.rpm" -o -name "*.whl" \) \
381+
-exec cp {} release_assets/ \;
375382
376383
# Create checksums
377384
cd release_assets

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
name: Release
23

3-
on:
4+
"on":
45
push:
56
tags:
67
- "v*"
@@ -113,7 +114,7 @@ jobs:
113114
python3-dev doxygen graphviz
114115
115116
- name: Install system dependencies (macOS)
116-
if: matrix.os == 'macos-latest'
117+
if: startsWith(matrix.os, 'macos')
117118
run: |
118119
brew install ninja openssl zlib sqlite3 fmt readline python3 doxygen graphviz
119120
@@ -126,6 +127,7 @@ jobs:
126127
run: |
127128
cmake --preset ${{ matrix.preset }} \
128129
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
130+
-DUSE_VCPKG=ON \
129131
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
130132
-DATOM_BUILD_EXAMPLES=ON \
131133
-DATOM_BUILD_TESTS=ON \
@@ -172,7 +174,7 @@ jobs:
172174
echo "Creating MSI installer..."
173175
# WiX installer creation logic would go here
174176
fi
175-
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
177+
elif [[ "${{ matrix.os }}" == macos-* ]]; then
176178
# Create macOS packages
177179
echo "Creating macOS packages..."
178180
# DMG and PKG creation logic would go here

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ nlohmann/
460460

461461
# Build output and logs
462462
build_output.txt
463+
build-log.txt
463464
test_results.txt
464465
preset_list.txt
465466
vcpkg_location.txt
@@ -470,6 +471,18 @@ dist/
470471
# LLM documentation (generated)
471472
llmdoc/
472473

474+
# Temporary test/packaging directories
475+
test_downstream/
476+
test_package2/
477+
test_package/
478+
479+
# xmake build artifacts
480+
.xmake/
481+
482+
# Python Release builds (generated)
483+
python/Release/
484+
python/build-python/
485+
473486
# -----------------------------------------------------------------------------
474487
# End of .gitignore
475488
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)