Skip to content

Commit 7765c22

Browse files
committed
Change msbuild.yml
1 parent a0198ac commit 7765c22

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/msbuild.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ name: MSBuild
77

88
on:
99
push:
10-
branches: [ "main" ]
10+
branches: [ "main", "develop" ]
1111
pull_request:
12-
branches: [ "main" ]
12+
branches: [ "main", "develop" ]
1313
workflow_dispatch:
1414

1515
env:
1616
# Path to the solution file relative to the root of the project.
17-
SOLUTION_FILE_PATH: .
17+
SOLUTION_FILE_PATH: test/ujson-test.sln
1818

1919
# Configuration type to build.
2020
# You can convert this to a build matrix if you need coverage of multiple configuration types.
2121
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
2222
BUILD_CONFIGURATION: Release
23+
PLATFORM: x64
2324

2425
permissions:
2526
contents: read
@@ -29,17 +30,30 @@ jobs:
2930
runs-on: windows-latest
3031

3132
steps:
32-
- uses: actions/checkout@v4
33-
33+
- name: Checkout repository (with submodules)
34+
uses: actions/checkout@v4
35+
with:
36+
# fetch submodules (recursively) so ../ujson exists for the project
37+
submodules: 'recursive'
38+
# ensure full history for submodules if needed
39+
fetch-depth: 0
40+
# use the default token so private submodules from the same host are fetched
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
3443
- name: Add MSBuild to PATH
3544
uses: microsoft/setup-msbuild@v1.0.2
3645

37-
- name: Restore NuGet packages
38-
working-directory: ${{env.GITHUB_WORKSPACE}}
39-
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
46+
#- name: Restore NuGet packages
47+
# working-directory: ${{env.GITHUB_WORKSPACE}}
48+
# run: nuget restore ${{env.SOLUTION_FILE_PATH}}
4049

4150
- name: Build
4251
working-directory: ${{env.GITHUB_WORKSPACE}}
4352
# Add additional options to the MSBuild command line here (like platform or verbosity level).
4453
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
45-
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
54+
run: msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}
55+
56+
- name: Run the test
57+
# Runs the executable and fails the job if it returns non-zero.
58+
working-directory: test/_OUT/${{ env.PLATFORM }}/${{ env.BUILD_CONFIGURATION }}
59+
run: .\ujson-test.exe

0 commit comments

Comments
 (0)