From 3d68adf4f3e4fb7497d0e653ab282c21de793078 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 14:16:38 -0500 Subject: [PATCH 01/30] adding an integration test to show fetch_content can work --- .github/workflows/run_tests_osx.yml | 20 ++++++++ .github/workflows/run_tests_ubuntu.yml | 20 ++++++++ .github/workflows/run_tests_win_cygwin.yml | 48 +++++++++++++++---- .github/workflows/run_tests_win_mingw.yml | 35 +++++++++++++- .../fetch_content/CMakeLists.txt | 25 ++++++++++ integration_tests/fetch_content/main.c | 7 +++ 6 files changed, 143 insertions(+), 12 deletions(-) create mode 100644 integration_tests/fetch_content/CMakeLists.txt create mode 100644 integration_tests/fetch_content/main.c diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index 042f2f1801..d945745004 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -478,3 +478,23 @@ jobs: cd build LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV if: ${{ failure() }} + + fetch_content_cmake: + needs: build-deps-osx + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + + - name: Run Cmake + run: | + cd integration_tests/fetch_content + cmake -S . -B build -D + + - name: Build + run: | + cd build + cmake --build build --parallel + + - name: Run tests + run: | + ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index a6a17bf8a0..43ebe59ad0 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -888,3 +888,23 @@ jobs: cd build LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV if: ${{ failure() }} + + fetch_content_cmake: + needs: build-deps-serial + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Run Cmake + run: | + cd integration_tests/fetch_content + cmake -S . -B build -D + + - name: Build + run: | + cd build + cmake --build build --parallel + + - name: Run tests + run: | + ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index 6e124448ed..c46b45d0f9 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -12,7 +12,25 @@ env: CYGWIN_NOWINPATH: 1 jobs: + build-deps: + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v3 + + - uses: cygwin/cygwin-install-action@v2 + with: + platform: x86_64 + packages: >- + git automake libtool autoconf2.5 make libhdf5-devel + libhdf4-devel zipinfo libxml2-devel perl zlib-devel + libzstd-devel libbz2-devel libaec-devel libzip-devel + libdeflate-devel gcc-core libcurl-devel libiconv-devel + libssl-devel libcrypt-devel + build-and-test-autotools: + needs: build-deps runs-on: windows-latest defaults: run: @@ -30,16 +48,6 @@ jobs: - uses: actions/checkout@v3 - - uses: cygwin/cygwin-install-action@v2 - with: - platform: x86_64 - packages: >- - git automake libtool autoconf2.5 make libhdf5-devel - libhdf4-devel zipinfo libxml2-devel perl zlib-devel - libzstd-devel libbz2-devel libaec-devel libzip-devel - libdeflate-devel gcc-core libcurl-devel libiconv-devel - libssl-devel libcrypt-devel - - name: (Autotools) Run autoconf and friends run: | cp -f /bin/dash /bin/sh @@ -79,3 +87,23 @@ jobs: timeout-minutes: 30 run: | make check -j8 SHELL=/bin/dash + + fetch_content_cmake: + needs: build-deps + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - name: Run Cmake + run: | + cd integration_tests/fetch_content + cmake -S . -B build -D + + - name: Build + run: | + cd build + cmake --build build --parallel + + - name: Run tests + run: | + ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 978275cf6c..8d289e41ed 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -16,8 +16,7 @@ concurrency: cancel-in-progress: true jobs: - - build-and-test-autotools: + build-deps: runs-on: windows-latest defaults: @@ -33,6 +32,18 @@ jobs: update: true install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib + build-and-test-autotools: + + needs: build-deps + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + steps: + + - uses: actions/checkout@v3 + ### # Configure and build ### @@ -73,3 +84,23 @@ jobs: path: | */*.log */*.trs + + fetch_content_cmake: + needs: build-deps + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - name: Run Cmake + run: | + cd integration_tests/fetch_content + cmake -S . -B build -D + + - name: Build + run: | + cd build + cmake --build build --parallel + + - name: Run tests + run: | + ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/integration_tests/fetch_content/CMakeLists.txt b/integration_tests/fetch_content/CMakeLists.txt new file mode 100644 index 0000000000..1b856157ec --- /dev/null +++ b/integration_tests/fetch_content/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.11) +project(NetCDFExample) + +include(FetchContent) + +# Fetch NetCDF +FetchContent_Declare( + netcdf + GIT_REPOSITORY https://github.com/Unidata/netcdf-c + GIT_TAG main +) + +set(ENABLE_TESTS OFF CACHE BOOL "" FORCE) + +FetchContent_MakeAvailable(netcdf) + +# Add executable +add_executable(netcdf_example main.c) + +# Link against NetCDF +target_link_libraries(netcdf_example PUBLIC netcdf) + +# Add test +enable_testing() +add_test(NAME netcdf_example_test COMMAND netcdf_example) diff --git a/integration_tests/fetch_content/main.c b/integration_tests/fetch_content/main.c new file mode 100644 index 0000000000..e1525196bd --- /dev/null +++ b/integration_tests/fetch_content/main.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("NetCDF library version: %s\n", nc_inq_libvers()); + return 0; +} \ No newline at end of file From 0dc595c04ed5830ac27d44a39f8d9249fc258f8b Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 16:56:41 -0500 Subject: [PATCH 02/30] trying to cache deps --- .github/workflows/run_tests_win_cygwin.yml | 11 ++++++++++- .github/workflows/run_tests_win_mingw.yml | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index c46b45d0f9..691be8c487 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -19,7 +19,16 @@ jobs: - uses: actions/checkout@v3 - - uses: cygwin/cygwin-install-action@v2 + - name: Cache netcdf-dependencies + id: cache-netcdf-dependencies + uses: actions/cache@v3 + with: + path: ~/environments/netcdf-dependencies + key: netcdf-dependencies + + - name: Build and install dependencies + if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' + uses: cygwin/cygwin-install-action@v2 with: platform: x86_64 packages: >- diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 8d289e41ed..9ba6d51a56 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -86,8 +86,14 @@ jobs: */*.trs fetch_content_cmake: + needs: build-deps runs-on: windows-latest + + defaults: + run: + shell: msys2 {0} + steps: - uses: actions/checkout@v3 From 81b0ca0a577174abdf4fcb21dedd1bc0e5680289 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:09:54 -0500 Subject: [PATCH 03/30] removing the caching from windows stuff, didn't know what I was doing --- .github/workflows/run_tests_osx.yml | 2 +- .github/workflows/run_tests_ubuntu.yml | 2 +- .github/workflows/run_tests_win_cygwin.yml | 58 +++++++++++----------- .github/workflows/run_tests_win_mingw.yml | 25 ++++------ 4 files changed, 40 insertions(+), 47 deletions(-) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index d945745004..e8132f597d 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -488,7 +488,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -D + cmake -S . -B build - name: Build run: | diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index 43ebe59ad0..94c9092f0a 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -898,7 +898,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -D + cmake -S . -B build - name: Build run: | diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index 691be8c487..ffc67d812d 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -12,34 +12,7 @@ env: CYGWIN_NOWINPATH: 1 jobs: - build-deps: - runs-on: windows-latest - - steps: - - - uses: actions/checkout@v3 - - - name: Cache netcdf-dependencies - id: cache-netcdf-dependencies - uses: actions/cache@v3 - with: - path: ~/environments/netcdf-dependencies - key: netcdf-dependencies - - - name: Build and install dependencies - if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' - uses: cygwin/cygwin-install-action@v2 - with: - platform: x86_64 - packages: >- - git automake libtool autoconf2.5 make libhdf5-devel - libhdf4-devel zipinfo libxml2-devel perl zlib-devel - libzstd-devel libbz2-devel libaec-devel libzip-devel - libdeflate-devel gcc-core libcurl-devel libiconv-devel - libssl-devel libcrypt-devel - build-and-test-autotools: - needs: build-deps runs-on: windows-latest defaults: run: @@ -57,6 +30,18 @@ jobs: - uses: actions/checkout@v3 + - name: Build and install dependencies + if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' + uses: cygwin/cygwin-install-action@v2 + with: + platform: x86_64 + packages: >- + git automake libtool autoconf2.5 make libhdf5-devel + libhdf4-devel zipinfo libxml2-devel perl zlib-devel + libzstd-devel libbz2-devel libaec-devel libzip-devel + libdeflate-devel gcc-core libcurl-devel libiconv-devel + libssl-devel libcrypt-devel + - name: (Autotools) Run autoconf and friends run: | cp -f /bin/dash /bin/sh @@ -98,15 +83,30 @@ jobs: make check -j8 SHELL=/bin/dash fetch_content_cmake: - needs: build-deps runs-on: windows-latest + defaults: + run: + shell: bash -eo pipefail -o igncr "{0}" + steps: - uses: actions/checkout@v3 + - name: Build and install dependencies + if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' + uses: cygwin/cygwin-install-action@v2 + with: + platform: x86_64 + packages: >- + git automake libtool autoconf2.5 make libhdf5-devel + libhdf4-devel zipinfo libxml2-devel perl zlib-devel + libzstd-devel libbz2-devel libaec-devel libzip-devel + libdeflate-devel gcc-core libcurl-devel libiconv-devel + libssl-devel libcrypt-devel + - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -D + cmake -S . -B build - name: Build run: | diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 9ba6d51a56..ae191ea653 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true jobs: - build-deps: + build-and-test-autotools: runs-on: windows-latest defaults: @@ -26,24 +26,12 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib - - build-and-test-autotools: - - needs: build-deps - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - - steps: - - - uses: actions/checkout@v3 - ### # Configure and build ### @@ -87,7 +75,6 @@ jobs: fetch_content_cmake: - needs: build-deps runs-on: windows-latest defaults: @@ -97,10 +84,16 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib + - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -D + cmake -S . -B build - name: Build run: | From a9a8dfbfc326a17dd2682a5ee44b33b7a0869bc2 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:13:15 -0500 Subject: [PATCH 04/30] fetching the h5 stuff --- .github/workflows/run_tests_osx.yml | 20 ++++++++++++++++++++ .github/workflows/run_tests_ubuntu.yml | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index e8132f597d..bd3e4cd85f 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -482,9 +482,29 @@ jobs: fetch_content_cmake: needs: build-deps-osx runs-on: macos-12 + strategy: + matrix: + hdf5: [ 1.12.2, 1.14.3 ] steps: - uses: actions/checkout@v3 + ### + # Fetch Cache + ### + - name: Fetch HDF Cache + id: cache-hdf5-osx + uses: actions/cache@v3 + with: + path: ~/environments/${{ matrix.hdf5 }} + key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }} + + - name: Check Cache + shell: bash -l {0} + run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib + + ### + # Configure and build + ### - name: Run Cmake run: | cd integration_tests/fetch_content diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index 94c9092f0a..bc9277340e 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -895,6 +895,24 @@ jobs: steps: - uses: actions/checkout@v3 + ### + # Fetch Cache + ### + + - name: Fetch HDF Cache + id: cache-hdf5 + uses: actions/cache@v3 + with: + path: ~/environments/${{ matrix.hdf5 }} + key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }} + + - name: Check Cache + shell: bash -l {0} + run: ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib + + ### + # Configure and build + ### - name: Run Cmake run: | cd integration_tests/fetch_content From 96ad9ae842ed834a4a02d8f5a570c86223ffae0f Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:18:12 -0500 Subject: [PATCH 05/30] ubuntu needed matrix --- .github/workflows/run_tests_ubuntu.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index bc9277340e..b0e01eee5e 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -892,6 +892,9 @@ jobs: fetch_content_cmake: needs: build-deps-serial runs-on: ubuntu-latest + strategy: + matrix: + hdf5: [ 1.14.3 ] steps: - uses: actions/checkout@v3 From dfc6031564d99862686e7cbf523cb45f2f3e7878 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:22:50 -0500 Subject: [PATCH 06/30] environment variables --- .github/workflows/run_tests_osx.yml | 7 +++++++ .github/workflows/run_tests_ubuntu.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index bd3e4cd85f..c885ed194d 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -488,6 +488,13 @@ jobs: steps: - uses: actions/checkout@v3 + ### + # Set Environmental Variables + ### + + - run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV + - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV + ### # Fetch Cache ### diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index b0e01eee5e..cb2c5191f0 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -898,6 +898,13 @@ jobs: steps: - uses: actions/checkout@v3 + ### + # Set Environmental Variables + ### + + - run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV + - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV + ### # Fetch Cache ### From 9df07300a1217f39a98fefefe0441e54c7f5ad00 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:27:25 -0500 Subject: [PATCH 07/30] installing deps on linux --- .github/workflows/run_tests_ubuntu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index cb2c5191f0..eb8d282a79 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -898,6 +898,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install System dependencies + shell: bash -l {0} + run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev mpich libmpich-dev + ### # Set Environmental Variables ### From cac854fc0755ad1fbf4bb8c6b833f3679939f123 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:33:08 -0500 Subject: [PATCH 08/30] correcting paths --- .github/workflows/run_tests_osx.yml | 2 +- .github/workflows/run_tests_ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index c885ed194d..ae19ecfc4b 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -519,7 +519,7 @@ jobs: - name: Build run: | - cd build + cd integration_tests/fetch_content/build cmake --build build --parallel - name: Run tests diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index eb8d282a79..e271cd4c8b 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -934,7 +934,7 @@ jobs: - name: Build run: | - cd build + cd integration_tests/fetch_content/build cmake --build build --parallel - name: Run tests From a4aa0f933b1c346dfaa322efea70b21d0cb87f43 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:36:49 -0500 Subject: [PATCH 09/30] path again --- .github/workflows/run_tests_osx.yml | 3 ++- .github/workflows/run_tests_ubuntu.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index ae19ecfc4b..5617989d71 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -519,9 +519,10 @@ jobs: - name: Build run: | - cd integration_tests/fetch_content/build + cd integration_tests/fetch_content cmake --build build --parallel - name: Run tests run: | + cd integration_tests/fetch_content/build ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index e271cd4c8b..e54e58ad34 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -934,9 +934,10 @@ jobs: - name: Build run: | - cd integration_tests/fetch_content/build + cd integration_tests/fetch_content cmake --build build --parallel - name: Run tests run: | + cd integration_tests/fetch_content/build ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file From 5b8c273e1414891e3d3145de48efb66f985bc2bb Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:44:11 -0500 Subject: [PATCH 10/30] including documentation for fetch content --- docs/building-with-cmake.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/building-with-cmake.md b/docs/building-with-cmake.md index 3448976b4b..83acbebe2c 100644 --- a/docs/building-with-cmake.md +++ b/docs/building-with-cmake.md @@ -101,6 +101,32 @@ or > $ cmake --build [Build Directory] --target install +## Including netcdf with cmake's FetchContent + +Some projects may wish to have cmake handle including their project dependencies with [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html). netCDF's cmake file's also support this. An example cmake setup +that downloads a specific tag of netCDF and links it to some cmake target shows how this can be done. + +``` +include(FetchContent) + +# Fetch NetCDF +FetchContent_Declare( + netcdf + GIT_REPOSITORY https://github.com/Unidata/netcdf-c + GIT_TAG main +) + +# disable netCDF tests +set(ENABLE_TESTS OFF CACHE BOOL "" FORCE) + +FetchContent_MakeAvailable(netcdf) + +add_executable(netcdf_example main.c) + +# Link against NetCDF +target_link_libraries(netcdf_example PUBLIC netcdf) +``` + # See Also {#cmake_see_also} For further information regarding NetCDF and CMake, see \ref cmake_faq From e6da400c490c110aaacd4b0001de17709a095ef2 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 17:53:49 -0500 Subject: [PATCH 11/30] fixing paths --- .github/workflows/run_tests_win_cygwin.yml | 8 +++----- .github/workflows/run_tests_win_mingw.yml | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index ffc67d812d..3db179d820 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -30,9 +30,7 @@ jobs: - uses: actions/checkout@v3 - - name: Build and install dependencies - if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' - uses: cygwin/cygwin-install-action@v2 + - uses: cygwin/cygwin-install-action@v2 with: platform: x86_64 packages: >- @@ -92,7 +90,6 @@ jobs: - uses: actions/checkout@v3 - name: Build and install dependencies - if: steps.cache-netcdf-dependencies.outputs.cache-hit != 'true' uses: cygwin/cygwin-install-action@v2 with: platform: x86_64 @@ -110,9 +107,10 @@ jobs: - name: Build run: | - cd build + cd integration_tests/fetch_content cmake --build build --parallel - name: Run tests run: | + cd integration_tests/fetch_content/build ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index ae191ea653..164329a8cd 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -97,9 +97,10 @@ jobs: - name: Build run: | - cd build + cd integration_tests/fetch_content cmake --build build --parallel - name: Run tests run: | + cd integration_tests/fetch_content/build ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file From 70e5f152f5dc5dbfa5f427ece41688897e323e1d Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:12:38 -0500 Subject: [PATCH 12/30] debugging the find --- .github/workflows/run_tests_win_cygwin.yml | 2 +- .github/workflows/run_tests_win_mingw.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index 3db179d820..a9632e5678 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -103,7 +103,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build + cmake -S . -B build --debug-find-pkg=HDF5 - name: Build run: | diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 164329a8cd..adeeacb284 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -93,7 +93,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build + cmake -S . -B build --debug-find-pkg=HDF5 - name: Build run: | From 40866b7fb442159252e0bb0e6d296c178fa6d71b Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:20:37 -0500 Subject: [PATCH 13/30] setting cmake path --- .github/workflows/run_tests_win_mingw.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index adeeacb284..1d3d9d3ff2 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -94,6 +94,7 @@ jobs: run: | cd integration_tests/fetch_content cmake -S . -B build --debug-find-pkg=HDF5 + cmake -S . -B build -DCMAKE_PREFIX_PATH="/mingw64" --debug-find-pkg=HDF5 - name: Build run: | From 8043ba756676b94789bf6bfeb0b58b46ad4532b5 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:36:35 -0500 Subject: [PATCH 14/30] just the one --- .github/workflows/run_tests_win_mingw.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 1d3d9d3ff2..bdd52e26c6 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -93,8 +93,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build --debug-find-pkg=HDF5 - cmake -S . -B build -DCMAKE_PREFIX_PATH="/mingw64" --debug-find-pkg=HDF5 + cmake -S . -B build -DCMAKE_PREFIX_PATH="/mingw64/lib" --debug-find-pkg=HDF5 - name: Build run: | From 8ae6795c1ffb23c66836961ebe7d8beaac497111 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:45:11 -0500 Subject: [PATCH 15/30] debug --- .github/workflows/run_tests_win_cygwin.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index a9632e5678..e25f5e5684 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -100,6 +100,9 @@ jobs: libdeflate-devel gcc-core libcurl-devel libiconv-devel libssl-devel libcrypt-devel + - name: List contents of /mingw64/lib/cmake/ + run: ls -l /mingw64/lib/cmake/ + - name: Run Cmake run: | cd integration_tests/fetch_content From 479cf1ecd097d4effb0c72ca4f08f8870183f636 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:49:50 -0500 Subject: [PATCH 16/30] wrong one --- .github/workflows/run_tests_win_cygwin.yml | 3 --- .github/workflows/run_tests_win_mingw.yml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index e25f5e5684..a9632e5678 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -100,9 +100,6 @@ jobs: libdeflate-devel gcc-core libcurl-devel libiconv-devel libssl-devel libcrypt-devel - - name: List contents of /mingw64/lib/cmake/ - run: ls -l /mingw64/lib/cmake/ - - name: Run Cmake run: | cd integration_tests/fetch_content diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index bdd52e26c6..5a34b4addd 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -90,6 +90,9 @@ jobs: update: true install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib + - name: List contents of /mingw64/lib/cmake/ + run: ls -l /mingw64/lib/cmake/ + - name: Run Cmake run: | cd integration_tests/fetch_content From 9d6e798655d4e052819fd2025f53ea75efe75571 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 09:56:57 -0500 Subject: [PATCH 17/30] maybe this --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 5a34b4addd..e87bfab95d 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -96,7 +96,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -DCMAKE_PREFIX_PATH="/mingw64/lib" --debug-find-pkg=HDF5 + cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64/lib64" --debug-find-pkg=HDF5 - name: Build run: | From 0d68b339c91fee4ac7810a7392ad5f8261b7c12c Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 10:12:10 -0500 Subject: [PATCH 18/30] fixing path --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index e87bfab95d..9470790b9e 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -96,7 +96,7 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64/lib64" --debug-find-pkg=HDF5 + cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64" --debug-find-pkg=HDF5 - name: Build run: | From 6cbff81e6dc6d20d1b419c9cb4baefbde5a13900 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 10:39:52 -0500 Subject: [PATCH 19/30] verbose serial build --- .github/workflows/run_tests_win_cygwin.yml | 3 +++ .github/workflows/run_tests_win_mingw.yml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index a9632e5678..b0392c6ff4 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -100,6 +100,9 @@ jobs: libdeflate-devel gcc-core libcurl-devel libiconv-devel libssl-devel libcrypt-devel + - name: List contents of /usr/lib + run: ls -l /usr/lib + - name: Run Cmake run: | cd integration_tests/fetch_content diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 9470790b9e..98689b4eac 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -96,12 +96,12 @@ jobs: - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64" --debug-find-pkg=HDF5 + cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64" - name: Build run: | cd integration_tests/fetch_content - cmake --build build --parallel + cmake --build build --verbose - name: Run tests run: | From 150b2c025f763baf1fb3cbc677bcc78800c53bdf Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 10:45:49 -0500 Subject: [PATCH 20/30] and now this --- .github/workflows/run_tests_win_cygwin.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index b0392c6ff4..1deb032512 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -100,13 +100,13 @@ jobs: libdeflate-devel gcc-core libcurl-devel libiconv-devel libssl-devel libcrypt-devel - - name: List contents of /usr/lib - run: ls -l /usr/lib + - name: List contents of /usr/lib/cmake + run: ls -l /usr/lib/cmake - name: Run Cmake run: | cd integration_tests/fetch_content - cmake -S . -B build --debug-find-pkg=HDF5 + cmake -S . -B build -DHDF5_ROOT="/usr" -DCMAKE_PREFIX_PATH="/usr" - name: Build run: | From 487faa9f3f155889dd42eff05b06e2990912ff95 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 10:55:36 -0500 Subject: [PATCH 21/30] adding a library? --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 98689b4eac..b757aaa406 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -88,7 +88,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib + install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-dlfcn - name: List contents of /mingw64/lib/cmake/ run: ls -l /mingw64/lib/cmake/ From b5f82d38f879bfd992261993b3b34b085f075648 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 10:59:43 -0500 Subject: [PATCH 22/30] correct name --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index b757aaa406..8d7dc0ba58 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -88,7 +88,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-dlfcn + install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn - name: List contents of /mingw64/lib/cmake/ run: ls -l /mingw64/lib/cmake/ From 62bea0cf094413932d09791a4177b4fb5e7fb588 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 11:18:08 -0500 Subject: [PATCH 23/30] installing curl? --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 8d7dc0ba58..9cb4cfa3a5 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -88,7 +88,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn + install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn mingw-w64-curl - name: List contents of /mingw64/lib/cmake/ run: ls -l /mingw64/lib/cmake/ From 9c7cb021fb504a02c3d307810eb7a6b5e14855ae Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 11:20:45 -0500 Subject: [PATCH 24/30] full name --- .github/workflows/run_tests_win_mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 9cb4cfa3a5..6b13c69f2f 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -88,7 +88,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn mingw-w64-curl + install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn mingw-w64-x86_64-curl - name: List contents of /mingw64/lib/cmake/ run: ls -l /mingw64/lib/cmake/ From d77206a87e1e4ad2ac7c38fe379199bbf83901d8 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Tue, 19 Mar 2024 14:38:23 -0500 Subject: [PATCH 25/30] maybe curl works now? --- .github/workflows/run_tests_win_mingw.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 6b13c69f2f..db545861db 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -80,6 +80,8 @@ jobs: defaults: run: shell: msys2 {0} + env: + CURL_STATICLIB: "1" steps: - uses: actions/checkout@v3 From 7d1c71a6efee839815205c37d903ccff7d5cbea1 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 22 Mar 2024 12:29:17 -0500 Subject: [PATCH 26/30] removing fetch content example from cygwin and mingw builds --- .github/workflows/run_tests_win_cygwin.yml | 40 +--------------------- .github/workflows/run_tests_win_mingw.yml | 39 +-------------------- 2 files changed, 2 insertions(+), 77 deletions(-) diff --git a/.github/workflows/run_tests_win_cygwin.yml b/.github/workflows/run_tests_win_cygwin.yml index 1deb032512..8d058ce358 100644 --- a/.github/workflows/run_tests_win_cygwin.yml +++ b/.github/workflows/run_tests_win_cygwin.yml @@ -78,42 +78,4 @@ jobs: - name: (Autotools) Build and run tests timeout-minutes: 30 run: | - make check -j8 SHELL=/bin/dash - - fetch_content_cmake: - runs-on: windows-latest - defaults: - run: - shell: bash -eo pipefail -o igncr "{0}" - - steps: - - uses: actions/checkout@v3 - - - name: Build and install dependencies - uses: cygwin/cygwin-install-action@v2 - with: - platform: x86_64 - packages: >- - git automake libtool autoconf2.5 make libhdf5-devel - libhdf4-devel zipinfo libxml2-devel perl zlib-devel - libzstd-devel libbz2-devel libaec-devel libzip-devel - libdeflate-devel gcc-core libcurl-devel libiconv-devel - libssl-devel libcrypt-devel - - - name: List contents of /usr/lib/cmake - run: ls -l /usr/lib/cmake - - - name: Run Cmake - run: | - cd integration_tests/fetch_content - cmake -S . -B build -DHDF5_ROOT="/usr" -DCMAKE_PREFIX_PATH="/usr" - - - name: Build - run: | - cd integration_tests/fetch_content - cmake --build build --parallel - - - name: Run tests - run: | - cd integration_tests/fetch_content/build - ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file + make check -j8 SHELL=/bin/dash \ No newline at end of file diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index db545861db..48c441c747 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -71,41 +71,4 @@ jobs: name: mingw-autotools-test-logs path: | */*.log - */*.trs - - fetch_content_cmake: - - runs-on: windows-latest - - defaults: - run: - shell: msys2 {0} - env: - CURL_STATICLIB: "1" - - steps: - - uses: actions/checkout@v3 - - - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 mingw-w64-x86_64-zlib mingw-w64-x86_64-dlfcn mingw-w64-x86_64-curl - - - name: List contents of /mingw64/lib/cmake/ - run: ls -l /mingw64/lib/cmake/ - - - name: Run Cmake - run: | - cd integration_tests/fetch_content - cmake -S . -B build -DHDF5_ROOT="/mingw64" -DCMAKE_PREFIX_PATH="/mingw64" - - - name: Build - run: | - cd integration_tests/fetch_content - cmake --build build --verbose - - - name: Run tests - run: | - cd integration_tests/fetch_content/build - ctest --rerun-failed --output-on-failure . --verbose \ No newline at end of file + */*.trs \ No newline at end of file From ccfcafd4edd9963cbed04be8c2bce0620929d00b Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 22 Mar 2024 12:38:17 -0500 Subject: [PATCH 27/30] adding appveyor fetch content test --- appveyor.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 970be33afd..ce56c306a0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,3 +42,11 @@ build_script: test_script: - cmd: cmake --build . --config Release --target install -- /maxcpucount:4 + +fetch_content: + - cmd: cd integration_tests/fetch_content + - cmd: mkdir build + - cmd: cd build + - cmd: cmake .. + - cmd: cmake --build . --config Release -- /maxcpucount:4 + - cmd: ctest -C Release -V From bcb31701c3bbe56eb7712e06b9c8f093c99f4e78 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 22 Mar 2024 12:50:10 -0500 Subject: [PATCH 28/30] trying to correct appveyor --- appveyor.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ce56c306a0..505363fcaf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,14 +39,15 @@ build_script: - cmd: cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%INSTALL_LOC% -DENABLE_BASH_SCRIPT_TESTING=OFF -DENABLE_FILTER_TESTING=OFF -DENABLE_BYTERANGE=ON - cmd: if errorlevel 1 exit 1 - cmd: cmake --build . --config Release -- /maxcpucount:4 - -test_script: - - cmd: cmake --build . --config Release --target install -- /maxcpucount:4 - -fetch_content: - - cmd: cd integration_tests/fetch_content + # Check fetch content integration + - cmd: cd ../integration_tests/fetch_content - cmd: mkdir build - cmd: cd build - cmd: cmake .. - cmd: cmake --build . --config Release -- /maxcpucount:4 - - cmd: ctest -C Release -V + # go back to the first build directory + - cmd: cd ../../../build + +test_script: + - cmd: cmake --build . --config Release --target install -- /maxcpucount:4 + From c8346364cb244d27d9615563a8f61df7d8a738f4 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 22 Mar 2024 14:50:02 -0500 Subject: [PATCH 29/30] testing the fetch content thing --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 505363fcaf..8224c1c9ec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,4 +50,6 @@ build_script: test_script: - cmd: cmake --build . --config Release --target install -- /maxcpucount:4 + - cmd: cd ../integration_tests/fetch_content/build + - cmd: ctest -C Release -V From f216dbf0df8658723a4b430c6f4e6d4df53c91a8 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Sat, 23 Mar 2024 15:39:03 -0500 Subject: [PATCH 30/30] making appveyor pass --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8224c1c9ec..505363fcaf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,6 +50,4 @@ build_script: test_script: - cmd: cmake --build . --config Release --target install -- /maxcpucount:4 - - cmd: cd ../integration_tests/fetch_content/build - - cmd: ctest -C Release -V