microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
508fb90401be5e3bb2a4a7e36d030d5b2639318f

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

90lines · modecode

1name: CI Build and Test
2
3on:
4 push:
5 branches: [main]
6 pull_request:
7 branches: [main]
8 workflow_dispatch:
9
10env:
11 CARGO_TERM_COLOR: always
12 RUST_TOOLCHAIN_VERSION: 1.68
13 RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy
14
15jobs:
16 format:
17 name: Format
18 runs-on: ubuntu-latest
19 steps:
20 - uses: actions/checkout@v3
21 with:
22 submodules: "true"
23 - name: Setup rust toolchain
24 uses: ./.github/actions/toolchains/rust
25 with:
26 toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
27 components: ${{ env.RUST_TOOLCHAIN_COMPONENTS }}
28 - name: Check Formatting
29 run: cargo fmt -v --all -- --check
30
31 clippy:
32 name: Clippy
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v3
36 with:
37 submodules: "true"
38 - name: Setup rust toolchain
39 uses: ./.github/actions/toolchains/rust
40 with:
41 toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
42 components: ${{ env.RUST_TOOLCHAIN_COMPONENTS }}
43 - uses: Swatinem/rust-cache@v2
44 - name: Clippy Lints
45 run: cargo clippy -vv --all-targets --all-features -- -D warnings
46
47 benches:
48 name: Benches
49 runs-on: ubuntu-latest
50 steps:
51 - uses: actions/checkout@v3
52 with:
53 submodules: "true"
54 - name: Setup rust toolchain
55 uses: ./.github/actions/toolchains/rust
56 with:
57 toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
58 components: ${{ env.RUST_TOOLCHAIN_COMPONENTS }}
59 - uses: Swatinem/rust-cache@v2
60 - name: cargo bench
61 run: cargo bench --workspace
62
63 build:
64 name: CI Build and Test
65 strategy:
66 matrix:
67 os: [windows-latest, ubuntu-latest, macos-latest]
68
69 runs-on: ${{matrix.os}}
70
71 steps:
72 - uses: actions/checkout@v3
73 with:
74 submodules: "true"
75 - name: Setup rust toolchain
76 uses: ./.github/actions/toolchains/rust
77 with:
78 toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
79 components: ${{ env.RUST_TOOLCHAIN_COMPONENTS }}
80 - uses: actions/setup-python@v4
81 with:
82 python-version: '3.11'
83 - uses: actions/setup-node@v3
84 with:
85 node-version: '16.17.1'
86 - uses: Swatinem/rust-cache@v2
87 - name: Prereqs
88 run: python ./prereqs.py --install
89 - name: Build and Test
90 run: python ./build.py --release --test
91