v1.7.2: improved as child project #100
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
name: ci_windows | |
on: | |
push: | |
paths: | |
- "**/CMakeLists.txt" | |
- "**.cmake" | |
- "**.f90" | |
- ".github/workflows/ci_windows.yml" | |
- "cmake/netcdf.cmake" | |
- "cmake/netcdf-c.cmake" | |
- "cmake/hdf5.cmake" | |
- "!scripts/**" | |
env: | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
CTEST_PARALLEL_LEVEL: 0 | |
CTEST_NO_TESTS_ACTION: error | |
jobs: | |
msys2: | |
timeout-minutes: 30 | |
runs-on: windows-latest | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
mingw-w64-x86_64-gcc-fortran | |
mingw-w64-x86_64-netcdf-fortran | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "${{ runner.temp }}/msys64/mingw64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: prefix path | |
run: | | |
echo "CMAKE_INSTALL_PREFIX=$HOME/libs" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "CMAKE_PREFIX_PATH=$HOME/libs" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- uses: actions/checkout@v4 | |
# undefined reference to `ncpsharedlibfree' | |
# - name: Debug workflow | |
# run: cmake --workflow --preset debug | |
- name: config | |
run: cmake -G "MinGW Makefiles" --preset default | |
env: | |
HDF5_ROOT: ${{ runner.temp }}/msys64/mingw64/ | |
NetCDF_ROOT: ${{ runner.temp }}/msys64/mingw64/ | |
- name: build | |
run: cmake --build --preset default | |
- name: test | |
run: ctest --preset default | |
# - run: cmake --install build | |
# NetCDF-C packaging issue with HDF5--ignores CMAKE_MODULE_PATH and uses broken factory FindHDF5 | |
# and can't seem to override | |
# - name: configure examples | |
# run: cmake -S example -B example/build | |
# - name: build Examples | |
# run: cmake --build example/build | |
# - name: Test Examples | |
# run: ctest --test-dir example/build -V |