Skip to content

Bump actions/checkout from 3.5.3 to 4.1.0 #1119

Bump actions/checkout from 3.5.3 to 4.1.0

Bump actions/checkout from 3.5.3 to 4.1.0 #1119

Workflow file for this run

name: Build
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
arch: [x86c, x86_64c, armc, arm64c, x86_64n, x86_64a]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Setup Golang
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version: '1.19'
- 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