Merge branch 'master' into dependabot/github_actions/actions/download… #1433
Workflow file for this run
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: | |
| push: | |
| branches: | |
| - '**' # Push events on all branches | |
| paths-ignore: | |
| - '.github/workflows/init.yml' | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 including semver | |
| jobs: | |
| build_wheel: | |
| runs-on: self-feelpp | |
| name: Build wheel | |
| if: "!contains(github.event.head_commit.message, 'wheel skip')" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Sync deps | |
| run: uv sync | |
| - name: Build | |
| run: uv build | |
| - name: Upload Wheel | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: wheel-artifacts | |
| path: dist/*.whl | |
| unit_tests: | |
| runs-on: self-feelpp | |
| name: Unit Tests | |
| needs: build_wheel | |
| if: "!contains(github.event.head_commit.message, 'unit_tests skip')" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Download packages | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheel-artifacts | |
| path: dist/ | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --extra test | |
| uv pip install dist/*.whl | |
| - name: Unit tests | |
| run: uv run pytest | |
| env: | |
| GIRDER_API_KEY: ${{secrets.GIRDER}} | |
| integration_tests: | |
| runs-on: self-feelpp | |
| name: Integration Tests | |
| needs: build_wheel | |
| if: "!contains(github.event.head_commit.message, 'integration_tests skip')" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Download packages | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheel-artifacts | |
| path: dist/ | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --extra test | |
| uv pip install dist/*.whl | |
| - name: Compile test applications | |
| run: | | |
| mpic++ -std=c++17 -O3 examples/parallelsum/parallelSum.cpp -o examples/parallelsum/parallelSum | |
| mpic++ -std=c++17 -O3 examples/matrixvector/matrixvector.cpp -o examples/matrixvector/matrixvector | |
| - name: Test ParallelSum Case | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/parallelsum/parallelSum.json -pc examples/parallelsum/plots.json | |
| echo $? | |
| - name: Test Fibonacci Case | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/fibonacci/benchmark.json -pc examples/fibonacci/plots.json | |
| echo $? | |
| - name: Test MatrixVector Case | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/matrixvector/matrixvector.json -pc examples/matrixvector/plots.json | |
| echo $? | |
| - name: Test Sorting Case | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/sorting/sorting.json -pc examples/sorting/plots.json | |
| echo $? | |
| - name: Dry-run reports | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-render --config-file reports/website_config.json | |
| - name: Check files | |
| run: | #TODO: check if not empty (maybe) | |
| nb_rfm_report_files=$(ls -1q reports|wc -l) | |
| nb_doc_reports=$(ls -1q docs/modules/ROOT/pages/leaves/|wc -l) | |
| if [ "$nb_rfm_report_files" -ne 5 ] || [ "$nb_doc_reports" -ne 4 ]; then | |
| echo "Reports where not rendered." | |
| exit 1 | |
| fi | |
| docs: | |
| runs-on: self-antora | |
| name: Build Antora Site | |
| needs: build_wheel | |
| if: "!contains(github.event.head_commit.message, 'docs skip')" | |
| steps: | |
| - uses: astral-sh/setup-uv@v7 | |
| - uses: actions/checkout@v6 | |
| - name: Install credentials | |
| run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials | |
| env: | |
| GITHUB_OAUTH: ${{ secrets.CR_PAT_WORKFLOW }} | |
| - name: Install NPM dependencies | |
| run: npm ci --verbose | |
| - name: Download | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheel-artifacts | |
| path: dist/ | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --no-dev | |
| - name: Download website config | |
| run: | | |
| source .venv/bin/activate | |
| source ./girder_deploy_config.sh | |
| feelpp-girder download --girder_id=$production_website_config_id --output_dir=./tmp/ --filename=website_config.json | |
| env: | |
| GIRDER_API_KEY: ${{secrets.GIRDER}} | |
| - name: Render reports | |
| run: | | |
| source .venv/bin/activate | |
| feelpp-benchmarking-render --config-file=./tmp/website_config.json | |
| env: | |
| GIRDER_API_KEY: ${{ secrets.GIRDER }} | |
| - name: Build Antora Site | |
| run: | | |
| source .venv/bin/activate | |
| npm run antora || true | |
| npm run antora || true | |
| - name: Deploy | |
| if: ${{ github.ref_name == 'master' }} | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages # The branch the action should deploy to. | |
| folder: public # The folder the action should deploy. | |
| deliver: | |
| runs-on: self-feelpp | |
| name: Build docker, tag and push | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/feelpp/benchmarking | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.CR_PAT }} | |
| - name: Build container image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| file: ./Dockerfile | |
| release: | |
| runs-on: self-feelpp | |
| name: Release | |
| needs: [unit_tests,integration_tests] | |
| if: startsWith(github.ref ,'refs/tags/v') | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download Wheel Packages | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheel-artifacts | |
| path: dist/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/*.whl | |
| draft: false | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'preview')}} | |
| name: Release ${{ github.ref_name }} | |
| generate_release_notes: true | |
| tag_name: ${{ github.ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |