diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6fd3b6..45ef000 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,7 +129,7 @@ libwebrtc-linux-amd64-magic: <<: *artifacts-template script: - *build_env_setup - - ./build.sh linux amd64 + - GOOS=linux GOARCH=amd64 ./build.sh libwebrtc-linux-arm-magic: only: @@ -142,7 +142,7 @@ libwebrtc-linux-arm-magic: script: - *build_env_setup - apt-get -qy install --no-install-recommends binutils-arm-linux-gnueabihf - - ./build.sh linux arm + - GOOS=linux GOARCH=arm ./build.sh android: image: golang:1.11-stretch @@ -157,19 +157,8 @@ android: - *build_env_setup - apt-get -qy install --no-install-recommends lsb-release sudo - export WEBRTC_SRC="$CI_PROJECT_DIR/third_party/webrtc/src" - # crazy workaround for the forced interactive license prompt for Play Services - - ./build.sh android arm || true - - cat third_party/webrtc/.gclient || true - - cat third_party/webrtc/.gclient_entries || true - export ANDROID_HOME=$WEBRTC_SRC/third_party/android_tools/sdk - - ls -l $WEBRTC_SRC/third_party || true # DELETEME - - printf 'y\ny\ny\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses - - echo y | $ANDROID_HOME/tools/bin/sdkmanager "extras;google;google_play_services" - - echo y | $ANDROID_HOME/tools/bin/sdkmanager "extras;google;m2repository" - - sed -i 's/^\( *\)\(if utils\.FileEquals(expected_license_path, actual_license_path):\)/\1return True\n\1\2/' $WEBRTC_SRC/build/android/play_services/update.py - - git -C $WEBRTC_SRC/build add android/play_services/update.py - - git -C $WEBRTC_SRC/build commit android/play_services/update.py -m "disable play license prompt" - - ./build.sh android arm + - GOOS=android GOARCH=arm ./build.sh - go get -u golang.org/x/mobile/cmd/gomobile - cd $GOPATH/src/golang.org/x/mobile/cmd/gomobile diff --git a/build.sh b/build.sh index 7c88767..90b0113 100755 --- a/build.sh +++ b/build.sh @@ -16,17 +16,11 @@ WEBRTC_REPO="https://chromium.googlesource.com/external/webrtc" WEBRTC_DIR="$THIRD_PARTY_DIR/webrtc" WEBRTC_SRC="$WEBRTC_DIR/src" DEPOT_TOOLS_DIR="$THIRD_PARTY_DIR/depot_tools" +OS=$(go env GOOS) +ARCH=$(go env GOARCH) CONFIG="Release" COMMIT="88f5d9180eae78a6162cccd78850ff416eb82483" # branch-heads/64 -if [ -z "$1" ]; then - OS=$(go env GOOS) - ARCH=$(go env GOARCH) -else - OS=$1 - ARCH=$2 -fi - # Values are from, # https://github.com/golang/go/blob/master/src/go/build/syslist.go # https://chromium.googlesource.com/chromium/src/+/64.0.3282.204/tools/gn/docs/reference.md