Skip to content

Commit 4a81f7e

Browse files
committed
Merge branch 'master' into private/bengangy/sync-master-to-ssh
2 parents 6a3e8c0 + 657aa71 commit 4a81f7e

File tree

249 files changed

+5847
-3955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+5847
-3955
lines changed

.codechecker.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"analyze": [
3+
"--disable=misc-header-include-cycle",
4+
"--disable=clang-diagnostic-unused-parameter"
5+
]
6+
}

.github/workflows/1.249-lcm.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Build and test (1.249-lcm, scheduled)
22

3+
permissions: {}
4+
35
on:
46
schedule:
57
# run every Monday, this refreshes the cache
@@ -9,6 +11,8 @@ jobs:
911
python-test:
1012
name: Python tests
1113
runs-on: ubuntu-20.04
14+
permissions:
15+
contents: read
1216
strategy:
1317
fail-fast: false
1418
matrix:

.github/workflows/codechecker.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Run CodeChecker static analyzer on XAPI's C stubs
2+
permissions: {}
3+
4+
on:
5+
push:
6+
pull_request:
7+
branches:
8+
- master
9+
- 'feature/**'
10+
- '*-lcm'
11+
12+
concurrency: # On new push, cancel old workflows from the same PR, branch or tag:
13+
group: ${{ github.workflow }}-${{github.event_name}}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
staticanalyzer:
18+
name: Static analyzer for OCaml C stubs
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
security-events: write
23+
env:
24+
XAPI_VERSION: "v0.0.0-${{ github.sha }}"
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup XenAPI environment
31+
uses: ./.github/workflows/setup-xapi-environment
32+
with:
33+
xapi_version: ${{ env.XAPI_VERSION }}
34+
35+
- name: Install dune-compiledb to generate compile_commands.json
36+
run: |
37+
opam pin add -y ezjsonm https://github.com/mirage/ezjsonm/releases/download/v1.3.0/ezjsonm-1.3.0.tbz
38+
opam pin add -y dune-compiledb https://github.com/edwintorok/dune-compiledb/releases/download/0.6.0/dune-compiledb-0.6.0.tbz
39+
40+
- name: Trim dune cache
41+
run: opam exec -- dune cache trim --size=2GiB
42+
43+
- name: Generate compile_commands.json
44+
run: opam exec -- make compile_commands.json
45+
46+
- name: Upload compile commands json
47+
uses: actions/upload-artifact@v4
48+
with:
49+
path: ${{ github.workspace }}/compile_commands.json
50+
51+
- uses: whisperity/codechecker-analysis-action@v1
52+
id: codechecker
53+
with:
54+
ctu: true
55+
logfile: ${{ github.workspace }}/compile_commands.json
56+
analyze-output: "codechecker_results"
57+
58+
- name: Upload CodeChecker report
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: codechecker_results
62+
path: "${{ steps.codechecker.outputs.result-html-dir }}"
63+
64+
# cppcheck even for other analyzers apparently, this is
65+
# codechecker's output
66+
- name: convert to SARIF
67+
shell: bash
68+
run: report-converter "codechecker_results" --type cppcheck --output codechecker.sarif --export sarif
69+
70+
- name: Upload CodeChecker SARIF report
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: codechecker_sarif
74+
path: codechecker.sarif
75+
76+
- name: Upload SARIF report
77+
uses: github/codeql-action/upload-sarif@v3
78+
with:
79+
sarif_file: codechecker.sarif

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Generate and upload docs
22

3+
permissions: {}
4+
35
on:
46
push:
57
branches: master
@@ -8,6 +10,8 @@ jobs:
810
ocaml:
911
name: Docs
1012
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: read
1115
env:
1216
XAPI_VERSION: "v0.0.0-${{ github.sha }}"
1317
STORAGE_DOCDIR: .gh-pages-xapi-storage

.github/workflows/format.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Check format
22

3+
permissions: {}
4+
35
on:
46
pull_request:
57
branches:
@@ -12,6 +14,8 @@ jobs:
1214
ocaml-format:
1315
name: Ocaml files
1416
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1519

1620
steps:
1721
- name: Checkout code

.github/workflows/generate-and-build-sdks.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Generate and Build SDKs
22

3+
permissions: {}
4+
35
on:
46
workflow_call:
57
inputs:
@@ -11,6 +13,9 @@ jobs:
1113
generate-sdk-sources:
1214
name: Generate SDK sources
1315
runs-on: ubuntu-22.04
16+
permissions:
17+
contents: read
18+
1419
steps:
1520
- name: Checkout code
1621
uses: actions/checkout@v4
@@ -25,7 +30,7 @@ jobs:
2530
run: opam exec -- make sdk
2631

2732
# sdk-ci runs some Go unit tests.
28-
# This setting ensures that SDK date time
33+
# This setting ensures that SDK date time
2934
# tests are run on a machine that
3035
# isn't using UTC
3136
- name: Set Timezone to Tokyo for datetime tests
@@ -77,6 +82,9 @@ jobs:
7782
name: Build C SDK
7883
runs-on: ubuntu-latest
7984
needs: generate-sdk-sources
85+
permissions:
86+
contents: read
87+
8088
steps:
8189
- name: Install dependencies
8290
run: sudo apt-get install libxml2-dev
@@ -103,6 +111,9 @@ jobs:
103111
name: Build Java SDK
104112
runs-on: ubuntu-latest
105113
needs: generate-sdk-sources
114+
permissions:
115+
contents: read
116+
106117
steps:
107118
- name: Install dependencies
108119
run: sudo apt-get install maven
@@ -120,9 +131,9 @@ jobs:
120131
distribution: 'temurin'
121132

