Repository navigation
129 lines (106 loc) · 3.85 KB
/
Copy pathRustNightly.yml
File metadata and controls
129 lines (106 loc) · 3.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Nightly
on:
workflow_dispatch:
schedule:
# 12:00 AM, every 2 days
- cron: '0 0 */2 * *'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
defaults:
run:
shell: bash
jobs:
# Nightly musl cross-compilation builds
# This is a self-contained job since musl builds are a special case
# that require TARGET_TRIPLE for cross-compilation
musl:
timeout-minutes: ${{ fromJSON(vars.NIGHTLY_JOB_TIMEOUT || '60') }}
strategy:
fail-fast: true
matrix:
hypervisor: [kvm, mshv3]
cpu_vendor: [amd, intel]
config: [debug, release]
runs-on: ${{ fromJson(
format('["self-hosted", "Linux", "X64", "1ES.Pool=hld-{0}-{1}", "JobId=musl-{2}-{3}-{4}-{5}"]',
matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu_vendor,
matrix.config,
github.run_id,
github.run_number,
github.run_attempt)) }}
env:
TARGET_TRIPLE: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: hyperlight-dev/ci-setup-workflow@3935a41ca357d6acb4274edc072b75a73a19e2b3 # v2.3.0
with:
additional-toolchain-directory: src/tests/rust_guests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-hyperlight
run: just ensure-cargo-hyperlight
- name: Build and move Rust guests
run: |
just build-rust-guests ${{ matrix.config }}
just move-rust-guests ${{ matrix.config }}
- name: Build non-PIE Rust guests
run: |
just build-rust-guests-non-pie ${{ matrix.config }}
just move-rust-guests-non-pie ${{ matrix.config }}
- name: Build C guests
run: |
just build-c-guests ${{ matrix.config }}
just move-c-guests ${{ matrix.config }}
- name: Build
run: just build ${{ matrix.config }}
- name: Run Rust tests
run: |
# with default features
just test ${{ matrix.config }}
# with only one driver enabled
just test ${{ matrix.config }} ${{ matrix.hypervisor == 'mshv3' && 'mshv3' || 'kvm' }}
# make sure certain cargo features compile
just check
# without any features
just test-compilation-no-default-features ${{ matrix.config }}
- name: Run Rust examples
env:
RUST_LOG: debug
run: just run-rust-examples-linux ${{ matrix.config }}
- name: Run Rust Gdb tests
env:
RUST_LOG: debug
run: just test-rust-gdb-debugging ${{ matrix.config }}
- name: Run Rust Crashdump tests
env:
RUST_LOG: debug
run: just test-rust-crashdump ${{ matrix.config }}
- name: Run Rust Tracing tests
env:
RUST_LOG: debug
run: just test-rust-tracing ${{ matrix.config }}
# Miri asks nothing of a runner beyond its architecture, so it runs once on a
# hosted one rather than in every entry of the musl matrix.
miri:
uses: ./.github/workflows/dep_miri.yml
secrets: inherit
with:
arch: X64
notify-failure:
runs-on: ubuntu-latest
needs: [musl, miri]
if: always() && (needs.musl.result == 'failure' || needs.miri.result == 'failure')
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Notify Nightly Failure
run: ./dev/notify-ci-failure.sh --title="Nightly musl Failure - ${{ github.run_number }}" --labels="area/ci-periodics-nightly,area/ci-periodics,area/testing,lifecycle/needs-review,release-blocker"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}