-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use fortran-lang/setup-fortran action * use major version tags for actions * consolidate gcc/python tests in 1 matrix * bump gcc versions tested to 11-13 * bump python versions tested to 3.8-3.11
- Loading branch information
Showing
5 changed files
with
38 additions
and
134 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,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 | ||
|
@@ -31,137 +43,38 @@ jobs: | |
uses: ts-graphviz/setup-graphviz@v1 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4.7.1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[test]" | ||
- name: Setup GNU Fortran | ||
uses: awvwgk/setup-fortran@main | ||
uses: awvwgk/setup-fortran@v1 | ||
with: | ||
compiler: gcc | ||
version: 11 | ||
|
||
- name: Set CXX (temporary) | ||
if: runner.os == 'Windows' | ||
run: | | ||
echo "CXX=g++" >> $GITHUB_ENV | ||
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 or regression" --durations=0 --cov=pymake --cov-report=xml --basetemp=pytest_temp | ||
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.1.4 | ||
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/[email protected] | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[test]" | ||
- name: Setup symbolic link to gfortran on Linux | ||
run: | | ||
sudo ln -fs /usr/bin/gfortran-${{ matrix.gcc-version }} /usr/local/bin/gfortran | ||
sudo ln -fs /usr/bin/gcc-${{ matrix.gcc-version }} /usr/local/bin/gcc | ||
sudo ln -fs /usr/bin/g++-${{ matrix.gcc-version }} /usr/local/bin/g++ | ||
- name: Print GNU compiler versions | ||
run: | | ||
gfortran --version | ||
gcc --version | ||
g++ --version | ||
- 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 --cov=pymake --cov-report=xml | ||
- name: Print coverage report before upload | ||
working-directory: ./autotest | ||
run: | | ||
coverage report | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
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/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[test]" | ||
- name: Install GNU Fortran | ||
uses: modflowpy/install-gfortran-action@v1 | ||
|
||
- 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 |
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
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
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