122133
# Java Tests are run at compile time.
123-
# This setting ensures that SDK date time
134+
# This setting ensures that SDK date time
124135
# tests are run on a machine that
125-
# isn't using UTC
136+
# isn't using UTC
126137
- name: Set Timezone to Tokyo for datetime tests
127138
run: |
128139
sudo timedatectl set-timezone Asia/Tokyo
@@ -144,6 +155,9 @@ jobs:
144155
name: Build C# SDK
145156
runs-on: windows-2022
146157
needs: generate-sdk-sources
158+
permissions:
159+
contents: read
160+
147161
steps:
148162
- name: Strip 'v' prefix from xapi version
149163
shell: pwsh
@@ -158,7 +172,7 @@ jobs:
158172
# All tests builds and pipelines should
159173
# work on other timezones. This setting ensures that
160174
# SDK date time tests are run on a machine that
161-
# isn't using UTC
175+
# isn't using UTC
162176
- name: Set Timezone to Tokyo for datetime tests
163177
shell: pwsh
164178
run: Set-TimeZone -Id "Tokyo Standard Time"
@@ -192,6 +206,9 @@ jobs:
192206
# PowerShell SDK for PowerShell 5.x needs to run on windows-2019 because
193207
# windows-2022 doesn't contain .NET Framework 4.x dev tools
194208
runs-on: windows-2019
209+
permissions:
210+
contents: read
211+
195212
steps:
196213
- name: Strip 'v' prefix from xapi version
197214
shell: pwsh
@@ -265,6 +282,8 @@ jobs:
265282
dotnet: ["6", "8"]
266283
needs: build-csharp-sdk
267284
runs-on: windows-2022
285+
permissions:
286+
contents: read
268287

269288
steps:
270289
- name: Strip 'v' prefix from xapi version

.github/workflows/hugo.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Generate and upload Hugo docs
22

3+
permissions: {}
4+
35
on:
46
push:
57
branches: master
@@ -8,6 +10,9 @@ jobs:
810
ocaml:
911
name: Docs
1012
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: read
15+
1116

1217
steps:
1318
- name: Checkout code

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Build and test
22

3+
permissions: {}
4+
35
on:
46
# When only Hugo docs change, this workflow is not required:
57
push:
@@ -20,6 +22,8 @@ jobs:
2022
ocaml-tests:
2123
name: Run OCaml tests
2224
runs-on: ubuntu-22.04
25+
permissions:
26+
contents: read
2327
env:
2428
# Ensure you also update test-sdk-builds
2529
# when changing this value, to keep builds

.github/workflows/other.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Build and test (other)
22

3+
permissions: {}
4+
35
on:
46
# When only Hugo docs change, this workflow is not required:
57
push:
@@ -20,6 +22,10 @@ jobs:
2022
python-test:
2123
name: Python tests
2224
runs-on: ubuntu-22.04
25+
permissions:
26+
contents: read
27+
pull-requests: write # allow commenting on the PR
28+
2329
strategy:
2430
fail-fast: false
2531
matrix:
@@ -29,7 +35,7 @@ jobs:
2935
uses: actions/checkout@v4
3036
with:
3137
fetch-depth: 0 # To check which files changed: origin/master..HEAD
32-
- uses: LizardByte/setup-python-action@master
38+
- uses: actions/setup-python@v5
3339
with:
3440
python-version: ${{matrix.python-version}}
3541

@@ -56,6 +62,7 @@ jobs:
5662
files: .git/coverage${{matrix.python-version}}.xml
5763
flag-name: python${{matrix.python-version}}
5864
parallel: true
65+
fail-on-error: false
5966

6067
- uses: dciborow/[email protected]
6168
with:
@@ -89,12 +96,14 @@ jobs:
8996
- name: Finish the parallel coverage upload to Coveralls
9097
uses: coverallsapp/github-action@v2
9198
with:
99+
fail-on-error: false
92100
parallel-finished: true
93-
continue-on-error: true # Do not fail CI if this step fails
94101

95102
deprecation-test:
96103
name: Deprecation tests
97104
runs-on: ubuntu-22.04
105+
permissions:
106+
contents: read
98107

99108
steps:
100109
- name: Checkout code
@@ -109,6 +118,8 @@ jobs:
109118
test-sdk-builds:
110119
name: Test SDK builds
111120
uses: ./.github/workflows/generate-and-build-sdks.yml
121+
permissions:
122+
contents: read
112123
with:
113124
# Ensure you also update ocaml-tests
114125
# when changing this value, to keep builds

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Create release from tag
22

3+
permissions: {}
4+
35
on:
46
push:
57
tags:
@@ -9,6 +11,8 @@ jobs:
911
build-python:
1012
name: Build and upload Python artifacts
1113
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
1216

1317
steps:
1418
- name: Checkout code
@@ -36,10 +40,15 @@ jobs:
3640
build-sdks:
3741
name: Build and upload SDK artifacts
3842
uses: ./.github/workflows/generate-and-build-sdks.yml
43+
permissions:
44+
contents: read
3945
with:
4046
xapi_version: ${{ github.ref_name }}
4147

4248
release:
49+
permissions:
50+
contents: write # allow creating a release
51+
4352
name: "Create and package release"
4453
runs-on: ubuntu-latest
4554
needs: [build-python, build-sdks]
@@ -124,6 +133,7 @@ jobs:
124133
needs: release
125134
environment: pypi
126135
permissions:
136+
contents: read
127137
id-token: write
128138
steps:
129139
- name: Retrieve python distribution artifacts

0 commit comments

Comments
 (0)