parameters: cpack: true run_tests: true cmake_stepvars: '' lslcfgs: ['default', 'ipv4only', 'ipv6only', 'ipv4_lsl100', 'ipv6_lsl100'] tests: ['lsl_test_exported', 'lsl_test_internal'] steps: - task: CMake@1 inputs: cmakeArgs: '--version' - task: CMake@1 inputs: cmakeArgs: '-DLSL_UNITTESTS=1 ${{ parameters.cmake_stepvars }} $(cmakeargs) ..' displayName: 'Configure build' - task: CMake@1 inputs: cmakeArgs: '--build . -j --config Release --target install' displayName: 'Build files' - ${{ if eq(parameters.cpack, 'true') }}: - bash: cpack workingDirectory: 'build' displayName: 'create cpack packages' - ${{ if eq(parameters.run_tests, 'true') }}: - ${{ each lslcfg in parameters.lslcfgs }}: - ${{ each lsltest in parameters.tests }}: - bash: build/install/bin/${{lsltest}} --order rand --durations yes -r junit -n ${{lsltest}}_$(Agent.JobName)_${{lslcfg}} -o ${{lsltest}}_$(Agent.JobName)_${{lslcfg}}.xml displayName: 'Run unit tests' timeoutInMinutes: 5 continueOnError: true env: LSLAPICFG: testing/lslcfgs/${{lslcfg}}.cfg - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' testResultsFiles: 'lsl_*.xml' failTaskOnFailedTests: false - publish: $(System.DefaultWorkingDirectory) artifact: '$(Agent.JobName)_artifacts'