Skip to content

feat: Update go version #1365

feat: Update go version

feat: Update go version #1365

Workflow file for this run

name: Build
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
arch: [ x86_64c, armc, arm64c, x86_64n, x86_64a ]
os: [ ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.23'
# - name: Install Qemu
# if: ${{ matrix.arch != 'x86_64c' && matrix.arch != 'x86_64a' && matrix.arch != 'x86_64n'}}
# run: |
# sudo apt-get update
# sudo apt-get install -y qemu binfmt-support qemu-user-static
- name: Install Android SDK & NDK
if: ${{ matrix.arch == 'x86_64a' }}
run: |
mkdir android_sdk; cd android_sdk
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
unzip commandlinetools-linux-7583922_latest.zip
cd cmdline-tools; mkdir tools; mv bin/ tools/bin; mv lib/ tools/lib; cd tools/bin
echo y | ./sdkmanager "platform-tools" "platforms;android-28"
./sdkmanager --install "ndk;21.3.6528147"
cd ../../../
echo "$HOME/go/bin" >> $GITHUB_PATH
GO111MODULE=on go mod tidy
go mod download github.com/Azure/go-ansiterm
go get golang.org/x/mobile/cmd/gobind
go install golang.org/x/mobile/cmd/gomobile@858099ff7816818cadcc1811d602f42640d33bb5
export ANDROID_SDK=`pwd`
export ANDROID_HOME=`pwd`
echo "$ANDROID_SDK/cmdline-tools/tools:$ANDROID_SDK/platform-tools" >> $GITHUB_PATH
cd ndk/21.3.6528147
export ANDROID_NDK_HOME=`pwd`
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV
export PATH=$PATH:$ANDROID_NDK_HOME
echo "$ANDROID_NDK_HOME" >> $GITHUB_PATH
- name: Init "gomobile"
if: ${{ matrix.arch == 'x86_64a' }}
run: |
gomobile init
- name: Build
run: |
make distclean
make create_context CONFIGFILE=${{ matrix.arch }}
make