Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/_typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extend-exclude = [
"PopulationByCountry.csv",
"PopulationByAdmin1.csv",
"WomensSuffrage.txt",
"SK-dotnet.sln.DotSettings",
"SK-dotnet.slnx.DotSettings",
"**/azure_ai_search_hotel_samples/README.md",
"**/Demos/ProcessFrameworkWithAspire/ProcessFramework.Aspire/ProcessFramework.Aspire.ProcessOrchestrator/Program.cs",
"**/Demos/ProcessFrameworkWithAspire/**/*.http",
Expand Down
31 changes: 23 additions & 8 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,43 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup dotnet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v3

- name: Setup dotnet
uses: actions/[email protected]
with:
dotnet-version: ${{ matrix.dotnet }}
global-json-file: ${{ github.workspace }}/dotnet/global.json

- name: Build dotnet solutions
shell: bash
run: |
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.sln" | tr '\n' ' ')
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.slnx" | tr '\n' ' ')
for solution in $SOLUTIONS; do
dotnet build $solution -c ${{ matrix.configuration }} --warnaserror
done

- name: Package install check
shell: bash
if: matrix.os == 'ubuntu-latest'
run: |
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.sln" | tr '\n' ' ')
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.slnx" | tr '\n' ' ')
for solution in $SOLUTIONS; do
dotnet pack $solution -c ${{ matrix.configuration }} --no-build --no-restore --output ./artifacts
done
dotnet new console --name packcheck --output consoleapp
dotnet add consoleapp/packcheck.csproj package Microsoft.SemanticKernel --source ./artifacts
dotnet build consoleapp/packcheck.csproj

# Create minimal nuget.config and use only dotnet nuget commands
echo '<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><clear /></packageSources></configuration>' > consoleapp/nuget.config

# Add sources with local first using dotnet nuget commands
dotnet nuget add source ../artifacts --name local --configfile consoleapp/nuget.config
dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org --configfile consoleapp/nuget.config

# Change to project directory to ensure local nuget.config is used
cd consoleapp
dotnet add packcheck.csproj package Microsoft.SemanticKernel
dotnet build -c ${{ matrix.configuration }} packcheck.csproj
cd ..

# Clean up
rm -rf ./artifacts
rm -rf ./consoleapp

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Find solutions
shell: bash
run: echo "solutions=$(find ./ -type f -name "*.sln" | tr '\n' ' ')" >> $GITHUB_ENV
run: echo "solutions=$(find ./ -type f -name "*.slnx" | tr '\n' ' ')" >> $GITHUB_ENV

- name: Pull container dotnet/sdk:${{ matrix.dotnet }}
run: |
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Find solutions
shell: bash
run: echo "solutions=$(find ./dotnet -type f -name "*.sln" | tr '\n' ' ')" >> $GITHUB_ENV
run: echo "solutions=$(find ./dotnet -type f -name "*.slnx" | tr '\n' ' ')" >> $GITHUB_ENV

- name: Restore dependencies
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ jobs:
done
done
else
# if the changed-files step failed, run dotnet on the whole sln instead of specific projects
csproj_files=$(find ./ -type f -name "*.sln" | tr '\n' ' ');
# if the changed-files step failed, run dotnet on the whole slnx instead of specific projects
csproj_files=$(find ./ -type f -name "*.slnx" | tr '\n' ' ');
fi
csproj_files=($(printf "%s\n" "${csproj_files[@]}" | sort -u))
echo "Found ${#csproj_files[@]} unique csproj/sln files: ${csproj_files[*]}"
echo "Found ${#csproj_files[@]} unique csproj/slnx files: ${csproj_files[*]}"
echo "::set-output name=csproj_files::${csproj_files[*]}"

- name: Pull container dotnet/sdk:${{ matrix.dotnet }}
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ __pycache__/
.mypy_cache/
__pypackages__/
.pdm.toml
global.json

# doxfx
**/DROP/
Expand Down Expand Up @@ -499,4 +498,4 @@ swa-cli.config.json
**/.kiota

# dapr extension files
**/dapr.yaml
**/dapr.yaml
5 changes: 2 additions & 3 deletions dotnet/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<!-- using Central Package Management feature -->
<!-- https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />
<!-- Only run 'dotnet format' on dev machines, Release builds. Skip on GitHub Actions -->
<!-- as this runs in its own Actions job. -->
<!-- Only run 'dotnet format' on dev machines, Release builds. Skip on GitHub Actions and Azure DevOps. -->
<Target Name="DotnetFormatOnBuild" BeforeTargets="Build"
Condition=" '$(Configuration)' == 'Release' AND '$(GITHUB_ACTIONS)' == '' ">
Condition=" '$(Configuration)' == 'Release' AND '$(GITHUB_ACTIONS)' == '' AND '$(TF_BUILD)' != 'true' ">
<Message Text="Running dotnet format" Importance="high" />
<Exec Command="dotnet format --no-restore -v diag $(ProjectFileName)" />
</Target>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/MEVD.slnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"solution": {
"path": "SK-dotnet.sln",
"path": "SK-dotnet.slnx",
"projects":
[
"src/Connectors/Connectors.Memory.AzureAISearch/Connectors.Memory.AzureAISearch.csproj",
Expand Down
Loading
Loading