Fix Java Warnings / Build Issues (#4616) #9366
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: ["main"] | |
| # See https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci: | |
| name: ${{ matrix.config }} on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Release builds | |
| - os: macos-26 | |
| config: "release" | |
| # We want to test C++ and Swift only (in each direction) | |
| cross_test_flags: "--all-cross --filter cpp --filter swift" | |
| python_tests: true | |
| - os: ubuntu-24.04 | |
| config: "release" | |
| cross_test_flags: "--all-cross" | |
| - os: ubuntu-24.04-arm | |
| config: "release" | |
| build_flags: "SKIP=csharp" # Skip C# on ARM as .NET compiler keeps crashing | |
| test_flags: "--rfilter=csharp" | |
| python_tests: true | |
| - os: windows-2022 | |
| config: "release" | |
| build_flags: "/p:Platform=x64" | |
| test_flags: "--platform=x64" | |
| python_tests: true | |
| - os: windows-2022 | |
| config: "cpp-win32-release" | |
| working_directory: "cpp" | |
| build_flags: "/p:Platform=Win32" | |
| msbuild_project: "msbuild/ice.proj" | |
| test_flags: "--platform=Win32" | |
| python_tests: true | |
| - os: windows-2025 | |
| config: "release" | |
| build_flags: "/p:Platform=x64" | |
| test_flags: "--platform=x64" | |
| python_tests: true | |
| # Debug builds | |
| - os: macos-26 | |
| config: "debug" | |
| build_flags: "OPTIMIZE=no" | |
| test_flags: "--swift-config=debug --csharp-config=Debug" | |
| python_tests: true | |
| - os: ubuntu-24.04 | |
| config: "debug" | |
| build_flags: "OPTIMIZE=no" | |
| test_flags: "--csharp-config=Debug" | |
| python_tests: true | |
| # TODO - figure out how to properly install debug Python | |
| - os: windows-2022 | |
| config: "debug" | |
| working_directory: "cpp" | |
| build_flags: "/p:Platform=x64 /p:Configuration=Debug" | |
| test_flags: "--platform=x64 --config=Debug" | |
| msbuild_project: "msbuild/ice.proj" | |
| python_tests: true | |
| # iOS | |
| - os: macos-26 | |
| config: "ios" | |
| build_flags: "OPTIMIZE=no PLATFORMS='macosx iphonesimulator' CONFIGS='static shared' LANGUAGES='cpp swift'" | |
| # TODO swift/Ice/udp is failing regularly | |
| test_flags: "--languages='cpp,swift' --config=debug --platform=iphonesimulator --controller-app --rfilter=swift/Ice/udp" | |
| build_cpp_and_python: true | |
| # Static builds | |
| - os: ubuntu-24.04 | |
| config: "static" | |
| build_flags: "CONFIGS=static" | |
| test_flags: "--config=static --filter=Ice/ --filter=IceDiscovery/" | |
| working_directory: "cpp" | |
| # MATLAB | |
| - os: ubuntu-24.04 | |
| config: "matlab" | |
| working_directory: "matlab" | |
| build_cpp_and_python: true | |
| - os: windows-2022 | |
| config: "matlab" | |
| working_directory: "matlab" | |
| build_flags: "/p:Platform=x64" | |
| msbuild_project: "msbuild/ice.proj" | |
| test_flags: "--platform=x64" | |
| build_cpp_and_python: true | |
| - os: ubuntu-24.04 | |
| config: "android" | |
| working_directory: "java" | |
| test_flags: "--android --controller-app" | |
| build_cpp_and_python: true | |
| build_android_controller: true | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Print System Info | |
| uses: ./.github/actions/system-info | |
| - name: macOS FQDN Fix | |
| uses: ./.github/actions/macos-fqdn | |
| if: runner.os == 'macOS' | |
| - name: Setup C++ | |
| uses: ./.github/actions/setup-cpp | |
| - name: Setup PHP | |
| uses: ./.github/actions/setup-php | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Setup .NET | |
| uses: ./.github/actions/setup-dotnet | |
| - name: Setup Java | |
| uses: ./.github/actions/setup-java | |
| - name: Setup Node | |
| uses: ./.github/actions/setup-node | |
| - name: Setup Ruby | |
| if: runner.os != 'Windows' | |
| uses: ./.github/actions/setup-ruby | |
| - name: Setup MATLAB | |
| if: matrix.config == 'matlab' | |
| uses: ./.github/actions/setup-matlab | |
| - name: Setup Android | |
| if: matrix.config == 'android' | |
| uses: ./.github/actions/setup-android | |
| - name: Install ice-builder-xcode | |
| run: | | |
| #TODO: We should consider removing the dependency on ice-builder-xcode | |
| brew install zeroc-ice/tap/ice-builder-xcode | |
| shell: bash | |
| if: (runner.os == 'macOS') && (matrix.config == 'ios') | |
| - name: Setup Cache | |
| uses: ./.github/actions/setup-cache | |
| with: | |
| prefix: ci-${{ matrix.config }} | |
| # See https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps | |
| - name: Enable Windows crash dumps | |
| run: | | |
| reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f | |
| reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d ${{ github.workspace }}\LocalDumps /f | |
| reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f | |
| shell: powershell | |
| if: runner.os == 'Windows' | |
| - name: Build ${{ matrix.config }} on ${{ matrix.os }} | |
| uses: ./.github/actions/build | |
| timeout-minutes: 90 | |
| with: | |
| working_directory: ${{ matrix.working_directory || '.' }} | |
| build_cpp_and_python: ${{ matrix.build_cpp_and_python || false }} | |
| build_android_controller: ${{ matrix.build_android_controller || false }} | |
| build_flags: ${{ matrix.build_flags || '' }} | |
| msbuild_project: ${{ matrix.msbuild_project || 'ice.proj' }} | |
| - name: Install testing dependencies from pip | |
| run: python3 -m pip install passlib cryptography numpy | |
| shell: bash | |
| - name: Test ${{ matrix.config }} on ${{ matrix.os }} | |
| uses: ./.github/actions/test | |
| timeout-minutes: 45 | |
| with: | |
| working_directory: ${{ matrix.working_directory || '.' }} | |
| flags: ${{ matrix.test_flags }} | |
| # Don't test matlab on Windows (see https://github.com/zeroc-ice/ice/issues/3524) | |
| if: matrix.config != 'matlab' || runner.os != 'Windows' | |
| - name: Cross Test ${{ matrix.config }} on ${{ matrix.os }} | |
| uses: ./.github/actions/test | |
| timeout-minutes: 30 | |
| with: | |
| working_directory: ${{ matrix.working_directory || '.' }} | |
| flags: ${{ matrix.cross_test_flags }} | |
| if: matrix.cross_test_flags != '' | |
| - name: Remove Python tests generated code | |
| run: | | |
| # Remove generated files from previous runs before to test with loadSlice | |
| # to ensure we use the dynamically generated code. | |
| find python/test -name generated -exec rm -rfv {} + | |
| shell: bash | |
| if: matrix.python_tests == true | |
| - name: Python Test with loadSlice ${{ matrix.config }} on ${{ matrix.os }} | |
| uses: ./.github/actions/test | |
| timeout-minutes: 45 | |
| with: | |
| working_directory: ${{ matrix.working_directory || '.' }} | |
| flags: "${{ matrix.test_flags }} --load-slice --language=python" | |
| if: matrix.python_tests == true | |
| - name: Generate API Reference | |
| uses: ./.github/actions/documentation | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-s3-code-bucket: ${{ secrets.AWS_S3_CODE_BUCKET }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| if: matrix.config == 'release' && runner.os == 'macOS' | |
| - name: Upload test logs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs-${{ matrix.config }}-${{ matrix.os }} | |
| path: ${{ '.' }}/**/*.log | |
| if-no-files-found: ignore | |
| if: always() | |
| - name: Upload Linux core dumps | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: core-dumps-${{ matrix.config }}-${{ matrix.os }} | |
| path: /var/lib/systemd/coredump/* | |
| if-no-files-found: ignore | |
| if: runner.os == 'Linux' && always() | |
| - name: Upload macOS crash diagnostics | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crash-diagnostics-${{ matrix.config }}-${{ matrix.os }} | |
| path: ~/Library/Logs/DiagnosticReports/*.ips | |
| if-no-files-found: ignore | |
| if: runner.os == 'macOS' && always() | |
| - name: Process Windows crash dumps | |
| if: runner.os == 'Windows' && always() | |
| shell: pwsh | |
| run: | | |
| $dumpDir = Join-Path $env:GITHUB_WORKSPACE 'LocalDumps' | |
| $reportsDir = Join-Path $env:GITHUB_WORKSPACE 'LocalDumpReports' | |
| python scripts\process_crash_dumps.py ` | |
| --dumps $dumpDir ` | |
| --workspace $env:GITHUB_WORKSPACE ` | |
| --reports $reportsDir ` | |
| --cdb "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" | |
| - name: Upload Windows crash dump reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crash-dumps-${{ matrix.config }}-${{ matrix.os }} | |
| path: ${{ github.workspace }}/LocalDumpReports/* | |
| if-no-files-found: ignore | |
| if: runner.os == 'Windows' && always() |