-
Notifications
You must be signed in to change notification settings - Fork 1
New optmized version #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| include: | ||
| - os: ubuntu-latest | ||
| cc: gcc | ||
| - os: macos-latest | ||
| cc: clang | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install dependencies (Ubuntu) | ||
| if: matrix.os == 'ubuntu-latest' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y valgrind build-essential | ||
|
|
||
| - name: Install dependencies (macOS) | ||
| if: matrix.os == 'macos-latest' | ||
| run: | | ||
| brew install valgrind || echo "Valgrind not available on macOS ARM" | ||
|
|
||
| - name: Set up environment | ||
| run: | | ||
| echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Build library | ||
| run: | | ||
| make clean | ||
| make | ||
|
|
||
| - name: Verify build artifacts | ||
| run: | | ||
| ls -la *.so *.a | ||
| file libcsv.so libcsv.a | ||
|
|
||
| - name: Build tests | ||
| run: | | ||
| make tests | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| make test | ||
|
|
||
| - name: Run Valgrind tests (Ubuntu only) | ||
| if: matrix.os == 'ubuntu-latest' | ||
| run: | | ||
| make valgrind | ||
|
|
||
| - name: Test individual components | ||
| run: | | ||
| make test-arena | ||
| make test-config | ||
| make test-utils | ||
| make test-parser | ||
| make test-writer | ||
| make test-reader | ||
|
|
||
| memory-safety: | ||
| name: Memory Safety Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Valgrind | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y valgrind | ||
|
|
||
| - name: Build with debug info | ||
| run: | | ||
| make clean | ||
| CFLAGS="-g -O0" make | ||
|
|
||
| - name: Run comprehensive Valgrind tests | ||
| run: | | ||
| make valgrind-all | ||
|
|
||
| - name: Check for memory leaks | ||
| run: | | ||
| echo "✅ All Valgrind tests passed - no memory leaks detected" | ||
|
|
||
| cross-compile: | ||
| name: Cross Compilation Test | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install cross-compilation tools | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf | ||
|
|
||
| - name: Cross compile for ARM64 | ||
| run: | | ||
| CC=aarch64-linux-gnu-gcc make clean all | ||
|
|
||
| - name: Cross compile for ARM32 | ||
| run: | | ||
| CC=arm-linux-gnueabihf-gcc make clean all | ||
|
|
||
| release-test: | ||
| name: Release Build Test | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Build optimized release | ||
| run: | | ||
| CFLAGS="-O3 -DNDEBUG" make clean all | ||
|
|
||
| - name: Test optimized build | ||
| run: | | ||
| make test | ||
|
|
||
| - name: Create distribution package | ||
| run: | | ||
| mkdir -p dist/FastCSV-C | ||
| cp *.h *.c Makefile LICENSE README.md CONTRIBUTING.md dist/FastCSV-C/ | ||
| cp -r tests dist/FastCSV-C/ | ||
| cd dist && tar -czf FastCSV-C.tar.gz FastCSV-C/ | ||
|
|
||
| - name: Upload distribution artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: FastCSV-C-dist | ||
| path: dist/FastCSV-C.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| create-release: | ||
| name: Create Release | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Build release artifacts | ||
| run: | | ||
| make clean | ||
| CFLAGS="-O3 -DNDEBUG" make | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| make test | ||
|
|
||
| - name: Create source distribution | ||
| run: | | ||
| mkdir -p dist/FastCSV-C-${GITHUB_REF#refs/tags/} | ||
| cp *.h *.c Makefile LICENSE README.md CONTRIBUTING.md dist/FastCSV-C-${GITHUB_REF#refs/tags/}/ | ||
| cp -r tests dist/FastCSV-C-${GITHUB_REF#refs/tags/}/ | ||
| cd dist && tar -czf FastCSV-C-${GITHUB_REF#refs/tags/}.tar.gz FastCSV-C-${GITHUB_REF#refs/tags/}/ | ||
|
|
||
| - name: Create binary distribution | ||
| run: | | ||
| mkdir -p dist/FastCSV-C-${GITHUB_REF#refs/tags/}-linux-x64 | ||
| cp *.h libcsv.so libcsv.a LICENSE README.md dist/FastCSV-C-${GITHUB_REF#refs/tags/}-linux-x64/ | ||
| cd dist && tar -czf FastCSV-C-${GITHUB_REF#refs/tags/}-linux-x64.tar.gz FastCSV-C-${GITHUB_REF#refs/tags/}-linux-x64/ | ||
|
|
||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: | | ||
| dist/FastCSV-C-*.tar.gz | ||
| body: | | ||
| ## FastCSV-C Release ${{ github.ref_name }} | ||
|
|
||
| ### Features | ||
| - High-performance CSV parsing and writing | ||
| - Memory-safe with zero leaks (Valgrind validated) | ||
| - Arena-based memory management | ||
| - Comprehensive test suite (42+ tests) | ||
|
|
||
| ### Downloads | ||
| - **Source Code**: FastCSV-C-${{ github.ref_name }}.tar.gz | ||
| - **Linux Binary**: FastCSV-C-${{ github.ref_name }}-linux-x64.tar.gz | ||
|
|
||
| ### Installation | ||
| ```bash | ||
| tar -xzf FastCSV-C-${{ github.ref_name }}.tar.gz | ||
| cd FastCSV-C-${{ github.ref_name }} | ||
| make | ||
| make test | ||
| ``` | ||
|
|
||
| ### What's Changed | ||
| See the commit history for detailed changes in this release. | ||
| draft: false | ||
| prerelease: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,45 @@ | ||
| # Build directories | ||
| build/ | ||
| _build/ | ||
| cmake-build-*/ | ||
|
|
||
| # Object files | ||
| # Build artifacts | ||
| *.o | ||
| *.ko | ||
| *.obj | ||
| *.elf | ||
|
|
||
| # Libraries | ||
| *.lib | ||
| *.so | ||
| *.a | ||
| *.la | ||
| *.d | ||
| *.debug.o | ||
| *.gcov.o | ||
| *.gcno | ||
| *.gcda | ||
| *.dep | ||
| *.lo | ||
| *.so | ||
| *.so.* | ||
| *.dylib | ||
|
|
||
| # Executables | ||
| *.exe | ||
| *.out | ||
| *.app | ||
| *.i*86 | ||
| *.x86_64 | ||
| *.hex | ||
| # Test executables | ||
| test_arena | ||
| test_csv_config | ||
| test_csv_utils | ||
| test_csv_parser | ||
| test_csv_writer | ||
| test_csv_reader | ||
| run_all_tests | ||
|
|
||
| # Debug files | ||
| *.dSYM/ | ||
| *.su | ||
| *.idb | ||
| *.pdb | ||
|
|
||
| # Dependency files | ||
| *.d | ||
|
|
||
| # CMake | ||
| CMakeCache.txt | ||
| CMakeFiles/ | ||
| CMakeScripts/ | ||
| Testing/ | ||
| Makefile | ||
| cmake_install.cmake | ||
| install_manifest.txt | ||
| compile_commands.json | ||
| CTestTestfile.cmake | ||
| # Build directories | ||
| build/ | ||
| dist/ | ||
| coverage.info | ||
| profile.txt | ||
| gmon.out | ||
| scan-build-results/ | ||
|
|
||
| # Temporary files | ||
| *.tmp | ||
| *.temp | ||
| *~ | ||
|
|
||
| # IDE specific files | ||
| .idea/ | ||
| # IDE files | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # OS specific files | ||
| # OS files | ||
| .DS_Store | ||
| .DS_Store? | ||
| ._* | ||
| .Spotlight-V100 | ||
| .Trashes | ||
| ehthumbs.db | ||
| Thumbs.db | ||
| *.dep | ||
|
|
||
| # Test CSV files generated during testing | ||
| test_*.csv |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to latest action version.
The
softprops/action-gh-release@v1action is outdated and may not work properly on current GitHub Actions runners.📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.7)
39-39: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents