Skip to content

Commit ea856f8

Browse files
authored
Update build-go-win7-dll.yml
1 parent 4b705b1 commit ea856f8

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/build-go-win7-dll.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branch:
1010
description: "Git branch to build (e.g., unity)"
1111
required: true
12-
default: "main"
12+
default: "unity"
1313
dll_name:
1414
description: "Base name for the output DLL (without extension)"
1515
required: true
@@ -39,15 +39,19 @@ jobs:
3939
- name: Checkout target branch (e.g., unity)
4040
uses: actions/checkout@v4
4141
with:
42-
# IMPORTANT: the workflow file stays on main; we checkout the target source branch here
42+
# IMPORTANT: keep the "Use workflow from" dropdown on main; we checkout the target source branch here
4343
ref: ${{ inputs.branch }}
4444
fetch-depth: 0
4545
# submodules: recursive # uncomment if your repo uses submodules
4646

47-
- name: Show current commit
47+
- name: Verify checked-out ref
4848
run: |
49-
echo "Building from branch: ${{ inputs.branch }}"
50-
git log -1 --oneline
49+
echo "Expected branch input: ${{ inputs.branch }}"
50+
echo "HEAD commit: $(git rev-parse HEAD)"
51+
echo "Remote branches that contain HEAD (detached HEAD is normal on Actions):"
52+
git branch -r --contains HEAD || true
53+
echo "Decorated HEAD:"
54+
git show -s --format='%H %D %s' HEAD
5155
5256
- name: Set up Go 1.20
5357
uses: actions/setup-go@v5
@@ -68,17 +72,13 @@ jobs:
6872
CXX: ${{ matrix.cxx }}
6973
# Win7 compatibility macros (adjust or remove if not needed)
7074
CGO_CFLAGS: "-D_WIN32_WINNT=0x0601 -DWINVER=0x0601"
71-
# If you need more static linking, try enabling the following (verify dependency compatibility):
72-
# CGO_LDFLAGS: "-static -static-libgcc -static-libstdc++"
7375
run: |
7476
mkdir -p windows
7577
OUT="windows/${{ inputs.dll_name }}_${{ matrix.suffix }}.dll"
76-
7778
echo "Building ${OUT} ..."
7879
go build -buildmode=c-shared -trimpath -ldflags="-s -w" \
7980
-o "${OUT}" \
8081
"${{ inputs.package_path }}"
81-
8282
echo "Listing artifacts in windows/:"
8383
ls -l windows
8484

0 commit comments

Comments
 (0)