Skip to content

Commit f0721d8

Browse files
Merge branch 'master' into private/stephenche/sync_xs9_with_master
Signed-off-by: Stephen Cheng <[email protected]>
2 parents 3921246 + 55963c4 commit f0721d8

File tree

9,066 files changed

+43755
-16645
lines changed

Some content is hidden

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

9,066 files changed

+43755
-16645
lines changed

.codecov.yml

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,7 @@ coverage:
168168
# - excluding: **/test_*.py
169169
#
170170
paths: ["python3/**", "!**/test_*.py"]
171-
172-
#
173-
# For python3/** (excluding tests):
174-
#
175-
# For python3, coverage should not be reduced compared to its base:
176-
#
177-
target: auto
171+
target: 80%
178172

179173
#
180174
# Exception: the threshold value given is allowed
@@ -183,27 +177,13 @@ coverage:
183177
#
184178
threshold: 20%
185179

186-
# Checks each Python version separately:
187-
python-3.11:
188-
flags: ["python3.11"]
189-
python-2.7:
190-
flags: ["python2.7"]
191-
192180
#
193181
# Project limits
194182
# --------------
195183
# These checks are relative to all code, not the changes (not the diff of the PR)
196184
#
197185
project:
198186

199-
#
200-
# Python modules and scripts below scripts/ (excluding tests)
201-
#
202-
scripts:
203-
paths: ["scripts/**", "!**/test_*.py"]
204-
target: 48%
205-
threshold: 2%
206-
207187
#
208188
# Python modules and scripts below ocaml/ (excluding tests)
209189
#
@@ -226,7 +206,7 @@ coverage:
226206
tests:
227207
# Ensure that all tests are executed (tests themselves must be 100% covered)
228208
target: 98%
229-
paths: ["**/test_*.py"]
209+
paths: ["python3/tests/test_*.py"]
230210

231211

232212
#
@@ -243,24 +223,15 @@ component_management:
243223
- type: project
244224
# `auto` will use the coverage from the base commit (pull request base
245225
# or parent commit) coverage to compare against.
246-
target: auto
226+
target: 48
247227
threshold: 2%
248228

249229
- type: patch
250-
target: auto
251-
threshold: 10%
230+
target: 80
231+
threshold: 5%
252232

253233
individual_components:
254234

255-
- component_id: scripts # this is an identifier that should not be changed
256-
name: scripts # this is a display name, and can be changed freely
257-
# The list of paths that should be in- and excluded in this component:
258-
paths: ["scripts/**", "!scripts/examples/**", "!**/test_*.py"]
259-
260-
- component_id: scripts/examples
261-
name: scripts/examples
262-
paths: ["scripts/examples/**", "!scripts/**/test_*.py"]
263-
264235
- component_id: ocaml
265236
name: ocaml
266237
paths: ["ocaml/**", "!**/test_*.py"]
@@ -278,4 +249,5 @@ component_management:
278249

279250
- component_id: test_cases
280251
name: test_cases
281-
paths: ["**/test_*.py"]
252+
paths: ["python3/tests/test_*.py"]
253+

.github/workflows/1.249-lcm.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ jobs:
2525
ocaml-test:
2626
name: Ocaml tests
2727
runs-on: ubuntu-20.04
28-
env:
29-
package: "xapi-cli-protocol xapi-client xapi-consts xapi-database xapi-datamodel xapi-types xapi xe"
3028

3129
steps:
3230
- name: Checkout code
3331
uses: actions/checkout@v4
3432
with:
3533
ref: '1.249-lcm'
3634

35+
- name: Free space
36+
shell: bash
37+
run: sudo rm -rf /usr/local/lib/android
38+
3739
- name: Pull configuration from xs-opam
3840
run: |
3941
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/release/yangtze/lcm/tools/xs-opam-ci.env | cut -f2 -d " " > .env
@@ -42,37 +44,24 @@ jobs:
4244
id: dotenv
4345
uses: falti/dotenv-action@v1
4446

45-
- name: Retrieve date for cache key (year-week)
46-
id: cache-key
47-
run: echo "date=$(/bin/date -u "+%Y%W")" >> $GITHUB_OUTPUT
48-
shell: bash
49-
50-
- name: Restore opam cache
51-
id: opam-cache
52-
uses: actions/cache@v4
53-
with:
54-
path: "~/.opam"
55-
# invalidate cache every week, gets built using a scheduled job
56-
key: ${{ steps.cache-key.outputs.date }}-1.249
57-
5847
- name: Update Ubuntu repositories
48+
shell: bash
5949
run: sudo apt-get update
6050

6151
- name: Use ocaml
62-
uses: avsm/setup-ocaml@v1
52+
uses: ocaml/setup-ocaml@v2
6353
with:
64-
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }}
65-
opam-repository: ${{ steps.dotenv.outputs.repository }}
54+
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }}
55+
opam-repositories: |
56+
xs-opam: ${{ steps.dotenv.outputs.repository }}
57+
dune-cache: true
6658

