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
45 changes: 39 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ concurrency:
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 15
name: Tests dotnet ${{ matrix.dotnet-version }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
dotnet-version: [8, 9, 10]
project: ['.']
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -27,10 +28,42 @@ jobs:

- name: Build projects
shell: bash
working-directory: ${{ matrix.project }}
run: dotnet build ./all.csproj
run: dotnet build ./all.csproj -f net${{ matrix.dotnet-version }}.0

- name: Run tests
shell: bash
working-directory: ${{ matrix.project }}
run: dotnet test ./all.csproj /p:BuildTestsOnly=true --no-build
run: dotnet test ./all.csproj /p:BuildTestsOnly=true --no-build -f net${{ matrix.dotnet-version }}.0

benchmarks:
runs-on: ubuntu-latest
name: Build Benchmarks
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10

- name: Build benchmarks
shell: bash
run: dotnet build ./all.csproj /p:BuildBenchmarksOnly=true -c Release -f net10.0

samples:
runs-on: ubuntu-latest
name: Build Samples
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10

- name: Build samples
shell: bash
run: dotnet build ./all.csproj /p:BuildSamplesOnly=true -c Release -f net10.0
14 changes: 12 additions & 2 deletions all.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@

<PropertyGroup>
<BuildTestsOnly>false</BuildTestsOnly>
<BuildSamplesOnly>false</BuildSamplesOnly>
<BuildBenchmarksOnly>false</BuildBenchmarksOnly>
<IncludeInSolutionFile>false</IncludeInSolutionFile>
</PropertyGroup>

<ItemGroup Condition="'$(BuildTestsOnly)' != 'true'">
<ProjectReference Include="**/*.csproj" />
<ProjectReference Include="**/*.csproj" Exclude="benchmark/**/*.csproj;samples/**/*.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(BuildTestsOnly)' == 'true'">
<ProjectReference Include="**/test/**/*.csproj" />
<ProjectReference Include="**/test/**/*.csproj" Exclude="benchmark/**/*.csproj;samples/**/*.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(BuildSamplesOnly)' == 'true'">
<ProjectReference Include="samples/**/*.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(BuildBenchmarksOnly)' == 'true'">
<ProjectReference Include="benchmark/**/*.csproj" />
</ItemGroup>

</Project>
Loading