diff options
author | Jo Shields <joshield@microsoft.com> | 2021-02-12 01:12:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 01:12:01 +0300 |
commit | 5457e366e1cf330f298b4d22474a8721d692b5dc (patch) | |
tree | 1d5f693a30059d37b24f2d5fd6f92f917dd5752b /scripts | |
parent | 9feec409d4b510226e2857808a24df07dc20a354 (diff) |
Basic AzDO pipeline (#20844)
Initial AzDO pipeline for basic CI. Ref. https://github.com/mono/mono/issues/20841
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ci/mono-ci.yml | 64 | ||||
-rwxr-xr-x | scripts/ci/run-jenkins.sh | 78 |
2 files changed, 98 insertions, 44 deletions
diff --git a/scripts/ci/mono-ci.yml b/scripts/ci/mono-ci.yml index daf5d88a50c..f03b35a5adb 100644 --- a/scripts/ci/mono-ci.yml +++ b/scripts/ci/mono-ci.yml @@ -20,7 +20,6 @@ trigger: - THIRD-PARTY-NOTICES.TXT pr: - batch: true branches: include: - master @@ -40,8 +39,63 @@ pr: - SECURITY.md - THIRD-PARTY-NOTICES.TXT -pool: - name: default +jobs: + +# +# Basic build +# +- job: + displayName: Linux x64 + pool: + vmImage: ubuntu-20.04 + timeoutInMinutes: 120 + workspace: + clean: all + steps: + - checkout: self + clean: true + fetchDepth: 10 + submodules: recursive + - script: sudo apt install -y autoconf libtool automake build-essential gettext cmake python3 curl + - script: CI_TAGS="linux-amd64,retry-flaky-tests,pull-request" scripts/ci/run-jenkins.sh # TODO: set pull-request CI tag dynamically + - task: PublishTestResults@2 + inputs: + testRunner: 'NUnit' + testResultsFiles: '**/TestResult*.xml' + +- job: + displayName: OS X x64 + pool: + vmImage: macos-10.15 + timeoutInMinutes: 120 + workspace: + clean: all + steps: + - checkout: self + clean: true + fetchDepth: 10 + submodules: recursive + - script: brew install autoconf automake libtool pkg-config cmake python3 + - script: CI_TAGS="osx-amd64,retry-flaky-tests,pull-request" scripts/ci/run-jenkins.sh # TODO: set pull-request CI tag dynamically + - task: PublishTestResults@2 + inputs: + testRunner: 'NUnit' + testResultsFiles: '**/TestResult*.xml' -steps: -- task: NuGetToolInstaller@1 +# +# MCS-only build +# +- job: + displayName: Linux x64 mcs + pool: + vmImage: ubuntu-20.04 + timeoutInMinutes: 120 + workspace: + clean: all + steps: + - checkout: self + clean: true + fetchDepth: 10 + submodules: recursive + - script: sudo apt install -y autoconf libtool automake build-essential gettext cmake python3 curl + - script: CI_TAGS="linux-amd64,mcs-compiler,no-tests,pull-request" scripts/ci/run-jenkins.sh # TODO: set pull-request CI tag dynamically diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index be3a5e4ff99..e98f4358079 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -14,45 +14,45 @@ for dir in acceptance-tests/external/*; do [ -d "$dir" ] && (cd "$dir" && echo " source ${MONO_REPO_ROOT}/scripts/ci/util.sh -if [[ ${CI_TAGS} == *'pull-request'* ]]; then - # Skip lanes which are not affected by the PR - wget -O pr-contents.diff "${ghprbPullLink}.diff" - grep '^diff' pr-contents.diff > pr-files.txt - echo "Files affected by the PR:" - cat pr-files.txt - - # FIXME: Add more - skip=false - skip_step="" - if ! grep -q -v -e a/netcore -e a/scripts/ci/pipeline-netcore-runtime.yml pr-files.txt; then - skip_step="NETCORE" - skip=true - fi - if ! grep -q -v a/mono/mini/mini-ppc pr-files.txt; then - skip_step="PPC" - skip=true - fi - if ! grep -q -v a/scripts/ci/provisioning pr-files.txt; then - skip_step="CI provisioning scripts" - skip=true - fi - if ! grep -q -v a/sdks/wasm pr-files.txt; then - if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]]; then - true - else - skip_step="WASM" - skip=true - fi - fi - if [ $skip = true ]; then - ${TESTCMD} --label="Skipped on ${skip_step}." --timeout=60m --fatal sh -c 'exit 0' - if [[ $CI_TAGS == *'apidiff'* ]]; then report_github_status "success" "API Diff" "Skipped." || true; fi - if [[ $CI_TAGS == *'csprojdiff'* ]]; then report_github_status "success" "Project Files Diff" "Skipped." || true; fi - exit 0 - fi - - rm pr-files.txt -fi +# if [[ ${CI_TAGS} == *'pull-request'* ]]; then +# # Skip lanes which are not affected by the PR +# wget -O pr-contents.diff "${ghprbPullLink}.diff" +# grep '^diff' pr-contents.diff > pr-files.txt +# echo "Files affected by the PR:" +# cat pr-files.txt + +# # FIXME: Add more +# skip=false +# skip_step="" +# if ! grep -q -v -e a/netcore -e a/scripts/ci/pipeline-netcore-runtime.yml pr-files.txt; then +# skip_step="NETCORE" +# skip=true +# fi +# if ! grep -q -v a/mono/mini/mini-ppc pr-files.txt; then +# skip_step="PPC" +# skip=true +# fi +# if ! grep -q -v a/scripts/ci/provisioning pr-files.txt; then +# skip_step="CI provisioning scripts" +# skip=true +# fi +# if ! grep -q -v a/sdks/wasm pr-files.txt; then +# if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]]; then +# true +# else +# skip_step="WASM" +# skip=true +# fi +# fi +# if [ $skip = true ]; then +# ${TESTCMD} --label="Skipped on ${skip_step}." --timeout=60m --fatal sh -c 'exit 0' +# if [[ $CI_TAGS == *'apidiff'* ]]; then report_github_status "success" "API Diff" "Skipped." || true; fi +# if [[ $CI_TAGS == *'csprojdiff'* ]]; then report_github_status "success" "Project Files Diff" "Skipped." || true; fi +# exit 0 +# fi + +# rm pr-files.txt +# fi helix_set_env_vars helix_send_build_start_event "build/source/$MONO_HELIX_TYPE/" |