Repository navigation
85 lines (82 loc) · 3.25 KB
/
Copy pathmultiplat.yml
File metadata and controls
85 lines (82 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Multiplatform Build and Test
on:
push:
branches:
- main
- "feature/**"
- "release/**"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
NODE_VERSION: "22.14.0"
PYTHON_VERSION: "3.11"
RUST_TOOLCHAIN_VERSION: "1.95"
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy
jobs:
build-and-test-all-platforms:
name: Build and Test (All Platforms)
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
env:
QDK_LIB_OVERRIDE_MICROSOFT_QDK: ${{ github.workspace }}
permissions:
issues: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: "true"
- name: Setup rust toolchain
uses: ./.github/actions/toolchains/rust
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
components: ${{ env.RUST_TOOLCHAIN_COMPONENTS }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Prereqs
run: python ./prereqs.py --install
- name:
Build and Test
# we use xvfb-run to provide a virtual framebuffer for the VS Code tester,
# which requires a display to run
run: xvfb-run -a python ./build.py --integration-tests
if: runner.os == 'Linux'
- name: Build and Test
run: python ./build.py --integration-tests
if: runner.os != 'Linux'
- name: Test course notebooks
run: python ./build.py --no-check --no-check-prereqs --course-notebook-tests
- name: File issue on failure
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
id: create-issue
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
url="$(gh issue create \
--title "CI failure: ${{ matrix.platform }} (${{ github.run_id }})" \
--body "See the corresponding [**workflow run**](${{ env.WORKFLOW_RUN_URL }}) for failure details, update the issue with any relevant information, and assign to the appropriate team member(s)." \
--label ci_failure \
--assignee swernli,idavis,amcasey,billti)"
number="$(gh issue view "$url" --json number --jq .number)"
echo "url=$url" >> "$GITHUB_OUTPUT"
echo "number=$number" >> "$GITHUB_OUTPUT"
- name: "If Fuzzing Failed: Log Issue Info"
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
run: |
echo "Created issue #${{ steps.create-issue.outputs.number }} ${{ steps.create-issue.outputs.url }}"