diff --git a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml index e0821d3734..d0efd9debd 100644 --- a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml @@ -17,7 +17,11 @@ parameters: default: 0 stages: -- stage: BUILD_STAGE +# Separate stage for building CPU vs NNAPI as we only want CodeQL to run on one of them so we don't get duplicate +# issues for code that is built in both. We pick NNAPI as that includes the NNAPI EP code. +- stage: BUILD_CPU_STAGE + variables: + Codeql.Enabled: false jobs: - job: Build_CPU_EP pool: onnxruntime-Linux-CPU-For-Android-CI @@ -104,9 +108,20 @@ stages: - template: templates/clean-agent-build-directory-step.yml +- stage: BUILD_NNAPI_STAGE + variables: + Codeql.ProjectConfigPath: .github/workflows + Codeql.Enabled: true + Codeql.Language: cpp + ${{ if variables['Codeql.Enabled'] }}: + JobsTimeout: 120 + ${{ else }}: + JobsTimeout: 60 + + jobs: - job: Build_NNAPI_EP pool: onnxruntime-Linux-CPU-For-Android-CI - timeoutInMinutes: 60 + timeoutInMinutes: ${{ variables.JobsTimeout }} workspace: clean: all condition: notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') @@ -188,7 +203,7 @@ stages: - template: templates/clean-agent-build-directory-step.yml - stage: TEST_STAGE - dependsOn: BUILD_STAGE + dependsOn: [BUILD_CPU_STAGE, BUILD_NNAPI_STAGE] jobs: - job: Test_CPU_EP pool: