Skip to content

Commit 94f8b16

Browse files
Fix warning with containers (#878)
1 parent c987bd1 commit 94f8b16

3 files changed

Lines changed: 68 additions & 8 deletions

File tree

.github/workflows/build.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,26 @@ on:
1717
required: false
1818
default: false
1919
type: boolean
20+
ExecuteOnLargerJDKSet:
21+
description: 'Executes tests on more JDK'
22+
required: false
23+
default: false
24+
type: boolean
25+
EnableLinuxTests:
26+
description: 'Enable tests in Linux'
27+
required: false
28+
default: false
29+
type: boolean
30+
EnableWindowsTests:
31+
description: 'Enable tests in Windows'
32+
required: false
33+
default: false
34+
type: boolean
35+
EnableMacOSTests:
36+
description: 'Enable tests in MacOS'
37+
required: false
38+
default: false
39+
type: boolean
2040
ForceContinueOnError:
2141
description: 'Force continue-on-error'
2242
required: false
@@ -52,6 +72,10 @@ on:
5272
schedule:
5373
- cron: "0 4 * * 6"
5474

75+
concurrency:
76+
group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'
77+
cancel-in-progress: true
78+
5579
# This workflow contains multiple jobs
5680
jobs:
5781
# Verify if a build is needed
@@ -69,7 +93,7 @@ jobs:
6993
- name: Create modified file list
7094
if: ${{ github.event_name == 'push' }}
7195
id: get_changed_files
72-
uses: masesgroup/retrieve-changed-files@v3
96+
uses: masesgroup/retrieve-changed-files@v4
7397
with:
7498
format: 'csv'
7599
- name: Check modified file list
@@ -83,7 +107,7 @@ jobs:
83107
echo "run_build=true" >> $GITHUB_OUTPUT
84108
break
85109
fi
86-
if [[ $added_modified_file == ".github/workflows/build_functions.yaml"* ]]; then
110+
if [[ $added_modified_file == ".github/workflows/build_common.yaml"* ]]; then
87111
echo "$added_modified_file is myself."
88112
echo "run_build=true" >> $GITHUB_OUTPUT
89113
break
@@ -121,9 +145,14 @@ jobs:
121145
attestations: write
122146
packages: write
123147
id-token: write
124-
uses: ./.github/workflows/build_functions.yaml
148+
artifact-metadata: write
149+
uses: ./.github/workflows/build_common.yaml
125150
with:
126151
ExecuteOnMoreOSes: ${{ inputs.ExecuteOnMoreOSes || github.event_name == 'schedule' }}
152+
ExecuteOnLargerJDKSet: ${{ inputs.ExecuteOnLargerJDKSet || github.ref_name == 'master' || github.event_name == 'schedule' }}
153+
EnableLinuxTests: true
154+
EnableWindowsTests: ${{ inputs.ExecuteOnWindows || github.ref_name == 'master' || github.event_name == 'schedule' }}
155+
EnableMacOSTests: ${{ inputs.ExecuteOnMacOS || github.event_name == 'schedule' }}
127156
ForceContinueOnError: ${{ inputs.ForceContinueOnError || false }}
128157
EnableProcessDump: ${{ inputs.EnableProcessDump || '0' }}
129158
ProcessDumpType: ${{ inputs.ProcessDumpType || '3' }}
Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ on:
1212
required: false
1313
default: false
1414
type: boolean
15+
ExecuteOnLargerJDKSet:
16+
description: 'Executes tests on more JDK'
17+
required: false
18+
default: false
19+
type: boolean
20+
EnableLinuxTests:
21+
description: 'Enable tests in Linux'
22+
required: false
23+
default: false
24+
type: boolean
25+
EnableWindowsTests:
26+
description: 'Enable tests in Windows'
27+
required: false
28+
default: false
29+
type: boolean
30+
EnableMacOSTests:
31+
description: 'Enable tests in MacOS'
32+
required: false
33+
default: false
34+
type: boolean
1535
ForceContinueOnError:
1636
description: 'Force continue-on-error'
1737
required: false
@@ -41,7 +61,7 @@ on:
4161
required: true
4262

4363
concurrency:
44-
group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'
64+
group: '${{ github.workflow }}-child-${{ github.event.pull_request.number || github.ref }}'
4565
cancel-in-progress: true
4666

4767
# This workflow contains multiple jobs
@@ -82,6 +102,7 @@ jobs:
82102
packages: write
83103
contents: read
84104
attestations: write
105+
artifact-metadata: write
85106
# Steps represent a sequence of tasks that will be executed as part of the job
86107
steps:
87108
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -265,11 +286,18 @@ jobs:
265286
needs: build
266287
runs-on: ubuntu-latest
267288
outputs:
289+
matrix_jdk_vendor: ${{ steps.set-jdk-vendor.outputs.matrix_jdk_vendor || steps.set-jdk-vendor-ext.outputs.matrix_jdk_vendor }}
268290
matrix_jdk_version: ${{ steps.set-jdk-version.outputs.matrix_jdk_version || steps.set-jdk-version-ext.outputs.matrix_jdk_version }}
269291
matrix_win_os: ${{ steps.set-matrix-win-os.outputs.matrix_win || steps.set-matrix-win-os-ext.outputs.matrix_win }}
270292
matrix_linux_os: ${{ steps.set-matrix-linux-os.outputs.matrix_linux || steps.set-matrix-linux-os-ext.outputs.matrix_linux }}
271293
matrix_mac_os: ${{ steps.set-matrix-mac-os.outputs.matrix_mac || steps.set-matrix-mac-os-ext.outputs.matrix_mac }}
272294
steps:
295+
- id: set-jdk-vendor
296+
if: ${{ inputs.ExecuteOnLargerJDKSet == false }}
297+
run: echo "matrix_jdk_vendor=[ 'temurin' ]" >> $GITHUB_OUTPUT
298+
- id: set-jdk-vendor-ext
299+
if: ${{ inputs.ExecuteOnLargerJDKSet == true }}
300+
run: echo "matrix_jdk_vendor=[ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle' ]" >> $GITHUB_OUTPUT
273301
- id: set-jdk-version
274302
if: ${{ inputs.ExecuteOnMoreOSes == false }}
275303
run: echo "matrix_jdk_version=[ '8', '11', '17', '21', '25' ]" >> $GITHUB_OUTPUT
@@ -296,13 +324,14 @@ jobs:
296324
run: echo "matrix_mac=[ 'macos-14', 'macos-15', 'macos-26' ]" >> $GITHUB_OUTPUT
297325

298326
tests_win:
327+
if: ${{ inputs.EnableWindowsTests == true }}
299328
needs: prepare_matrix_data
300329
strategy:
301330
fail-fast: false
302331
matrix:
303332
os: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_win_os) }} # [ 'windows-2022', 'windows-2025', 'windows-11-arm' ]
304333
framework: [ 'net462', 'net8.0', 'net9.0', 'net10.0' ]
305-
jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle', 'graalvm' ]
334+
jdk_vendor: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_vendor) }}
306335
jdk_version: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_version) }} # only LTS versions
307336
exclude:
308337
- jdk_vendor: microsoft
@@ -481,13 +510,14 @@ jobs:
481510
retention-days: 7
482511

