Skip to content

Commit cb69f56

Browse files
committed
Revised Visual Studio workflow for PR source
1 parent e0b0cd1 commit cb69f56

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/visual-studio.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,25 @@ jobs:
1515
runs-on: windows-2019 # .NET 3.5 is available here
1616

1717
steps:
18-
# Checkout PR branch instead of master
19-
- name: Checkout Repository (PR branch)
18+
# Checkout PR branch (supports both forks and local PRs)
19+
- name: Checkout Repository (PR branch or push branch)
2020
uses: actions/checkout@v3
2121
with:
22-
ref: ${{ github.event.pull_request.head.ref }} # Checkout the PR branch
22+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
23+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
2324

24-
- name: Checkout wolfSSL (PR branch)
25+
# Checkout wolfSSL (PR branch if from fork, master if push)
26+
- name: Checkout wolfSSL (PR branch or master)
2527
uses: actions/checkout@v3
2628
with:
27-
repository: ${{ github.event.pull_request.head.repo.full_name }} # Uses the repository where the PR was made
28-
ref: ${{ github.event.pull_request.head.ref }} # Checkout the branch from the PR
29-
path: wolfssl # Clone wolfSSL into the "wolfssl" subdirectory
29+
repository: ${{ github.event.pull_request.head.repo.full_name || 'wolfssl/wolfssl' }} # Pull from fork if PR exists
30+
ref: ${{ github.event.pull_request.head.ref || 'master' }} # Use PR branch if available, otherwise master
31+
path: wolfssl # Clone wolfSSL into "wolfssl" subdirectory
3032

3133
- name: Setup MSBuild
3234
uses: microsoft/setup-msbuild@v1
3335

34-
# wolfssl core
36+
# wolfSSL core
3537
- name: Build wolfSSL (DLL Debug, x64)
3638
working-directory: wolfssl
3739
run: |
@@ -49,13 +51,11 @@ jobs:
4951
run: msbuild wolfCrypt-Test.csproj /p:TargetFrameworkVersion=v3.5
5052

5153
# DTLS
52-
# TODO add new wolfSSL-DTLS-Client
5354
- name: Build wolfSSL-DTLS-Server
5455
working-directory: wrapper/CSharp/wolfSSL-DTLS-Server
5556
run: msbuild wolfSSL-DTLS-Server.csproj /p:TargetFrameworkVersion=v3.5
5657

5758
# DTLS-PSK
58-
# TODO add new wolfSSL-DTLS-PSK-Server
5959
- name: Build wolfSSL-DTLS-PSK-Server
6060
working-directory: wrapper/CSharp/wolfSSL-DTLS-PSK-Server
6161
run: msbuild wolfSSL-DTLS-PSK-Server.csproj /p:TargetFrameworkVersion=v3.5

0 commit comments

Comments
 (0)