Add a new generic container registry client via a new `container` package. Use this to create a command line utility as well as a new upload target for container registries. The code uses the github.com/containers/* project and packages to interact with container registires that is also used by skopeo, podman et al. One if the dependencies is `proglottis/gpgme` that is using cgo to bind libgpgme, so we have to add the corresponding devel package to the BuildRequires as well as installing it on CI. Checks will follow later via an integration test.
40 lines
No EOL
1.3 KiB
YAML
40 lines
No EOL
1.3 KiB
YAML
---
|
|
version: 0.{build}
|
|
platform: x86
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
clone_folder: c:\gopath\src\github.com\proglottis\gpgme
|
|
|
|
environment:
|
|
GOPATH: c:\gopath
|
|
GOROOT: C:\go-x86
|
|
CGO_LDFLAGS: -LC:\gpg\lib
|
|
CGO_CFLAGS: -IC:\gpg\include
|
|
GPG_DIR: C:\gpg
|
|
|
|
install:
|
|
- nuget install 7ZipCLI -ExcludeVersion
|
|
- set PATH=%appveyor_build_folder%\7ZipCLI\tools;%PATH%
|
|
- appveyor DownloadFile https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.1.20_20170403.exe -FileName gnupg-w32-2.1.20_20170403.exe
|
|
- 7z x -o%GPG_DIR% gnupg-w32-2.1.20_20170403.exe
|
|
- copy "%GPG_DIR%\lib\libgpg-error.imp" "%GPG_DIR%\lib\libgpg-error.a"
|
|
- copy "%GPG_DIR%\lib\libassuan.imp" "%GPG_DIR%\lib\libassuan.a"
|
|
- copy "%GPG_DIR%\lib\libgpgme.imp" "%GPG_DIR%\lib\libgpgme.a"
|
|
- set PATH=%GOPATH%\bin;%GOROOT%\bin;%GPG_DIR%\bin;C:\MinGW\bin;%PATH%
|
|
- C:\cygwin\bin\sed -i 's/"GPG_AGENT_INFO"/"GPG_AGENT_INFO="/;s/C.unsetenv(v)/C.putenv(v)/' %APPVEYOR_BUILD_FOLDER%\gpgme.go
|
|
|
|
test_script:
|
|
- go test -v github.com/proglottis/gpgme
|
|
|
|
|
|
build_script:
|
|
- go build -o example_decrypt.exe -i %APPVEYOR_BUILD_FOLDER%\examples\decrypt.go
|
|
- go build -o example_encrypt.exe -i %APPVEYOR_BUILD_FOLDER%\examples\encrypt.go
|
|
|
|
artifacts:
|
|
- path: example_decrypt.exe
|
|
name: decrypt example binary
|
|
- path: example_encrypt.exe
|
|
name: encrypt example binary |