Switch remote deploy to vendored source builds

Move remote deployment to a vendored source bundle built on the target host via Docker so redeploys no longer require local cross-compilation or host Go installation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
GitHub Actions
2026-05-08 12:19:18 +08:00
parent bb27566e38
commit c1a0fe2949
1320 changed files with 497125 additions and 11 deletions

View File

@@ -0,0 +1,66 @@
//go:build windows
package edge
import (
"errors"
"io"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
type _IStreamVtbl struct {
_IUnknownVtbl
Read ComProc
Write ComProc
}
type IStream struct {
vtbl *_IStreamVtbl
}
func (i *IStream) AddRef() error {
_, _, err := i.vtbl.AddRef.Call(uintptr(unsafe.Pointer(i)))
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) {
return err
}
return nil
}
func (i *IStream) Release() error {
_, _, err := i.vtbl.Release.Call(uintptr(unsafe.Pointer(i)))
if err != nil && !errors.Is(err, windows.ERROR_SUCCESS) {
return err
}
return nil
}
func (i *IStream) Read(p []byte) (int, error) {
bufLen := len(p)
if bufLen == 0 {
return 0, nil
}
var n int
hr, _, _ := i.vtbl.Read.Call(
uintptr(unsafe.Pointer(i)),
uintptr(unsafe.Pointer(&p[0])),
uintptr(bufLen),
uintptr(unsafe.Pointer(&n)),
)
switch windows.Handle(hr) {
case windows.S_OK:
// The buffer has been completely filled
return n, nil
case windows.S_FALSE:
// The buffer has been filled with less than len data and the stream is EOF
return n, io.EOF
default:
return 0, syscall.Errno(hr)
}
}