6759
- name: Install dependencies
68-
run: |
69-
opam update
70-
opam pin add . --no-action
71-
opam depext -u ${{ env.package }}
72-
opam upgrade
73-
opam install ${{ env.package }} --deps-only --with-test -v
60+
shell: bash
61+
run: opam install . --deps-only --with-test -v
7462

75-
- name: Build
63+
- name: Configure and build
64+
shell: bash
7665
run: |
7766
opam exec -- ./configure
7867
opam exec -- make
@@ -85,4 +74,4 @@ jobs:
8574
- name: Avoid built packages to appear in the cache
8675
# only packages in this repository follow a branch, the rest point
8776
# to a tag
88-
run: opam uninstall ${{ env.package }}
77+
run: opam pin list --short | xargs opam unpin

.github/workflows/cleanup-xapi-environment/action.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
opam exec -- dune exec ocaml/xapi-storage/generator/src/main.exe -- gen_markdown --path=$STORAGE_DOCDIR
4444
4545
- name: Deploy xapi-storage docs
46-
uses: peaceiris/actions-gh-pages@v3
46+
uses: peaceiris/actions-gh-pages@v4
4747
with:
4848
deploy_key: ${{ secrets.ACTIONS_STORAGE_DEPLOY_KEY }}
4949
publish_dir: ${{ env.STORAGE_DOCDIR }}

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

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ jobs:
2424
shell: bash
2525
run: opam exec -- make sdk
2626

27+
- name: Run CI for SDKs
28+
uses: ./.github/workflows/sdk-ci
29+
30+
- name: Store C SDK source
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: SDK_Source_C
34+
path: |
35+
_build/install/default/xapi/sdk/c/*
36+
!_build/install/default/xapi/sdk/c/dune
37+
2738
- name: Store C# SDK source
2839
uses: actions/upload-artifact@v4
2940
with:
@@ -36,8 +47,42 @@ jobs:
3647
name: SDK_Source_PowerShell
3748
path: _build/install/default/xapi/sdk/powershell/*
3849

39-
- name: Cleanup XenAPI environment
40-
uses: ./.github/workflows/cleanup-xapi-environment
50+
- name: Store Go SDK Artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: SDK_Artifacts_Go
54+
path: |
55+
_build/install/default/xapi/sdk/go/*
56+
!_build/install/default/xapi/sdk/go/dune
57+
58+
- name: Trim dune cache
59+
run: opam exec -- dune cache trim --size=2GiB
60+
61+
build-c-sdk:
62+
name: Build C SDK
63+
runs-on: ubuntu-latest
64+
needs: generate-sdk-sources
65+
steps:
66+
- name: Install dependencies
67+
run: sudo apt-get install libxml2-dev
68+
69+
- name: Retrieve C SDK source
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: SDK_Source_C
73+
path: source/
74+
75+
- name: Build C SDK
76+
shell: bash
77+
run: make -C source
78+
79+
- name: Store C SDK
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: SDK_Artifacts_C
83+
path: |
84+
source/*
85+
!source/src/*.o
4186
4287
build-csharp-sdk:
4388
name: Build C# SDK

.github/workflows/go-ci/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Run CI for Go SDK'
2+
runs:
3+
using: 'composite'
4+
steps:
5+
- name: Set up Go
6+
uses: actions/setup-go@v5
7+
with:
8+
go-version: '1.22.2'
9+
10+
- name: Lint for Go SDK
11+
uses: golangci/golangci-lint-action@v4
12+
with:
13+
version: v1.57.2
14+
working-directory: ${{ github.workspace }}/_build/install/default/xapi/sdk/go/src
15+
args: --config=${{ github.workspace }}/.golangci.yml
16+
17+
- name: Run CI for Go SDK
18+
shell: bash
19+
run: |
20+
cd ./ocaml/sdk-gen/component-test/
21+
cp -r ${{ github.workspace }}/_build/install/default/xapi/sdk/go/src jsonrpc-client/go/goSDK
22+
bash run-tests.sh

.github/workflows/hugo.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Setup Hugo
17-
uses: peaceiris/actions-hugo@v2
17+
uses: peaceiris/actions-hugo@v3
1818
with:
19-
hugo-version: '0.119.0'
19+
hugo-version: '0.127.0'
2020

2121
- name: Build
2222
run: |
2323
cd doc
2424
hugo --minify
2525
2626
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v3
27+
uses: peaceiris/actions-gh-pages@v4
2828
with:
2929
deploy_key: ${{ secrets.ACTIONS_DOCS_DEPLOY_KEY }}
3030
publish_dir: ./doc/public

0 commit comments

Comments
 (0)