Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CI updates #87

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
matrix:
build: [fpm, meson]
os: [ubuntu-latest, macos-latest, windows-latest]
gcc: [10] # Version of GFortran we want to use.
gcc: [13] # Version of GFortran we want to use.
build-type: [debug]
include:
- build: meson
os: ubuntu-latest
gcc: 10
gcc: 13
build-type: coverage

defaults:
Expand All @@ -27,14 +27,14 @@ jobs:
FPM_CC: gcc
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2
with:
submodules: recursive

- name: Cache GFortran install
if: ${{ contains(matrix.os, 'windows') }}
id: cache
uses: actions/cache@v2
uses: actions/cache@v4.2.2
with:
path: ./mingw-w64
key: gcc-${{ matrix.gcc }}-${{ matrix.os }}
Expand Down Expand Up @@ -62,14 +62,13 @@ jobs:
echo "$pwd\mingw-w64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
env:
DOWNLOAD: "https://github.com/brechtsanders/winlibs_mingw/releases/download/10.3.0-12.0.0-9.0.0-r2/winlibs-x86_64-posix-seh-gcc-10.3.0-mingw-w64-9.0.0-r2.zip"
DOWNLOAD: "https://github.com/brechtsanders/winlibs_mingw/releases/download/13.3.0posix-11.0.1-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.3.0-mingw-w64ucrt-11.0.1-r1.zip"

- name: Install dependencies
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-file: config/ci/${{ matrix.build }}-env.yaml
extra-specs: |
${{ matrix.build-type == 'coverage' && 'gcovr' || '' }}
create-args: ${{ matrix.build-type == 'coverage' && 'gcovr' || '' }}

- name: Compile (fpm)
if: ${{ matrix.build == 'fpm' }}
Expand Down Expand Up @@ -125,14 +124,14 @@ jobs:

- name: Upload package
if: ${{ matrix.build == 'meson' && matrix.build-type != 'coverage' }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.6.1
with:
name: ${{ env.MINPACK_OUTPUT }}
path: ${{ env.MINPACK_OUTPUT }}

- name: Upload coverage report
if: ${{ matrix.build-type == 'coverage' }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5.4.0


Python:
Expand All @@ -147,15 +146,15 @@ jobs:
matrix:
build: [meson]
os: [ubuntu-latest, macos-latest]
gcc: [10]
python: ['3.7', '3.8', '3.9']
gcc: [13]
python: ['3.10', '3.11', '3.12']

# Additional test for setuptools build
include:
- build: setuptools
os: ubuntu-latest
gcc: 10
python: '3.9'
gcc: 13
python: '3.12'

env:
FC: gfortran
Expand All @@ -164,22 +163,21 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2

- name: Cache GFortran install
if: ${{ contains(matrix.os, 'windows') }}
id: cache
uses: actions/cache@v2
uses: actions/cache@v4.2.2
with:
path: ./mingw-w64
key: gcc-${{ matrix.gcc }}-${{ matrix.os }}

- name: Install dependencies
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-file: config/ci/python-env.yaml
extra-specs: |
python=${{ matrix.python }}
create-args: python=${{ matrix.python }}

- name: Install GFortran (MacOS)
if: ${{ contains(matrix.os, 'macos') }}
Expand All @@ -204,10 +202,10 @@ jobs:
echo "$pwd\mingw-w64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
env:
DOWNLOAD: "https://github.com/brechtsanders/winlibs_mingw/releases/download/10.3.0-12.0.0-9.0.0-r2/winlibs-x86_64-posix-seh-gcc-10.3.0-mingw-w64-9.0.0-r2.zip"
DOWNLOAD: "https://github.com/brechtsanders/winlibs_mingw/releases/download/13.3.0posix-11.0.1-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.3.0-mingw-w64ucrt-11.0.1-r1.zip"

- name: Download package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.2.0
with:
name: ${{ env.MINPACK_OUTPUT }}

Expand Down Expand Up @@ -249,7 +247,7 @@ jobs:
DYLD_LIBRARY_PATH: ${{ env.DYLD_LIBRARY_PATH }}:${{ env.MINPACK_PREFIX }}/lib

- name: Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5.4.0


Docs:
Expand All @@ -265,12 +263,12 @@ jobs:
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH && contains(github.ref, secrets.DEPLOY_BRANCH) && 1 || 0 }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4.2.2
with:
submodules: recursive

- name: Install dependencies
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-file: config/ci/docs-env.yaml

Expand All @@ -279,7 +277,8 @@ jobs:

- name: Deploy Documentation
if: ${{ github.event_name == 'push' && steps.deploy-on-push.outputs.result != 0 }}
uses: JamesIves/github-pages-deploy-action@4.1.0
uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: doc # The folder the action should deploy.
single-commit: true
10 changes: 5 additions & 5 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
- name: Reorganize repository
run: |
git config user.email ""
Expand All @@ -17,7 +17,7 @@ jobs:
- run: |
pipx run build . --sdist
working-directory: python
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.6.1
with:
name: minpack-python-sdist
path: python/dist/*.tar.gz
Expand All @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

defaults:
run:
Expand All @@ -58,7 +58,7 @@ jobs:
unzip
wheel
- name: Download sdist
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.2.0
with:
name: minpack-python-sdist
- name: Build wheel
Expand All @@ -72,7 +72,7 @@ jobs:
rm minpack-*/dist/*-linux_x86_64.whl
env:
plat: manylinux${{ matrix.python == '3.6' && '2010' || '_2_12' }}_x86_64
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.6.1
with:
name: minpack-python-${{ matrix.python }}
path: minpack-*/dist/*.whl
Expand Down
Loading