483512
tests_linux:
513+
if: ${{ inputs.EnableLinuxTests == true }}
484514
needs: prepare_matrix_data
485515
strategy:
486516
fail-fast: false
487517
matrix:
488518
os: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_linux_os) }} # [ 'ubuntu-22.04', 'ubuntu-22.04-arm', 'ubuntu-24.04', 'ubuntu-24.04-arm' ]
489519
framework: [ 'net8.0', 'net9.0', 'net10.0' ]
490-
jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle', 'graalvm' ]
520+
jdk_vendor: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_vendor) }}
491521
jdk_version: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_version) }} # only LTS versions
492522
exclude:
493523
- jdk_vendor: corretto
@@ -660,13 +690,14 @@ jobs:
660690
retention-days: 7
661691

662692
tests_mac:
693+
if: ${{ inputs.EnableMacOSTests == true }}
663694
needs: prepare_matrix_data
664695
strategy:
665696
fail-fast: false
666697
matrix:
667698
os: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_mac_os) }} # [ 'macos-13', 'macos-14', 'macos-15' ]
668699
framework: [ 'net8.0', 'net9.0', 'net10.0' ]
669-
jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle', 'graalvm' ]
700+
jdk_vendor: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_vendor) }}
670701
jdk_version: ${{ fromJSON(needs.prepare_matrix_data.outputs.matrix_jdk_version) }} # only LTS versions
671702
exclude:
672703
- os: macos-14

.github/workflows/generateclasses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
run: Remove-Item .\src\net\JNet\Generated\* -Recurse -Force -Exclude README.md
5858

5959
- name: Clear Java generated files
60-
run: Remove-Item .\src\jvm\jnet\src\main\java\org\mases\jnet\generated\* -Recurse -Force -Exclude README.md
60+
run: Remove-Item .\src\jvm\jnet\src\main\java\org\mases\jnet\generated\* -Recurse -Force -Exclude README.md,.editorconfig
6161

6262
- run: dotnet build --no-incremental --configuration Release src\net\JNetReflector\JNetReflector.csproj
6363

0 commit comments

Comments
 (0)