Add workaround for CI build (#5736)

Changes in CI config caused issues for Visual Studio custom commands related to path for Python
This commit is contained in:
Magne Sjaastad 2020-03-29 22:17:40 +02:00 committed by GitHub
parent 36b278e6c2
commit 7d20e0da0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,37 +46,37 @@ jobs:
vcpkgDirectory: '${{ github.workspace }}/vcpkg' vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- name: Prints outputs of run-vcpkg task - name: Prints outputs of run-vcpkg task
run: echo "'${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}' '${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}' " run: echo "'${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}' '${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}' "
- name: Build ResInsight-x64 - name: (Windows) Build ResInsight-x64
uses: lukka/run-cmake@v0 if: "contains( matrix.os, 'windows')"
with: run: |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced mkdir cmakebuild
cmakeAppendedArgs: -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true cd cmakebuild
buildDirectory: ${{ github.workspace }}/cmakebuild cmake .. -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -A x64
buildWithCMakeArgs: '--config Release --target package' cmake --build . --config Release --target PACKAGE
useVcpkgToolchainFile: true - name: (Linux) Build ResInsight-x64
if: "!contains( matrix.os, 'windows')"
run: |
mkdir cmakebuild
cd cmakebuild
cmake .. -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release --target package
- name: Remove packages/_CPack_Packages - name: Remove packages/_CPack_Packages
shell: bash shell: bash
run: | run: |
rm -rf cmakebuild/packages/_CPack_Packages rm -rf cmakebuild/packages/_CPack_Packages
- name: dir
run: find ${{ runner.workspace }}
if: "!contains( matrix.os, 'windows')"
- name: dir
run: gci -recurse ${{ runner.workspace }}
if: contains( matrix.os, 'windows')
- name: Test with pytest - name: Test with pytest
if: "contains( matrix.os, 'windows')" # To be used when RESINSIGHT_GRPC_PYTHON_EXECUTABLE can be 'python' without extention in PATH if: "contains( matrix.os, 'windows')"
env: env:
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationCode/Release/ResInsight.exe RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationCode/Release/ResInsight.exe
run: | run: |
cd ApplicationCode/GrpcInterface/Python/rips cd ApplicationCode/GrpcInterface/Python/rips
pytest --console pytest --console
- name: Run Unit Tests Windows - name: (Windows) Run Unit Tests
if: contains( matrix.os, 'windows') if: contains( matrix.os, 'windows')
shell: bash shell: bash
run: | run: |
cmakebuild/ApplicationCode/Release/ResInsight --unittest cmakebuild/ApplicationCode/Release/ResInsight --unittest
- name: Run Unit Tests Linux - name: (Linux) Run Unit Tests
if: "!contains( matrix.os, 'windows')" if: "!contains( matrix.os, 'windows')"
shell: bash shell: bash
run: | run: |
@ -86,3 +86,6 @@ jobs:
with: with:
name: ResInsight name: ResInsight
path: ${{ runner.workspace }}/ResInsight/cmakebuild/packages path: ${{ runner.workspace }}/ResInsight/cmakebuild/packages