Skip to content

Test CI

Test CI #33

name: benchmark_dot
on:
push:
paths:
- src/*.f90
- benchmarks/dot/dot.f90
- benchmarks/dot/dot_co.f90
pull_request:
paths:
- src/*.f90
- benchmarks/dot/dot.f90
- benchmarks/dot/dot_co.f90
# schedule:
# - cron: '0 0 1 * *'
jobs:
Benchmark_gfortran:
if: github.repository_owner == 'gha3mi'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install LAPACK and BLAS
run: sudo apt-get install -y libblas-dev liblapack-dev
- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: gcc
- name: Test
run: fpm @benchmark-dot-test-gfortran
env:
FC: gfortran
- name: Run dot benchmark
run: fpm @benchmark-dot-gfortran
env:
FC: gfortran
- name: Install Python dependencies
run: |
python -m pip install pandas matplotlib
- name: Results
run: |
cd benchmarks/dot && python results/export.py dot_gfortran.data && cd ../..
- name: Merge Results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin
git switch -c results origin/${{ github.event.repository.default_branch }}
git add benchmarks/dot/results/dot_gfortran*.png
git add benchmarks/dot/results/dot_gfortran*.html
git commit -m "Update results gfortran"
git push -u origin results --force-with-lease
Benchmark_ifx:
if: github.repository_owner == 'gha3mi'
needs: [Benchmark_gfortran]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install LAPACK and BLAS
run: sudo apt-get install -y libblas-dev liblapack-dev
- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: intel
- name: Test
run: fpm @benchmark-dot-test-ifx
env:
FC: ifx
- name: Run dot benchmark
run: fpm @benchmark-dot-ifx
env:
FC: ifx
- name: Install Python dependencies
run: |
python -m pip install pandas matplotlib
- name: Results
run: |
cd benchmarks/dot && python results/export.py dot_ifx.data && cd ../..
- name: Merge Results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin
git switch -c results origin/${{ github.event.repository.default_branch }}
git add benchmarks/dot/results/dot_ifx*.png
git add benchmarks/dot/results/dot_ifx*.html
git commit -m "Update results ifx"
git push -u origin results --force-with-lease
Benchmark_ifort:
if: github.repository_owner == 'gha3mi'
needs: [Benchmark_gfortran, Benchmark_ifx]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install LAPACK and BLAS
run: sudo apt-get install -y libblas-dev liblapack-dev
- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: intel-classic
- name: Test
run: fpm @benchmark-dot-test-ifort
env:
FC: ifort
- name: Run dot benchmark
run: fpm @benchmark-dot-ifort
env:
FC: ifort
- name: Install Python dependencies
run: |
python -m pip install pandas matplotlib
- name: Results
run: |
cd benchmarks/dot && python results/export.py dot_ifort.data && cd ../..
- name: Merge Results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin
git switch -c results origin/${{ github.event.repository.default_branch }}
git add benchmarks/dot/results/dot_ifort*.png
git add benchmarks/dot/results/dot_ifort*.html
git commit -m "Update results ifort"
git push -u origin results --force-with-lease
Benchmark_nvfortran:
if: github.repository_owner == 'gha3mi'
needs: [Benchmark_gfortran, Benchmark_ifx, Benchmark_ifort]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install LAPACK and BLAS
run: sudo apt-get install -y libblas-dev liblapack-dev
- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: nvidia-hpc
- name: Test
run: fpm @benchmark-dot-test-nvfortran
env:
FC: nvfortran
- name: Run dot benchmark
run: fpm @benchmark-dot-nvfortran
env:
FC: nvfortran
- name: Install Python dependencies
run: |
python -m pip install pandas matplotlib
- name: Results
run: |
cd benchmarks/dot && python results/export.py dot_nvfortran.data && cd ../..
- name: Merge Results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin
git switch -c results origin/${{ github.event.repository.default_branch }}
git add benchmarks/dot/results/dot_nvfortran*.png
git add benchmarks/dot/results/dot_nvfortran*.html
git commit -m "Update results nvfortran"
git push -u origin results --force-with-lease
Create_PR:
if: github.repository_owner == 'gha3mi'
needs: [Benchmark_gfortran, Benchmark_ifx, Benchmark_ifort, Benchmark_nvfortran]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout "${{ github.event.repository.default_branch }}"
git merge --squash results
gh pr create -B "${{ github.event.repository.default_branch }}" -H "results" --title "Update results" --body "Update dot_product benchmark results"