Skip to content

Thread-safety fixes (#53, #26) and .NET 10 build-warning cleanup (#46) #27

Thread-safety fixes (#53, #26) and .NET 10 build-warning cleanup (#46)

Thread-safety fixes (#53, #26) and .NET 10 build-warning cleanup (#46) #27

Workflow file for this run

name: Build PR
on:
pull_request:
branches:
- main
permissions:
packages: read
contents: read
env:
MAJOR: 5
MINOR: 0
MINORMINOR: 0
RUN: ${{ github.run_number }}
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Restore dependencies
run: |
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"
nuget restore
- name: define env variables
run: |
echo "APP_VERSION=${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MINORMINOR }}.${{ env.RUN }}" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Build
run: dotnet build OSPSuite.Utility.sln /p:Version=${{env.APP_VERSION}} --configuration Debug
- name : Test
run: dotnet test OSPSuite.Utility.sln -v normal --no-build --configuration Debug --logger:"html;LogFileName=../testLog_Windows.html"
- name: Pack the project
run: dotnet pack .\OSPSuite.Utility.sln --no-build --no-restore -o ./ -p:PackageVersion=${{env.APP_VERSION}} --configuration=Debug --no-build
- name: Push nupkg as artifact
uses: actions/upload-artifact@v7
with:
name: OSPSuite.Utility
path: ./*.nupkg
- name: Push test log as artifact
uses: actions/upload-artifact@v7
with:
name: testLog_Windows
path: ./**/testLog*.html