Add 'filesystem' Demo for Java #1411
Workflow file for this run
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 | |
| env: | |
| CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
| jobs: | |
| ci: | |
| name: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| - os: macos-15 | |
| - os: windows-2022 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| if: runner.os == 'macOS' | |
| uses: ./.github/actions/setup-xcode | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "oracle" | |
| java-version: "17" | |
| - name: Install Nightly Ice Builds | |
| uses: ./.github/actions/install-nightly-ice | |
| - name: Build C++ Demos | |
| timeout-minutes: 20 | |
| working-directory: cpp | |
| run: | | |
| set -o pipefail | |
| find . -name CMakeLists.txt -type f | while IFS= read -r file; do | |
| dir=$(dirname "$file"); | |
| cmake -B "$dir/build" -S "$dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| cmake --build "$dir/build" --verbose | |
| done | |
| if: runner.os != 'Windows' | |
| - name: Build C++ Demos | |
| timeout-minutes: 20 | |
| working-directory: cpp | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Get-ChildItem -Recurse -Filter CMakeLists.txt | ForEach-Object { | |
| Write-Output "Processing: $_" | |
| $dir = $_.DirectoryName | |
| # Run cmake configure step | |
| cmake -B "$dir/build" -S "$dir" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| if ($LASTEXITCODE -ne 0) { throw "CMake configuration failed" } | |
| # Run cmake build step | |
| cmake --build "$dir/build" --verbose --config Release | |
| if ($LASTEXITCODE -ne 0) { throw "CMake build failed" } | |
| } | |
| if: runner.os == 'Windows' | |
| - name: Build C# Demos | |
| timeout-minutes: 20 | |
| working-directory: csharp | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Get-ChildItem -Recurse -Filter *.sln | ForEach-Object { | |
| Write-Host "Building solution: $($_.FullName)" | |
| dotnet build $_.FullName | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "dotnet build failed for $($_.FullName)" | |
| } | |
| } | |
| - name: Build Java Demos | |
| timeout-minutes: 20 | |
| working-directory: java | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Get-ChildItem -Recurse -Depth 2 -Filter gradlew | ForEach-Object { | |
| Push-Location $_.DirectoryName | |
| Write-Host "Building in $($_.DirectoryName)..." | |
| & ./gradlew build | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "Build failed in $($_.DirectoryName)" | |
| } | |
| Pop-Location | |
| } | |
| - name: Build JavaScript Demos | |
| timeout-minutes: 20 | |
| working-directory: js | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| Get-ChildItem -Recurse -Depth 2 -Filter package.json | ForEach-Object { | |
| Push-Location $_.DirectoryName | |
| Write-Host "Installing and building in $($_.DirectoryName)..." | |
| npm install | |
| if ($LASTEXITCODE -ne 0) { throw "npm install failed in $($_.DirectoryName)" } | |
| npm run build | |
| if ($LASTEXITCODE -ne 0) { throw "npm build failed in $($_.DirectoryName)" } | |
| Pop-Location | |
| } | |
| - name: Build Swift Demos | |
| timeout-minutes: 20 | |
| working-directory: swift | |
| run: | | |
| set -o pipefail | |
| find . -name Package.swift -type f | while IFS= read -r file; do | |
| swift build --package-path "$(dirname "$file")" | |
| done | |
| if: runner.os == 'macOS' |