use --install in installation tests on Windows #698
Workflow file for this run
  
    
      This file contains hidden or 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
    
  
  
    
  | # Various non-standard tests, requiring e.g. longer run | |
| name: Nightly | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| BUILD_DIR : "${{github.workspace}}/build" | |
| INSTALL_DIR: "${{github.workspace}}/build/install" | |
| jobs: | |
| Windows-generators: | |
| name: Windows ${{matrix.generator}} generator | |
| strategy: | |
| matrix: | |
| build_type: [Debug, Release] | |
| compiler: [{c: cl, cxx: cl}] | |
| shared_library: ['ON', 'OFF'] | |
| static_hwloc: ['ON', 'OFF'] | |
| generator: ['Ninja', 'NMake Makefiles'] | |
| umfd_lib: ['ON', 'OFF'] | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set VCPKG_PATH with hwloc | |
| if: matrix.static_hwloc == 'OFF' | |
| run: echo "VCPKG_PATH=${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" >> $env:GITHUB_ENV | |
| - name: Set VCPKG_PATH without hwloc | |
| if: matrix.static_hwloc == 'ON' | |
| run: echo "VCPKG_PATH=${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" >> $env:GITHUB_ENV | |
| - name: Initialize vcpkg | |
| uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 | |
| env: | |
| VCPKG_PATH: ${{env.VCPKG_PATH}} | |
| with: | |
| vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025 | |
| vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg | |
| vcpkgJsonGlob: '**/vcpkg.json' | |
| - name: Install dependencies | |
| run: vcpkg install --triplet x64-windows | |
| - name: Install Ninja | |
| if: matrix.generator == 'Ninja' | |
| uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 | |
| - name: Configure MSVC environment | |
| uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | |
| - name: Configure build | |
| run: > | |
| cmake | |
| -B ${{env.BUILD_DIR}} | |
| -DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
| -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" | |
| -DCMAKE_C_COMPILER=${{matrix.compiler.c}} | |
| -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | |
| -G "${{matrix.generator}}" | |
| -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} | |
| -DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}} | |
| -DUMF_FORMAT_CODE_STYLE=OFF | |
| -DUMF_DEVELOPER_MODE=ON | |
| -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON | |
| -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON | |
| -DUMF_BUILD_CUDA_PROVIDER=ON | |
| -DUMF_TESTS_FAIL_ON_SKIP=ON | |
| ${{ matrix.umfd_lib == 'ON' && '-DUMF_USE_DEBUG_POSTFIX=ON' || '' }} | |
| - name: Build UMF | |
| shell: cmd | |
| run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS% | |
| - name: Run tests | |
| shell: cmd | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test | |
| - name: Get UMF version | |
| run: | | |
| $version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value | |
| echo "UMF_VERSION=$version" >> $env:GITHUB_ENV | |
| shell: pwsh | |
| - name: Test UMF installation and uninstallation | |
| # The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library | |
| # The '--umfd-lib' parameter is added when the UMF is built with the umfd library | |
| run: > | |
| python3 ${{github.workspace}}/test/test_installation.py | |
| --build-dir ${{env.BUILD_DIR}} | |
| --install-dir ${{env.INSTALL_DIR}} | |
| --build-type ${{matrix.build_type}} | |
| --umf-version ${{env.UMF_VERSION}} | |
| ${{ matrix.shared_library == 'ON' && '--proxy --shared-library' || '' }} | |
| ${{ matrix.umfd_lib == 'ON' && '--umfd-lib' || ''}} | |
| ${{ matrix.static_hwloc == 'ON' && '--hwloc' || '' }} |