ctest: should generally prepend PATH #90
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: 4 | |
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-hdf5 | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "${{ runner.temp }}/msys64/mingw64/bin/" | Out-File -FilePath $env:GITHUB_PATH -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" -DHDF5_ROOT=${{ runner.temp }}/msys64/mingw64/ -DCMAKE_BUILD_TYPE=Release --preset default | |
- 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 -DCMAKE_PREFIX_PATH=${{ runner.temp }} | |
# - name: build Examples | |
# run: cmake --build example/build | |
# - name: Test Examples | |
# run: ctest --test-dir example/build -V |