microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
.ado/build.yml
67lines · modecode
| 1 | name: qsharp |
| 2 | |
| 3 | trigger: |
| 4 | - main |
| 5 | |
| 6 | pr: |
| 7 | - main |
| 8 | |
| 9 | variables: |
| 10 | CARGO_TERM_COLOR: always |
| 11 | RUST_TOOLCHAIN_VERSION: "1.77" |
| 12 | |
| 13 | schedules: |
| 14 | - cron: "0 9 * * Sat" |
| 15 | displayName: 'Build for Component Governance' |
| 16 | branches: |
| 17 | include: |
| 18 | - main |
| 19 | always: true |
| 20 | |
| 21 | jobs: |
| 22 | - job: "qsharp" |
| 23 | pool: |
| 24 | vmImage: 'ubuntu-latest' |
| 25 | timeoutInMinutes: 120 |
| 26 | steps: |
| 27 | - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
| 28 | displayName: 'Component detection' |
| 29 | |
| 30 | - task: RustInstaller@1 |
| 31 | inputs: |
| 32 | rustVersion: ms-$(RUST_TOOLCHAIN_VERSION) |
| 33 | additionalTargets: wasm32-unknown-unknown |
| 34 | cratesIoFeedOverride: $(cratesIoFeedOverride) |
| 35 | toolchainFeed: $(toolchainFeed) |
| 36 | displayName: Install Rust toolchain |
| 37 | |
| 38 | - task: UsePythonVersion@0 |
| 39 | inputs: |
| 40 | versionSpec: '3.11' |
| 41 | |
| 42 | - task: CodeQL3000Init@0 |
| 43 | displayName: CodeQL Initialize |
| 44 | |
| 45 | - script: | |
| 46 | python ./prereqs.py --install |
| 47 | displayName: Install Prereqs |
| 48 | |
| 49 | - script: | |
| 50 | python build.py --no-check --no-test |
| 51 | displayName: Build |
| 52 | |
| 53 | - script: | |
| 54 | which ar |
| 55 | which cc |
| 56 | cc --version |
| 57 | displayName: Display compile environment setup |
| 58 | |
| 59 | - script: | |
| 60 | cd allocator/mimalloc-sys |
| 61 | mkdir -p target/codeql/out/ |
| 62 | cc -O3 -ffunction-sections -fdata-sections -fPIC -gdwarf-2 -fno-omit-frame-pointer -I mimalloc/include -I mimalloc/src -Wall -Wextra -DMI_DEBUG=0 -o target/codeql/out/mimalloc-static.o -c mimalloc/src/static.c |
| 63 | ar cq target/codeql/out/libmimalloc.a target/codeql/out/mimalloc-static.o |
| 64 | displayName: Compile mimalloc for CodeQL |
| 65 | |
| 66 | - task: CodeQL3000Finalize@0 |
| 67 | displayName: CodeQL Finalize |
| 68 | |