-
Notifications
You must be signed in to change notification settings - Fork 93
165 lines (148 loc) · 4.07 KB
/
ValidatePullRequest.yml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Validate Pull Request
on:
pull_request:
branches: [main, "release/**"]
merge_group:
permissions:
id-token: write
contents: read
jobs:
docs-pr:
runs-on: ubuntu-latest
outputs:
not-just-docs: ${{ steps.not-just-docs.outputs.result }}
steps:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
docs:
- '**/*.md'
- '**/*.txt'
all:
- '**/*'
- uses: actions/github-script@v7
id: not-just-docs
with:
script: |
let docs_file_count = "${{steps.changes.outputs.docs_count}}";
let all_file_count = "${{steps.changes.outputs.all_count}}";
let result = (all_file_count - docs_file_count) > 0;
console.log(result)
result-encoding: string
rust:
needs:
- docs-pr
uses: ./.github/workflows/dep_rust.yml
secrets: inherit
with:
docs_only: ${{needs.docs-pr.outputs.not-just-docs == 'false'}}
fuzzing:
needs:
- docs-pr
uses: ./.github/workflows/dep_fuzzing.yml
with:
max_total_time: 300 # 5 minutes in seconds
docs_only: ${{needs.docs-pr.outputs.not-just-docs == 'false'}}
secrets: inherit
#####
# start build-on-windows
#####
build-on-windows:
needs:
- docs-pr
if: ${{needs.docs-pr.outputs.not-just-docs == 'true'}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
build: [windows-debug, windows-release]
include:
- build: windows-debug
os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"]
config: debug
platform: x64
- build: windows-release
os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"]
config: release
platform: x64
env:
RUST_BACKTRACE: FULL
steps:
- uses: actions/checkout@v4
- name: Get system info
run: |
echo "cmd /ver"
cmd /ver
echo "systeminfo"
systeminfo
# Run this so we can use just targets in this workflow
- uses: hyperlight-dev/[email protected]
with:
rust-toolchain: "1.81.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#####
# end build-on-windows
#####
#####
# start build-on-linux
#####
build-on-linux:
needs:
- docs-pr
if: ${{needs.docs-pr.outputs.not-just-docs == 'true'}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
build:
[
linux-kvm-debug,
linux-kvm-release,
linux-hyperv-debug,
linux-hyperv-release,
]
include:
- build: linux-kvm-debug
os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"]
config: debug
platform: x64
hypervisor: kvm
- build: linux-kvm-release
os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"]
config: release
platform: x64
hypervisor: kvm
- build: linux-hyperv-debug
os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"]
config: debug
platform: x64
hypervisor: hyperv
- build: linux-hyperv-release
os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"]
config: release
platform: x64
hypervisor: hyperv
env:
RUST_BACKTRACE: FULL
steps:
- uses: actions/checkout@v4
- name: uname (linux)
run: |
echo "uname -a"
uname -a
echo "cat /etc/os-release"
cat /etc/os-release
- uses: hyperlight-dev/[email protected]
with:
rust-toolchain: "1.81.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build C Guest Binaries
run: |
just build-c-guests ${{ matrix.config }}
#####
# end build-on-linux
#####