GitHub Actions : Improve packaging and run pytest

Remove temporary folder inside packaging folder
Run pytest on Windows
This commit is contained in:
Magne Sjaastad
2020-02-28 16:08:09 +01:00
parent b497555f87
commit 21610d055a

View File

@@ -56,6 +56,7 @@ jobs:
cd cmakebuild
cmake .. -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -A x64
cmake --build . --config Release --target PACKAGE
rd packages/_CPack_Packages -Recurse
- name: Build ResInsight-x64 Linux
if: "contains( matrix.os, 'ubuntu')"
run: |
@@ -63,15 +64,16 @@ jobs:
cd cmakebuild
cmake .. -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release
make package
rm -rf packages/_CPack_Packages
- name: Test with pytest
if: "contains( matrix.os, '##-undefined-##')" # To be used when RESINSIGHT_GRPC_PYTHON_EXECUTABLE can be 'python' without extention in PATH
if: "contains( matrix.os, 'windows')" # To be used when RESINSIGHT_GRPC_PYTHON_EXECUTABLE can be 'python' without extention in PATH
env:
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationCode/Release/ResInsight.exe
run: |
cd ApplicationCode/GrpcInterface/Python/rips
pytest --console
- name: Upload artifact
if: "contains( matrix.os, 'windows')"
uses: actions/upload-artifact@v1
with:
name: ResInsight