Skip to content

Benchmark of pyccel/pyccel@58bcff4f3d0ee4ffc05c47dc39fe002ddeda1334 #316

Benchmark of pyccel/pyccel@58bcff4f3d0ee4ffc05c47dc39fe002ddeda1334

Benchmark of pyccel/pyccel@58bcff4f3d0ee4ffc05c47dc39fe002ddeda1334 #316

name: Benchmarks
on: push
jobs:
Check_Pyccel_Version:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'Benchmark of pyccel')
outputs:
new_version: ${{ steps.check_version.outputs.new_version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install pyccel
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install pyccel
- name: Check Version
id: check_version
run: |
new_version=$(python -c "from pyccel import __version__; print(__version__)")
echo "new_version=${new_version}" >> $GITHUB_OUTPUT
Benchmark_main:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'Benchmark of pyccel')
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
uses: ./.github/actions/linux_install
- name: Install development version of pyccel from GitHub
run: |
pip3 install 'pyccel @ git+https://github.com/pyccel/pyccel'
- name: Install python dependencies
run: |
pip3 install .
pip3 freeze > version_specific_results/devel_performance_310_requirements.txt
- name: Generate pyccel configs
uses: ./.github/actions/generate_pyccel_config
- name: Benchmark
run: |
cd benchmarks
python run_benchmarks.py --verbose --pyccel-config-files pyccel_fortran.json pyccel_c.json --pythran-config-files pythran.config
cd ..
FILE=version_specific_results/devel_performance_310.md
echo "### Performance Comparison (as of $(date))" > ${FILE}
cat benchmarks/bench.out >> ${FILE}
python analysis/plot_results_figures.py ${FILE}
shell: bash
working-directory: ./.
- name: Record Failure
run: echo "Devel branch benchmarks failed on python 3.10!" > version_specific_results/devel_performance_310.md
if: ${{ failure() }}
- name: Add & Commit
uses: EndBug/add-and-commit@v9
if: ${{ always() }}
with:
message: 'Update performance comparison'
add: "['version_specific_results/devel_performance_310.md', 'version_specific_results/devel_performance_310_compilation.svg', 'version_specific_results/devel_performance_310_execution.svg', 'version_specific_results/devel_performance_310_requirements.txt']"
default_author: github_actions
pull: '--rebase --autostash'
BuildReadme:
runs-on: ubuntu-latest
if: ${{ always() && contains(github.event.head_commit.message, 'Benchmark of pyccel')}}
needs: [ Check_Pyccel_Version, Benchmark_main]
steps:
- uses: actions/checkout@v3
- name: Write README
uses: ./.github/actions/create_readme
with:
version: "${{ needs.Check_Pyccel_Version.outputs.new_version }}"
- name: Add & Commit
uses: EndBug/add-and-commit@v9
with:
message: 'Update README and version'
add: "['README.md']"
default_author: github_actions
pull: '--rebase --autostash'