Discrete optimization #41
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
| name: CI | |
| on: | |
| # Trigger on pushes ONLY to the main branch | |
| push: | |
| branches: [ "main" ] | |
| # Trigger on PRs targeting the main branch | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Test Data | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Built-in token, no setup needed | |
| run: | | |
| # Download specific file from the specific tag | |
| gh release download timescales-data-v1 -p "data.zip" | |
| unzip data.zip | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y libboost-all-dev | |
| pip install --upgrade gcovr | |
| gcovr --version | |
| ls | |
| - name: Configure & Build | |
| run: | | |
| cmake -B build -DENABLE_COVERAGE=ON | |
| cmake --build build | |
| - name: Test & Generate Report | |
| run: | | |
| cmake --build build --target coverage | |
| echo "--- DEBUG: XML CONTENT START ---" | |
| head -n 20 build/coverage.xml | |
| echo "--- DEBUG: XML CONTENT END ---" | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./build/coverage.xml | |
| fail_ci_if_error: true | |
| disable_search: true |