Fix build command #69
This file contains 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
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: | ||
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 build . -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 unit_tests_results.xml | ||
working-directory: build/Release/tests | ||
- name: Publish Unit Test Results | ||
id: test-results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: ${{ always() }} | ||
with: | ||
files: build/Release/tests/unit_tests_results.xml | ||
- name: Conclusion | ||
run: echo "Conclusion is ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}" |