go-cross-compile/README.md

36 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2024-03-03 19:06:39 +00:00
# Open Privacy's Go Cross Compile Container
2018-07-14 14:19:51 +00:00
2024-03-03 19:06:39 +00:00
Dockerfiles @ [git.openprivacy.ca/openprivacy/go-cross-compile](https://git.openprivacy.ca/openprivacy/go-cross-compile)
2021-11-17 02:15:38 +00:00
2018-07-17 14:32:04 +00:00
This image was built for use with Drone CI but can be used with any docker setup you want.
Versions are:
2024-03-03 19:06:39 +00:00
- 2024.02
2024-01-03 00:07:02 +00:00
- Go 1.21.5
2024-03-05 07:38:09 +00:00
- glibc 2.31 from Debian Bullseye
2024-01-03 00:07:02 +00:00
- Android API 31
2024-03-03 19:06:39 +00:00
- NDK 22.1.7171670
- arm8 gcc cross compiler
- mingw windows cross compiler
## Install and Use
2024-03-03 19:06:39 +00:00
### Version 2024.02
2018-07-17 14:32:04 +00:00
This image includes:
2024-03-03 19:06:39 +00:00
- Android SDK, NDK, tools, and API version 31 and Buildtools 30.0.2 at `/usr/local/android-sdk`
- Go lang at `/usr/local/go`
2021-03-23 01:32:05 +00:00
- $GOPATH set to `/gomobile`
- GOPATH includes gomobile cmd tools and source
2018-07-17 14:32:04 +00:00
2021-03-23 01:32:05 +00:00
This container has its own GOPATH with only gomobile in it, so to use, you'll need to re-get your go dependancies and then run `gomobile init`. The following example shows a Drone CI step using this image
2018-07-17 14:32:04 +00:00
2021-03-23 01:32:05 +00:00
gomobile-build:
2024-03-03 19:06:39 +00:00
image: openpriv/go-cross-compile:2024.02
2018-07-14 14:19:51 +00:00
commands:
2021-03-23 01:32:05 +00:00
- go mod download
2021-03-23 18:51:00 +00:00
- gomobile init
- make