Skip to content

CURA-11622 Migrate to conan V2 #66

CURA-11622 Migrate to conan V2

CURA-11622 Migrate to conan V2 #66

Workflow file for this run

name: unit-test
on:
push:
paths:
- 'src/**'
- 'include/**'
- 'test_package/**'
- 'tests/**'
- 'cmake/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements*'
branches:
- main
- master
- 'CURA-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'
tags:
- '[0-9].[0-9].[0-9]'
- '[0-9].[0-9][0-9].[0-9]'
pull_request:
paths:
- 'src/**'
- 'include/**'
- 'test_package/**'
- 'tests/**'
- 'cmake/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements*'
branches:
- main
- master
- 'CURA-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'
tags:
- '[0-9].[0-9].[0-9]'
- '[0-9].[0-9][0-9].[0-9]'
jobs:
# FIXME: Use main once merged
conan-recipe-version:
name: Calculate package version numbers
uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-11622_conan_v2
with:
project_name: savitar
secrets: inherit
testing:
name: Run unit tests
runs-on: ubuntu-latest
needs: [ conan-recipe-version ]
steps:
# FIXME: use main once merged
- name: Setup the build environment
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@CURA-11622_conan_v2
with:
conan_user: ${{ secrets.CONAN_USER }}
conan_password: ${{ secrets.CONAN_PASS }}
install_system_dependencies: true
- name: Install dependencies and build unit test
run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -o enable_testing=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv
- name: Run Unit Test
id: run-test
run: ctest --output-junit engine_test.xml
working-directory: build/Release/
- name: Publish Unit Test Results
id: test-results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }}
with:
files: "**/*.xml"
- name: Conclusion
run: echo "Conclusion is ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}"