Skip to content

Commit

Permalink
start tests after build
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Kremer committed Oct 13, 2024
1 parent 2822b53 commit 53b23c6
Showing 1 changed file with 43 additions and 38 deletions.
81 changes: 43 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,46 @@ jobs:
configuration: [Debug, Release]

steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- uses: dotnet/nbgv@master
id: nbgv

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Build with MSBuild
run: |
msbuild jN.vcxproj /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:VersionMajor=${{steps.nbgv.outputs.VersionMajor}} /p:VersionMinor=${{steps.nbgv.outputs.VersionMinor}} /p:BuildNumber=${{steps.nbgv.outputs.BuildNumber}} /p:VersionRevision=${{steps.nbgv.outputs.VersionRevision}}
- name: Create zip file
run: |
if ("${{ matrix.platform }}" -eq "x64"){
Copy-Item ${{ matrix.platform}}/${{ matrix.configuration }}/*.dll ./deploy/
} else {
Copy-Item ${{ matrix.configuration }}/*.dll ./deploy/
}
cd ./deploy
7z a ../jN_${{ steps.nbgv.outputs.SemVer2 }}_${{ matrix.platform }}.zip *
- name: Upload artifacts
uses: actions/[email protected]
with:
name: Build artifacts ${{ matrix.platform }} ${{ matrix.configuration }}
path: |
jN_*.zip
${{ matrix.configuration }}/*.dll
${{ matrix.configuration }}/*.pdb
${{ matrix.platform }}/${{ matrix.configuration }}/*.dll
${{ matrix.platform }}/${{ matrix.configuration }}/*.pdb
retention-days: 3
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- uses: dotnet/nbgv@master
id: nbgv

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Build with MSBuild
run: |
msbuild jN.vcxproj /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:VersionMajor=${{steps.nbgv.outputs.VersionMajor}} /p:VersionMinor=${{steps.nbgv.outputs.VersionMinor}} /p:BuildNumber=${{steps.nbgv.outputs.BuildNumber}} /p:VersionRevision=${{steps.nbgv.outputs.VersionRevision}}
- name: Test
run: |
msbuild jn.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} -t:restore:build
"${{ matrix.platform }}/${{ matrix.configuration }}/tests.exe"
- name: Create zip file
run: |
if ("${{ matrix.platform }}" -eq "x64"){
Copy-Item ${{ matrix.platform}}/${{ matrix.configuration }}/*.dll ./deploy/
} else {
Copy-Item ${{ matrix.configuration }}/*.dll ./deploy/
}
cd ./deploy
7z a ../jN_${{ steps.nbgv.outputs.SemVer2 }}_${{ matrix.platform }}.zip *
- name: Upload artifacts
uses: actions/[email protected]
with:
name: Build artifacts ${{ matrix.platform }} ${{ matrix.configuration }}
path: |
jN_*.zip
${{ matrix.configuration }}/*.dll
${{ matrix.configuration }}/*.pdb
${{ matrix.platform }}/${{ matrix.configuration }}/*.dll
${{ matrix.platform }}/${{ matrix.configuration }}/*.pdb
retention-days: 3

0 comments on commit 53b23c6

Please sign in to comment.