Skip to content

Commit

Permalink
ci: single test matrix, bump gcc and python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Oct 15, 2023
1 parent d91d943 commit 5900ad0
Showing 1 changed file with 24 additions and 113 deletions.
137 changes: 24 additions & 113 deletions .github/workflows/pymake-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- ci-test
pull_request:
branches:
- master
Expand All @@ -17,7 +18,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
# test latest gcc and python
- {os: ubuntu-latest, gcc: 13, python: "3.11"}
- {os: windows-latest, gcc: 12, python: "3.11"}
- {os: macos-latest, gcc: 13, python: "3.11"}
# test latest gcc and previous python
- {os: ubuntu-latest, gcc: 13, python: "3.11"}
- {os: ubuntu-latest, gcc: 13, python: "3.10"}
- {os: ubuntu-latest, gcc: 13, python: 3.9}
- {os: ubuntu-latest, gcc: 13, python: 3.8}
# test latest python and previous gcc
- {os: ubuntu-latest, gcc: 12, python: "3.11"}
- {os: ubuntu-latest, gcc: 11, python: "3.11"}
defaults:
run:
shell: bash
Expand All @@ -33,7 +46,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{ matrix.python }}

- name: Install python packages
run: |
Expand All @@ -44,127 +57,25 @@ jobs:
uses: awvwgk/setup-fortran@v1
with:
compiler: gcc
version: 11

- name: Set CXX (temporary)
if: runner.os == 'Windows'
run: |
echo "CXX=g++" >> $GITHUB_ENV
- name: Download examples for pytest runs
run: |
.github/common/download-examples.sh
- name: Run pytest
working-directory: ./autotest
run: |
pytest -v --dist=loadfile -n=auto -m="base or regression" --durations=0 --cov=pymake --cov-report=xml --basetemp=pytest_temp
- name: Print coverage report before upload
working-directory: ./autotest
run: |
coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./autotest/coverage.xml

pymakeCI-gcc-prev:
name: pymake CI GCC 9 and 8
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gcc-version: [ 9, 8 ]
defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Setup GNU Fortran
uses: awvwgk/setup-fortran@v1
with:
compiler: gcc
version: ${{ matrix.gcc-version }}

- name: Print GNU compiler versions
run: |
gfortran --version
gcc --version
g++ --version
version: ${{ matrix.gcc }}

- name: Download examples for pytest runs
run: |
.github/common/download-examples.sh
run: .github/common/download-examples.sh

- name: Run pytest
working-directory: ./autotest
run: |
pytest -v --dist=loadfile -n=auto -m="base" --durations=0 --cov=pymake --cov-report=xml
markers="base"
if [[ ${{ matrix.gcc }} == 13 ]]; then
markers="base or regression"
fi
pytest -v --dist=loadfile -n=auto --durations=0 --basetemp=pytest_temp --cov=pymake --cov-report=xml --cov-append -m "$markers"
- name: Print coverage report before upload
working-directory: ./autotest
run: |
coverage report
run: coverage report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./autotest/coverage.xml

pymakeCI-python-prev:
name: pymake CI with previous python versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9, 3.8 ]
defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Setup GNU Fortran
uses: awvwgk/setup-fortran@v1
with:
compiler: gcc
version: 11

- name: Download examples for pytest runs
run: |
.github/common/download-examples.sh
- name: Run pytest
working-directory: ./autotest
run: |
pytest -v --dist=loadfile -n=auto -m="base" --durations=0
file: ./autotest/coverage.xml

0 comments on commit 5900ad0

Please sign in to comment.