diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54481bc28..7da3a2446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - WORKING_DIR: ${{ github.workspace }} + WORKSPACE: ${{ github.workspace }} GLOBAL_JSON_PATH: '${{ github.workspace }}\global.json' SOLUTION_PATH: '${{ github.workspace }}\SecureFolderFS.Public.slnx' SFFS_UNO_PROJECT_PATH: '${{ github.workspace }}\src\Platforms\SecureFolderFS.Uno\SecureFolderFS.Uno.csproj' @@ -16,6 +16,8 @@ env: SFFS_CLI_PROJECT_PATH: '${{ github.workspace }}\src\Platforms\SecureFolderFS.Cli\SecureFolderFS.Cli.csproj' DOTNET_TFM: 'net10.0' DOTNET_SDK: '10.0.102' + NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages + NUGET_HTTP_CACHE_PATH: ${{ github.workspace }}\.nuget\http-cache jobs: # Ensures that the formatting in all XAML files across the codebase is correct for the latest commit. @@ -61,9 +63,11 @@ jobs: matrix: configuration: [Release, Debug] project: [NWebDav.Server, NWebDav.Server.HttpListener, Tmds.Fuse] + targetFramework: [net10.0] env: CONFIGURATION: ${{ matrix.configuration }} PROJECT: ${{ matrix.project }} + ID: runtime.lib.${{ matrix.project }}.${{ matrix.targetFramework }}.Environment-${{ matrix.configuration }} steps: - name: Checkout the repository @@ -84,7 +88,7 @@ jobs: } else { $thisProject = "Tmds.Fuse" } - $thisProjectPath = "$env:WORKING_DIR\lib\$thisProject\src\$env:PROJECT" + $thisProjectPath = "$env:WORKSPACE\lib\$thisProject\src\$env:PROJECT" Add-Content -Path $env:GITHUB_ENV -Value "THIS_PROJECT_PATH=$thisProjectPath" - name: Restore @@ -101,12 +105,6 @@ jobs: -p:Platform="Any CPU" ` -p:Configuration=$env:CONFIGURATION -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' - # Builds the shared libraries consumed by almost all projects in the SecureFolderFS codebase. shared: runs-on: windows-2025-vs2026 @@ -120,6 +118,7 @@ jobs: CONFIGURATION: ${{ matrix.configuration }} PROJECT: ${{ matrix.project }} THIS_PROJECT_PATH: ${{ github.workspace }}\src\Shared\SecureFolderFS.${{ matrix.project }} + ID: runtime.shared.${{ matrix.project }}.${{ matrix.targetFramework }}.Environment-${{ matrix.configuration }} steps: - name: Checkout the repository @@ -147,11 +146,14 @@ jobs: -p:Platform="Any CPU" ` -p:Configuration=$env:CONFIGURATION -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' + - name: Upload workspace + if: ${{ matrix.project == 'Storage' }} + uses: actions/upload-artifact@v7 + with: + name: ${{ env.ID }} + path: ${{ github.workspace }} + retention-days: 1 + include-hidden-files: true # Builds the SecureFolderFS SDK libraries. sdk: @@ -166,12 +168,14 @@ jobs: env: CONFIGURATION: ${{ matrix.configuration }} PROJECT: ${{ matrix.project }} + ID: runtime.sdk.${{ matrix.project }}.${{ matrix.targetFramework }}.Environment-${{ matrix.configuration }} + PREREQUISITE: runtime.shared.Storage.net10.0.Environment-${{ matrix.configuration }} steps: - - name: Checkout the repository - uses: actions/checkout@v6 + - name: Download workspace + uses: actions/download-artifact@v8 with: - submodules: recursive + name: ${{ env.PREREQUISITE }} - name: Install Dependencies uses: "./.github/install_dependencies" @@ -186,16 +190,9 @@ jobs: } else { $thisProject = "Sdk.$env:PROJECT" } - $thisProjectPath = "$env:WORKING_DIR\src\Sdk\SecureFolderFS.$thisProject" + $thisProjectPath = "$env:WORKSPACE\src\Sdk\SecureFolderFS.$thisProject" Add-Content -Path $env:GITHUB_ENV -Value "THIS_PROJECT_PATH=$thisProjectPath" - - name: Restore - run: | - msbuild $env:SOLUTION_PATH ` - -t:Restore ` - -p:Platform="Any CPU" ` - -p:Configuration=$env:CONFIGURATION - - name: Build run: | msbuild $env:THIS_PROJECT_PATH ` @@ -203,11 +200,14 @@ jobs: -p:Platform="Any CPU" ` -p:Configuration=$env:CONFIGURATION -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' + - name: Upload workspace + if: ${{ matrix.project == 'Sdk' }} + uses: actions/upload-artifact@v7 + with: + name: ${{ env.ID }} + path: ${{ github.workspace }} + retention-days: 1 + include-hidden-files: true # Builds the SecureFolderFS Core libraries. core: @@ -237,12 +237,14 @@ jobs: PROJECT: ${{ matrix.project }} THIS_PROJECT_PATH: ${{ github.workspace }}\src\Core\SecureFolderFS.Core.${{ matrix.project }} THIS_TFM: ${{ matrix.targetFramework }} + ID: runtime.core.${{ matrix.project }}.${{ matrix.targetFramework }}.Environment-${{ matrix.configuration }} + PREREQUISITE: runtime.shared.Storage.net10.0.Environment-${{ matrix.configuration }} steps: - - name: Checkout the repository - uses: actions/checkout@v6 + - name: Download workspace + uses: actions/download-artifact@v8 with: - submodules: recursive + name: ${{ env.PREREQUISITE }} - name: Install Dependencies uses: "./.github/install_dependencies" @@ -257,16 +259,9 @@ jobs: } else { $thisProject = "Core.$env:PROJECT" } - $thisProjectPath = "$env:WORKING_DIR\src\Core\SecureFolderFS.$thisProject" + $thisProjectPath = "$env:WORKSPACE\src\Core\SecureFolderFS.$thisProject" Add-Content -Path $env:GITHUB_ENV -Value "THIS_PROJECT_PATH=$thisProjectPath" - - name: Restore - run: | - msbuild $env:SOLUTION_PATH ` - -t:Restore ` - -p:Platform="Any CPU" ` - -p:Configuration=$env:CONFIGURATION - - name: Build run: | msbuild $env:THIS_PROJECT_PATH ` @@ -275,12 +270,6 @@ jobs: -p:Configuration=$env:CONFIGURATION ` -p:TargetFramework=$env:THIS_TFM -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' - # Builds the SecureFolderFS cross-platform UI library. # This library is the common denominator for both the MAUI and Uno Platform project heads. ui: @@ -290,17 +279,20 @@ jobs: fail-fast: false matrix: configuration: [Release, Debug] + project: [UI] targetFramework: [net10.0] env: CONFIGURATION: ${{ matrix.configuration }} THIS_PROJECT_PATH: ${{ github.workspace }}\src\Platforms\SecureFolderFS.UI THIS_TFM: ${{ matrix.targetFramework }} + ID: runtime.ui.${{ matrix.project }}.${{ matrix.targetFramework }}.Environment-${{ matrix.configuration }} + PREREQUISITE: runtime.sdk.Sdk.net10.0.Environment-${{ matrix.configuration }} steps: - - name: Checkout the repository - uses: actions/checkout@v6 + - name: Download workspace + uses: actions/download-artifact@v8 with: - submodules: recursive + name: ${{ env.PREREQUISITE }} - name: Install Dependencies uses: "./.github/install_dependencies" @@ -308,13 +300,6 @@ jobs: dotnet-version: ${{ env.DOTNET_SDK }} run-uno-check: false - - name: Restore - run: | - msbuild $env:SOLUTION_PATH ` - -t:Restore ` - -p:Platform="Any CPU" ` - -p:Configuration=$env:CONFIGURATION - - name: Build run: | msbuild $env:THIS_PROJECT_PATH ` @@ -322,11 +307,13 @@ jobs: -p:Platform="Any CPU" ` -p:Configuration=$env:CONFIGURATION -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' + - name: Upload workspace + uses: actions/upload-artifact@v7 + with: + name: ${{ env.ID }} + path: ${{ github.workspace }} + retention-days: 1 + include-hidden-files: true # Builds the SecureFolderFS Uno Platform app project head. uno: @@ -336,17 +323,19 @@ jobs: fail-fast: false matrix: configuration: [Release, Debug] + project: [Uno] targetFramework: [net10.0-desktop, net10.0-windows10.0.26100.0] env: CONFIGURATION: ${{ matrix.configuration }} THIS_PROJECT_PATH: ${{ github.workspace }}\src\Platforms\SecureFolderFS.Uno THIS_TFM: ${{ matrix.targetFramework }} + PREREQUISITE: runtime.ui.UI.net10.0.Environment-${{ matrix.configuration }} steps: - - name: Checkout the repository - uses: actions/checkout@v6 + - name: Download workspace + uses: actions/download-artifact@v8 with: - submodules: recursive + name: ${{ env.PREREQUISITE }} - name: Install Dependencies uses: "./.github/install_dependencies" @@ -354,13 +343,6 @@ jobs: dotnet-version: ${{ env.DOTNET_SDK }} run-uno-check: false - - name: Restore - run: | - msbuild $env:SOLUTION_PATH ` - -t:Restore ` - -p:Platform="Any CPU" ` - -p:Configuration=$env:CONFIGURATION - - name: Build run: | msbuild $env:THIS_PROJECT_PATH ` @@ -369,12 +351,6 @@ jobs: -p:Configuration=$env:CONFIGURATION ` -p:TargetFramework=$env:THIS_TFM -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: '' - # Builds the SecureFolderFS MAUI app project head. maui: needs: [core, sdk, shared, ui] @@ -383,17 +359,19 @@ jobs: fail-fast: false matrix: configuration: [Release, Debug] + project: [Maui] targetFramework: [net10.0-android, net10.0-ios] env: CONFIGURATION: ${{ matrix.configuration }} THIS_PROJECT_PATH: ${{ github.workspace }}\src\Platforms\SecureFolderFS.Maui THIS_TFM: ${{ matrix.targetFramework }} + PREREQUISITE: runtime.ui.UI.net10.0.Environment-${{ matrix.configuration }} steps: - - name: Checkout the repository - uses: actions/checkout@v6 + - name: Download workspace + uses: actions/download-artifact@v8 with: - submodules: recursive + name: ${{ env.PREREQUISITE }} - name: Install Dependencies uses: "./.github/install_dependencies" @@ -401,13 +379,6 @@ jobs: dotnet-version: ${{ env.DOTNET_SDK }} run-uno-check: false - - name: Restore - run: | - msbuild $env:SOLUTION_PATH ` - -t:Restore ` - -p:Platform="Any CPU" ` - -p:Configuration=$env:CONFIGURATION - - name: Build run: | msbuild $env:THIS_PROJECT_PATH ` @@ -415,9 +386,3 @@ jobs: -p:Platform="Any CPU" ` -p:Configuration=$env:CONFIGURATION ` -p:TargetFramework=$env:THIS_TFM - -# - name: Upload artifact -# uses: actions/upload-artifact@v7 -# with: -# name: '' -# path: ''