Skip to content

Commit

Permalink
ci test 12
Browse files Browse the repository at this point in the history
  • Loading branch information
mjreno authored and mjreno committed Nov 13, 2023
1 parent f23caae commit 9f68fb1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci-nc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ jobs:
#cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
sed -i "s|libdir=/home/runner/micromamba/envs/modflow6//home/runner/micromamba/envs/modflow6/lib|libdir=/home/runner/micromamba/envs/modflow6/lib|g" /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
#cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
pkg-config --cflags netcdf-fortran
pkg-config --libs netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran
- name: Edit netcdf-fortran.pc
if: runner.os == 'macOS'
Expand All @@ -111,16 +111,16 @@ jobs:
#cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
sed -i '' -e "s|libdir=/Users/runner/micromamba/envs/modflow6//Users/runner/micromamba/envs/modflow6/lib|libdir=/Users/runner/micromamba/envs/modflow6/lib|g" /Users/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
#cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc
pkg-config --cflags netcdf-fortran
pkg-config --libs netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran
- name: Build modflow6
working-directory: modflow6
run: |
nc-config --all
nf-config
pkg-config --cflags netcdf-fortran
pkg-config --libs netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran
/home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
Expand Down
10 changes: 10 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@ if netcdf.found()
extra_cmp_args += [ '-D__WITH_NETCDF__' ]
dependencies += [ netcdf ]
#add_project_dependencies(netcdf, language: 'fortran')
code = '''
program meson_netcdf_link_test
use netcdf
print *, trim(nf90_inq_libvers())
end program meson_netcdf_link_test
'''
result = fc.links(code, dependencies : netcdf, name : 'NetCDF link check')
if result == false
message('Linking against NetCDF failed!')
endif
else
with_netcdf = false
endif
Expand Down

0 comments on commit 9f68fb1

Please sign in to comment.