Skip to content

pymake continuous integration #618

pymake continuous integration

pymake continuous integration #618

Workflow file for this run

name: pymake continuous integration
on:
schedule:
- cron: '0 6 * * *' # run at 7 AM UTC every day
push:
paths-ignore:
- 'README.md'
- 'docs/*.md'
pull_request:
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'docs/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pymake-os-compiler:
name: pymake compilers
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# test latest gcc and python
- {os: ubuntu-latest, compiler: gcc, version: 13, shell: bash}
- {os: macos-latest, compiler: gcc, version: 13, shell: bash}
- {os: windows-latest, compiler: gcc, version: 13, shell: pwsh}
# test latest python and intel-classic
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: macos-13, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: windows-2022, compiler: intel-classic, version: 2021.7, shell: pwsh}
# test latest python and previous gcc
- {os: ubuntu-latest, compiler: gcc, version: 12, shell: bash}
- {os: ubuntu-latest, compiler: gcc, version: 11, shell: bash}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repo
uses: actions/checkout@v5
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS' && matrix.compiler == 'intel-classic'
with:
xcode-version: "14.3.1"
- name: Setup Graphviz on Linux
if: runner.os == 'Linux'
uses: ts-graphviz/setup-graphviz@v2
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.42.1
manifest-path: "pixi.toml"
- name: pixi post-install
working-directory: pymake
run: |
pixi run postinstall
- name: Setup ${{ matrix.compiler }} ${{ matrix.version }} on ${{ matrix.os }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Download examples for pytest runs
run: |
pixi run download-examples
- name: Install make
if: runner.os == 'Windows'
run: choco install make
- name: test on Linux
if: runner.os == 'Linux'
run: |
pixi run autotest
- name: test on MacOS
if: runner.os == 'macOS'
run: |
pixi run autotest-base
- name: test on Windows
if: runner.os == 'Windows'
run: |
pixi run autotest-base
- name: Upload failed test output
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}
path: ./autotest/.failed
- name: Print coverage report before upload
run: |
pixi run coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./autotest/coverage.xml
pymake-schedule:
name: pymake scheduled
if: github.event_name == 'schedule'
runs-on: matrix.os
strategy:
fail-fast: false
matrix:
include:
# test latest gcc and python
- {os: ubuntu-latest, compiler: gcc, version: 13, shell: bash}
- {os: macos-latest, compiler: gcc, version: 13, shell: bash}
- {os: windows-latest, compiler: gcc, version: 13, shell: pwsh}
# test latest python and intel
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: macos-13, compiler: intel-classic, version: 2021.7, shell: bash}
- {os: windows-2022, compiler: intel-classic, version: 2021.7, shell: pwsh}
defaults:
run:
shell: matrix.shell
steps:
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repo
uses: actions/checkout@v5
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS' && matrix.compiler == 'intel-classic'
with:
xcode-version: "14.3.1"
- name: Setup Graphviz on Linux
if: runner.os == 'Linux'
uses: ts-graphviz/setup-graphviz@v2
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.42.1
manifest-path: "pixi.toml"
- name: pixi post-install
working-directory: pymake
run: |
pixi run postinstall
- name: Setup ${{ matrix.compiler }} ${{ matrix.version }} on ${{ matrix.os }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Run scheduled tests on ${{ matrix.os }} with ${{ matrix.compiler }}
if: runner.os != 'Windows' || matrix.compiler != 'intel-classic'
run: pixi run autotest-schedule
- name: Run scheduled tests on ${{ matrix.os }} with ${{ matrix.compiler }}
if: runner.os == 'Windows' && matrix.compiler == 'intel-classic'
run: pixi run autotest-schedule --exclude gridgen
- name: Upload failed test output
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-schedule-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}
path: autotest/.failed
- name: Print coverage report before upload
run: |
pixi run coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./autotest/coverage.xml