Benchmark of pyccel/pyccel@9d047d6cb2a9c1260f4784c1c67e46fe8aaca67d #579
This file contains 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: Benchmarks | |
on: push | |
jobs: | |
Check_Pyccel_Version: | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, 'Benchmark of pyccel') | |
outputs: | |
version: ${{ steps.check_version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check version | |
id: check_version | |
run: | | |
old_version=$(cat current_version.txt) | |
echo "version=${old_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 --upgrade pip | |
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: | | |
source $INTEL_SOURCE_FILE | |
cd benchmarks | |
python run_benchmarks.py --verbose --pyccel-config-files pyccel_fortran_gnu.json pyccel_c_gnu.json pyccel_fortran_intel.json pyccel_c_intel.json --pythran-config-files pythran_gnu.config pythran_intel.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.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' |