.github/workflows/build_binaries_android.yaml #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_binaries_android | |
# running locally in act | |
# act workflow_dispatch -W .github/workflows/build_binaries_android.yaml | |
on: [workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
android_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Install GCC | |
run: sudo apt install -y gcc g++ | |
- uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r25c | |
add-to-path: false | |
local-cache: true | |
- name: LS | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
run: | | |
ls -lah $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/ | |
# - name: Build for Android ARM | |
# env: | |
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
# run: | | |
# export CGO_ENABLED=1 | |
# export GOOS=android | |
# export GOARCH=arm | |
# export CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi21-clang | |
# go build -o dist/temphia_android_arm/temphia . | |
- name: Build for Android ARM64 | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
run: | | |
export CGO_ENABLED=1 | |
export GOOS=android | |
export GOARCH=arm64 | |
export CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang | |
go build -o dist/temphia_android_arm64/temphia . | |
# - name: Build for Android AMD64 | |
# env: | |
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
# run: | | |
# export CGO_ENABLED=1 | |
# export GOOS=android | |
# export GOARCH=amd64 | |
# go build -o dist/temphia_android_amd64/temphia . | |
# - name: Build for Android X86 | |
# env: | |
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
# run: | | |
# export CGO_ENABLED=1 | |
# export GOOS=android | |
# export GOARCH=386 | |
# export CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android21-clang | |
# go build -o dist/temphia_android_x86/temphia . | |
#artifacts | |
- name: save temphia_android_arm64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: temphia_android_arm64 | |
path: dist/temphia_android_arm64 |