-
Notifications
You must be signed in to change notification settings - Fork 113
Windows CI for Java #4942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Windows CI for Java #4942
Changes from all commits
3e413f8
4e039e8
7de89c7
68dacbd
60816f2
a3450dd
ac5c5e8
946e92c
68673bd
b405c75
98aeda6
16ba1cf
d67ff74
251f315
d70f9d8
719d7f4
f0aa88f
d64e0be
13d9ed3
9830fcf
47f2a6c
dc1f8d9
554490d
01e89d7
e9e0303
1052d44
53071cc
f373bae
815fa8f
1d8a334
3cb51b7
8b2fa49
50efefa
375373c
edc4214
abbe526
487972c
3d21446
1075964
9a061d0
5686156
d30b5b7
6e77c58
1e0c609
dca3f79
a2cc52f
52c22a7
74e83f9
7180b7a
3ad68c6
513f961
a8cc06d
7cc130f
0d18fc9
cad4eb5
ddc96a7
19549b5
1d37031
1f5d2b4
4f76f9e
cd479fe
8a4c6ea
535ba04
af4ceb8
0e879a9
3bcd0cb
d6b4b8a
92f36d7
a9c10d4
6a35ad4
7a7218b
bb13cf8
de6358a
0d61d28
a8e390c
1c5004d
5e0aa33
9966c70
05244d8
674ce6a
22dce99
093d4c7
fe1e53e
dbe1a1c
6fc48ea
1a669c0
6eb980c
1957e4c
2549a05
6fb5bb6
534fa64
bfdedf3
aac3f49
4aab4d2
12a7d7d
a4ea6b4
64cda53
1c6e562
062fa55
844e0ae
35f26bb
b2bca14
e4c5b3d
b719443
a84a439
b51e2b1
0988688
9372af5
5fb2212
e869f4a
b046c9b
6e94f15
f6bb4e1
2d66bf1
d66cdf4
02fc2c7
0c1225d
84ef7bc
894ed27
bbd853a
57ed3e9
3768ed2
558c22a
b57551f
8d065ca
8b44c1c
a9d11a0
09f9185
6f18b4f
d7262ae
9583c19
e33ec9d
9559c21
1a44346
1f23ccf
3267d8c
092f6e1
c094fa3
62379da
c059e47
0ff884b
52bd132
996a022
1808ac3
f4a8f48
e92ab23
3012c45
167a25a
f9e7316
9b100dd
8b0f53c
79541e3
7fa64bf
e2ba099
e158667
84afc9a
ca55833
b97f3c1
d44b801
8a5399a
393a1ba
8f2d78a
2cb3068
5dfc62f
ed10dbf
2c292a0
d5bb052
cb6f048
1177d8d
14745f8
feebd5d
ac42e71
82332e5
d670731
c6c2b0b
3ba1e49
145b7ae
c76f1d5
52c7845
d2a3082
777c2ff
dbba146
747ade6
543528c
eaae67c
b92a88f
8a317d1
e5bffe6
5b51a1a
d6edd4c
5efc215
aeb65cb
2d0cb38
c2817cf
320658e
914ad0a
ab0d3d0
3332bcb
9fd0dd9
b44f2e9
4e6bee1
e4e2fc9
9cc5baf
1771db2
7b1890e
ddae28b
e2076a6
2a1f195
338a9aa
0f216d5
e6ccc16
32f2345
2c906f6
1be10d2
55e00f7
b117d7a
cc9d2ab
344ec7c
e973241
9222736
8461a38
9d56a31
eb599c3
af60580
1c8f971
fa9fc19
72902ee
8f66383
7d72cc0
6a11c31
a1abdf3
f86e6a8
f738946
41302f2
4eff46d
7684563
dab8235
2c4e354
759558f
8fee757
9de5de7
5a89c4f
e420cf4
51daf4b
c749b2b
7d39c5a
2d0d9f8
37c9eef
d6fb9d5
d8ea0ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,12 +85,21 @@ jobs: | |
| - name: Install protoc compiler | ||
| if: matrix.language == 'go' | ||
| shell: bash | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| # Check if protoc is already installed with correct version | ||
| if ! command -v protoc &> /dev/null || ! protoc --version | grep -q "29.1"; then | ||
| echo "Installing protoc 29.1..." | ||
| PB_REL="https://github.com/protocolbuffers/protobuf/releases" | ||
| curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
|
|
||
| # Add authentication header if token is available | ||
| if [ -n "$GITHUB_TOKEN" ]; then | ||
| curl -H "Authorization: Bearer $GITHUB_TOKEN" -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why needed? |
||
| else | ||
| curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
| fi | ||
|
|
||
| sudo unzip protoc-29.1-linux-x86_64.zip -d /usr/local | ||
| sudo chmod +x /usr/local/bin/protoc | ||
| else | ||
|
|
@@ -125,12 +134,21 @@ jobs: | |
| - name: Build Java/Kotlin components | ||
| if: matrix.language == 'java-kotlin' | ||
| shell: bash | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| # Check if protoc is already installed with correct version | ||
| if ! command -v protoc &> /dev/null || ! protoc --version | grep -q "29.1"; then | ||
| echo "Installing protoc 29.1..." | ||
| PB_REL="https://github.com/protocolbuffers/protobuf/releases" | ||
| curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
|
|
||
| # Add authentication header if token is available | ||
| if [ -n "$GITHUB_TOKEN" ]; then | ||
| curl -H "Authorization: Bearer $GITHUB_TOKEN" -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
| else | ||
| curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip | ||
| fi | ||
|
|
||
| sudo unzip protoc-29.1-linux-x86_64.zip -d /usr/local | ||
| sudo chmod +x /usr/local/bin/protoc | ||
| else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,10 @@ inputs: | |
| - use-self-hosted | ||
| - use-github | ||
| default: false | ||
| run-with-windows-self-hosted: | ||
| description: "Include self-hosted Windows runners" | ||
| type: boolean | ||
| default: false | ||
| containers: | ||
| description: "Run in containers" | ||
| required: true | ||
|
|
@@ -46,12 +50,14 @@ runs: | |
| EVENT_NAME: ${{ github.event_name }} | ||
| RUN_FULL_MATRIX: ${{ inputs.run-full-matrix }} | ||
| RUN_WITH_MACOS: ${{ inputs.run-with-macos }} | ||
| RUN_WITH_WINDOWS_SELF_HOSTED: ${{ inputs.run-with-windows-self-hosted }} | ||
| CONTAINERS: ${{ inputs.containers }} | ||
| LANGUAGE_NAME: ${{ inputs.language-name }} | ||
| run: | | ||
| echo "EVENT_NAME=$EVENT_NAME" >> $GITHUB_ENV | ||
| echo "RUN_FULL_MATRIX=$RUN_FULL_MATRIX" >> $GITHUB_ENV | ||
| echo "RUN_WITH_MACOS=$RUN_WITH_MACOS" >> $GITHUB_ENV | ||
| echo "RUN_WITH_WINDOWS_SELF_HOSTED=$RUN_WITH_WINDOWS_SELF_HOSTED" >> $GITHUB_ENV | ||
| echo "CONTAINERS=$CONTAINERS" >> $GITHUB_ENV | ||
| echo "LANGUAGE_NAME=$LANGUAGE_NAME" >> $GITHUB_ENV | ||
|
|
||
|
|
@@ -63,12 +69,16 @@ runs: | |
| echo 'Select server engines to run tests against' | ||
| if [[ "$EVENT_NAME" == "pull_request" || "$EVENT_NAME" == "push" || "$RUN_FULL_MATRIX" == "false" ]]; then | ||
| echo 'Pick engines marked as `"run": "always"` only - on PR, push or manually triggered job which does not require full matrix' | ||
| jq -c '[.[] | select(.run == "always")]' < .github/json_matrices/engine-matrix.json | awk '{ printf "engine-matrix=%s\n", $0 }' | tee -a $GITHUB_OUTPUT | ||
| ENGINES=$(jq -c '[.[] | select(.run == "always")]' < .github/json_matrices/engine-matrix.json) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why isnt awk required? and why to touch it anyway? |
||
| else | ||
| echo 'Pick all engines - on cron (schedule) or if manually triggered job requires a full matrix' | ||
| jq -c . < .github/json_matrices/engine-matrix.json | awk '{ printf "engine-matrix=%s\n", $0 }' | tee -a $GITHUB_OUTPUT | ||
| ENGINES=$(jq -c . < .github/json_matrices/engine-matrix.json) | ||
| fi | ||
|
|
||
| # Note: Redis 6.2 exclusion for Windows is handled in the host matrix filtering | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have it here (since its the centralized script that builds the permutations) instead having it in the specific language CI script...
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe better yet - "run: always" should be removed from the engine-matrix.json for 6.2, because it is not run always anymore |
||
| # rather than globally excluding it from all platforms | ||
| echo "engine-matrix=$ENGINES" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Load host matrix | ||
| id: load-host-matrix | ||
| shell: bash | ||
|
|
@@ -78,8 +88,8 @@ runs: | |
| echo 'Select runners (VMs) to run tests on' | ||
|
|
||
| if [[ "$EVENT_NAME" == "pull_request" || "$EVENT_NAME" == "push" || "$RUN_FULL_MATRIX" == "false" ]]; then | ||
| echo 'Getting "always run" runners' | ||
| BASE_MATRIX=$(jq -c '[.[] | select(.run == "always")]' < .github/json_matrices/build-matrix.json) | ||
| echo 'Getting "always run" runners for this language' | ||
| BASE_MATRIX=$(jq --arg lang "$LANGUAGE_NAME" -c '[.[] | select(.run == "always" and .languages? and any(.languages[] == $lang; .) and '"$CONDITION"')]' < .github/json_matrices/build-matrix.json) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need to change the conditions? - it should work for java on windows as added in build-matrix.json... |
||
| else | ||
| echo 'Getting full matrix for language excluding macOS' | ||
| BASE_MATRIX=$(jq --arg lang "$LANGUAGE_NAME" -c '[.[] | select(.languages? and any(.languages[] == $lang; .) and '"$CONDITION"' and .TARGET != "aarch64-apple-darwin")]' < .github/json_matrices/build-matrix.json) | ||
|
|
@@ -97,6 +107,13 @@ runs: | |
| else | ||
| FINAL_MATRIX="$BASE_MATRIX" | ||
| fi | ||
|
|
||
| # Add Windows self-hosted runners if specified | ||
| if [[ "$RUN_WITH_WINDOWS_SELF_HOSTED" == "true" ]]; then | ||
| echo "Including self-hosted Windows runners" | ||
| WIN_RUNNERS=$(jq --arg lang "$LANGUAGE_NAME" -c '[.[] | select(.languages? and any(.languages[] == $lang; .) and '"$CONDITION"' and .TARGET == "x86_64-pc-windows-msvc" and (.RUNNER == ["self-hosted","windows","x64"]))]' < .github/json_matrices/build-matrix.json) | ||
| FINAL_MATRIX=$(echo "$FINAL_MATRIX" "$WIN_RUNNERS" | jq -sc 'add') | ||
| fi | ||
|
|
||
| echo "host-matrix=$(echo $FINAL_MATRIX | tr -d '\n')" >> $GITHUB_OUTPUT | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,7 +250,7 @@ jobs: | |
| } | ||
|
|
||
| // Add basic changelog information | ||
| const changelog = `## Changelog\n\nUpdated ${depName} from ${fromVersion} to ${toVersion}\n\n📋 To view detailed changes, visit the package repository or release notes.`; | ||
| const changelog = `## Changelog\n\nUpdated ${depName} from ${fromVersion} to ${toVersion}\n\n[INFO] To view detailed changes, visit the package repository or release notes.`; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why required in this PR? |
||
|
|
||
| const newBody = `${body}\n\n${changelog}`; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,8 +152,10 @@ jobs: | |
|
|
||
| - name: Install & build & test | ||
| working-directory: go | ||
| shell: bash | ||
| env: | ||
| RC_VERSION: ${{ github.event.inputs.rc-version }} | ||
| CARGO_BUILD_JOBS: 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what for? |
||
| run: | | ||
| if [[ -n "$RC_VERSION" ]]; then | ||
| make install-tools | ||
|
|
@@ -223,6 +225,8 @@ jobs: | |
|
|
||
| - name: Install and run linters | ||
| working-directory: go | ||
| env: | ||
| CARGO_BUILD_JOBS: 1 | ||
| run: | | ||
| make install-dev-tools install-build-tools gen-c-bindings generate-protobuf lint-ci | ||
|
|
||
|
|
@@ -384,6 +388,7 @@ jobs: | |
|
|
||
| - name: Build and test | ||
| working-directory: ./go | ||
| shell: bash | ||
| env: | ||
| RC_VERSION: ${{ github.event.inputs.rc-version }} | ||
| run: | | ||
|
|
@@ -457,6 +462,7 @@ jobs: | |
|
|
||
| - name: Install & build & test | ||
| working-directory: go | ||
| shell: bash | ||
| env: | ||
| RC_VERSION: ${{ github.event.inputs.rc-version }} | ||
| run: | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to use self-hosted? - this is last ditch resolve when where is no runners of github