Skip to content

Commit 25c0cb4

Browse files
authored
Update packages (#2439)
* update many packages * rollback changes to logger extensions * use binding redirects * rename the job * rename the job * use equality comparers
1 parent a22c789 commit 25c0cb4

File tree

37 files changed

+319
-235
lines changed

37 files changed

+319
-235
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 2 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Build and Publish
22

33
on:
44
push:
5-
pull_request:
65
branches:
76
- develop
87

@@ -12,72 +11,8 @@ env:
1211
RUN: ${{ github.run_number }}
1312

1413
jobs:
15-
get-version:
16-
runs-on: ubuntu-latest
17-
outputs:
18-
BUILD_ID: ${{ steps.get_build_id.outputs.BUILD_ID}}
19-
APP_VERSION: ${{ steps.get_app_version.outputs.APP_VERSION}}
20-
steps:
21-
- name: Get New Build Number
22-
id: get_build_id
23-
shell: bash
24-
run: |
25-
26-
# Get the build ID
27-
if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref_name }}" == "${{ github.event.repository.default_branch }}" ]]; then
28-
# Fetch the latest version from the organization NuGet package
29-
response=$(curl -s -L \
30-
-H "Accept: application/vnd.github+json" \
31-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
32-
-H "X-GitHub-Api-Version: 2022-11-28" \
33-
https://api.github.com/orgs/Open-Systems-Pharmacology/packages/nuget/OSPSuite.Core/versions)
34-
35-
# Log the raw response for debugging
36-
echo "API Response: $response"
37-
38-
# Check if the response indicates a package not found error or is not valid JSON
39-
if echo "$response" | jq -e '.message == "Package not found." or (.[0].name // empty | length == 0)' >/dev/null 2>&1; then
40-
# Set the build number to 15 if no package is found or response is invalid (since the last build was 12.1.14)
41-
new_build_id=16
42-
else
43-
latest_version=$(echo "$response" | jq -r '.[0].name // empty')
44-
45-
# Extract MAJOR, MINOR from the latest version
46-
IFS='.' read -r last_major last_minor last_build <<< "$latest_version"
47-
48-
# Compare with the current MAJOR, MINOR
49-
if [[ "$last_major" -eq "${{ env.MAJOR }}" && "$last_minor" -eq "${{ env.MINOR }}" ]]; then
50-
# Increment the last number if they match
51-
new_build_id=$((last_build + 1))
52-
else
53-
# Reset build number to 0 if the current version is different
54-
new_build_id=0
55-
fi
56-
fi
57-
58-
echo "latest build number: ${latest_version:-'None found'}"
59-
echo "new build number: ${new_build_id}"
60-
build_id="${new_build_id}"
61-
else
62-
build_id="9${{ env.RUN }}"
63-
fi
64-
65-
echo "New Build ID: ${build_id}"
66-
echo "BUILD_ID=${build_id}" >> $GITHUB_ENV
67-
echo "BUILD_ID=${build_id}" >> $GITHUB_OUTPUT
68-
69-
- name: Get App Version
70-
id: get_app_version
71-
shell: bash
72-
run: |
73-
app_version="${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD_ID }}"
74-
echo "App Version: ${app_version}"
75-
echo "APP_VERSION=${app_version}" >> $GITHUB_ENV
76-
echo "APP_VERSION=${app_version}" >> $GITHUB_OUTPUT
77-
78-
build:
14+
build-test-publish:
7915
runs-on: windows-latest
80-
needs: get-version
8116
steps:
8217
- name: Checkout code
8318
uses: actions/checkout@v4
@@ -90,18 +25,11 @@ jobs:
9025
- name: Restore dependencies
9126
run: |
9227
nuget sources add -username Open-Systems-Pharmacology -password ${{ secrets.GITHUB_TOKEN }} -name OSP-GitHub-Packages -source "https://nuget.pkg.github.com/Open-Systems-Pharmacology/index.json"
93-
nuget sources add -name bddhelper -source https://ci.appveyor.com/nuget/ospsuite-bddhelper
94-
nuget sources add -name utility -source https://ci.appveyor.com/nuget/ospsuite-utility
95-
nuget sources add -name serializer -source https://ci.appveyor.com/nuget/ospsuite-serializer
96-
nuget sources add -name databinding -source https://ci.appveyor.com/nuget/ospsuite-databinding
97-
nuget sources add -name texreporting -source https://ci.appveyor.com/nuget/ospsuite-texreporting
98-
nuget sources add -name databinding-devexpress -source https://ci.appveyor.com/nuget/ospsuite-databinding-devexpress
9928
dotnet restore
10029
10130
- name: define env variables
10231
run: |
103-
echo "APP_VERSION=${{needs.get-version.outputs.APP_VERSION}}" | Out-File -FilePath $env:GITHUB_ENV -Append
104-
echo "BUILD_ID=${{needs.get-version.outputs.BUILD_ID}}" | Out-File -FilePath $env:GITHUB_ENV -Append
32+
echo "APP_VERSION=${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.RUN }}" | Out-File -FilePath $env:GITHUB_ENV -Append
10533
10634
- name: Build
10735
run: msbuild OSPSuite.Core.sln /p:Version=${{env.APP_VERSION}}
@@ -112,14 +40,6 @@ jobs:
11240
- name: Pack the project
11341
run: dotnet pack .\OSPSuite.Core.sln --no-build --no-restore -o ./ -p:PackageVersion=${{env.APP_VERSION}} --configuration=Debug --no-build
11442

115-
- name: Push nupkg as artifact
116-
# if it is a push to a branch
117-
if: github.event_name == 'push' && github.ref_name != github.event.repository.default_branch
118-
uses: actions/upload-artifact@v4
119-
with:
120-
name: OSPSuite.Core
121-
path: ./*.nupkg
122-
12343
- name: Push test log as artifact
12444
uses: actions/upload-artifact@v4
12545
with:

.github/workflows/build-pr.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
8+
env:
9+
MAJOR: 12
10+
MINOR: 1
11+
RUN: 9999
12+
13+
jobs:
14+
build-and-test:
15+
runs-on: windows-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: 'true'
21+
22+
- name: Add msbuild to PATH
23+
uses: microsoft/setup-msbuild@v2
24+
25+
- name: Restore dependencies
26+
run: |
27+
nuget sources add -username Open-Systems-Pharmacology -password ${{ secrets.GITHUB_TOKEN }} -name OSP-GitHub-Packages -source "https://nuget.pkg.github.com/Open-Systems-Pharmacology/index.json"
28+
dotnet restore
29+
30+
- name: define env variables
31+
run: |
32+
echo "APP_VERSION=${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.RUN }}" | Out-File -FilePath $env:GITHUB_ENV -Append
33+
34+
- name: Build
35+
run: msbuild OSPSuite.Core.sln /p:Version=${{env.APP_VERSION}}
36+
37+
- name : Test
38+
run: dotnet test .\tests\**\bin\Debug\net472\OSPSuite*Tests.dll -v normal --no-build --logger:"html;LogFileName=../testLog_Windows.html"
39+
40+
- name: Pack the project
41+
run: dotnet pack .\OSPSuite.Core.sln --no-build --no-restore -o ./ -p:PackageVersion=${{env.APP_VERSION}} --configuration=Debug --no-build
42+
43+
- name: Push nupkg as artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: OSPSuite.Core
47+
path: ./*.nupkg
48+
49+
- name: Push test log as artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: testLog_Windows
53+
path: ./testLog*.html

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,4 @@ paket-files/
264264
licenses.licx
265265
*.DotSettings
266266
/OSPSuite.Core.v3.ncrunchsolution
267+
*.ncrunchproject

src/OSPSuite.Assets.Images/OSPSuite.Assets.Images.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
</ItemGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
45-
<PackageReference Include="System.Drawing.Common" Version="5.0.0" />
46-
<PackageReference Include="DevExpress.Data" Version="21.2.3" />
44+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
45+
<PackageReference Include="System.Drawing.Common" Version="9.0.2" />
46+
<PackageReference Include="DevExpress.Data" Version="21.2.15" />
4747
</ItemGroup>
4848

4949
<ItemGroup>

src/OSPSuite.Assets/OSPSuite.Assets.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath=""/>
32-
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png"/>
31+
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath="" />
32+
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png" />
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
36+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
3737
</ItemGroup>
3838

3939
</Project>

src/OSPSuite.Core/Domain/Repositories/ObservedDataRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public DataRepository FindFor(UsedObservedData usedObservedData)
3737

3838
public IEnumerable<DataRepository> AllObservedDataUsedBy(IUsesObservedData observedDataUser)
3939
{
40-
return observedDataUser == null ? Enumerable.Empty<DataRepository>() : All().Where(observedDataUser.UsesObservedData);
40+
return observedDataUser == null ? Enumerable.Empty<DataRepository>() : All().Where(observedDataUser.UsesObservedData).ToList();
4141
}
4242

4343
public IEnumerable<DataRepository> AllObservedDataUsedBy(IEnumerable<IUsesObservedData> observedDataUsers)

src/OSPSuite.Core/OSPSuite.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
<ItemGroup>
3737
<PackageReference Include="csmpfit" Version="1.1.1" />
3838
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
39-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0" />
40-
<PackageReference Include="OSPSuite.Serializer" Version="3.0.0.1" />
39+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.2" />
40+
<PackageReference Include="OSPSuite.Serializer" Version="3.0.1.1" />
4141
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.73" GeneratePathProperty="true" />
4242
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.75" GeneratePathProperty="true" />
43-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
43+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
4444
</ItemGroup>
4545

4646
<ItemGroup>

src/OSPSuite.Infrastructure.Autofac/OSPSuite.Infrastructure.Autofac.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath=""/>
23-
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png"/>
22+
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath="" />
23+
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png" />
2424
</ItemGroup>
2525

2626
<ItemGroup>
2727
<PackageReference Include="Autofac" Version="4.9.4" />
28-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
28+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

src/OSPSuite.Infrastructure.Castle/OSPSuite.Infrastructure.Castle.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath=""/>
23-
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png"/>
22+
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath="" />
23+
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png" />
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="Castle.Windsor" Version="5.0.1" />
28-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
27+
<PackageReference Include="Castle.Windsor" Version="6.0.0" />
28+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

src/OSPSuite.Infrastructure.Export/OSPSuite.Infrastructure.Export.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="NPOI" Version="2.5.5" />
27-
<PackageReference Include="OSPSuite.Utility" Version="4.1.0.6" />
26+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.2" />
27+
<PackageReference Include="NPOI" Version="2.7.2" />
28+
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
2829
</ItemGroup>
2930

3031
<ItemGroup>
@@ -37,8 +38,8 @@
3738
</ItemGroup>
3839

3940
<ItemGroup>
40-
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath=""/>
41-
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png"/>
41+
<None Include="..\..\LICENSE" Link="LICENSE" Pack="true" PackagePath="" />
42+
<None Include="..\..\logo.png" Pack="true" Link="logo.png" PackagePath="\logo.png" />
4243
</ItemGroup>
4344

4445
</Project>

0 commit comments

Comments
 (0)