From b1a1cb13939f14467dbaf8f2f667e3257d123482 Mon Sep 17 00:00:00 2001 From: A1shK <129784222+A1shK@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:45:13 -0400 Subject: [PATCH 1/8] Update WORKSPACE --- WORKSPACE | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index d98cea041..5da464bdb 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -22,17 +22,18 @@ git_repository( remote = "https://github.com/sugarmanz/rules_jvm_external", ) -git_repository( - name = "rules_player", - branch = "maven-export-distribution", - remote = "https://github.com/player-ui/rules_player", +http_archive( + name = "rules_player", + strip_prefix = "rules_player-0.12.0", + urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v0.12.0.tar.gz"], + sha256 = "44dd1cd289166f7ccb7932e88f4fb71446132fe247c1caf1a2e59ffe3344ffcc" ) load("@rules_player//:workspace.bzl", "deps") -deps() +deps(android_api_version = 31) -load("@rules_player//:conf.bzl", "apple", "javascript", "kotlin") +load("@rules_player//:conf.bzl", "apple", "javascript") ##################### # Yarn Dependencies # @@ -74,7 +75,6 @@ pod_install( ###################### # Kotlin Setup # ###################### -kotlin() load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains") @@ -89,7 +89,7 @@ junit5() ###################### grab_remote = "https://github.com/sugarmanz/grab-bazel-common.git" -grab_commit = "35317b3d1c0da07b42af6e6a2137ebdec0ffe400" +grab_commit = "d1d4b28bab4bdc2810dfdfdf38a83d71a3eb36d4" git_repository( name = "grab_bazel_common", @@ -145,7 +145,10 @@ overridden_targets = { "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm": "@//android/demo:kotlinx_coroutines_core_jvm_fixed", } -android_ndk_repository(name = "androidndk") +android_ndk_repository( + name = "androidndk", + api_level=21 +) register_toolchains("@androidndk//:all") From 7cf511466c955083b32381de23cb55967b296c72 Mon Sep 17 00:00:00 2001 From: A1shK <129784222+A1shK@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:45:33 -0400 Subject: [PATCH 2/8] Update config.yml --- .circleci/config.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b2d11948..027213e92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ orbs: executors: base: docker: - - image: docker.io/playerui/bazel-docker + - image: docker.io/playerui/bazel-docker:8 working_directory: ~/player resource_class: xlarge environment: @@ -30,7 +30,7 @@ executors: TZ: "/usr/share/zoneinfo/America/Los_Angeles" android: machine: - image: android:202102-01 + image: android:2024.04.1 working_directory: ~/player resource_class: large environment: @@ -96,7 +96,7 @@ jobs: - attach_workspace: at: ~/player - - run: bazel build --config=ci --config=skip-ios -- //... + - run: bazel build --config=ci --config=d8 --config=skip-ios -- //... - save_cache: paths: @@ -200,7 +200,7 @@ jobs: - attach_workspace: at: ~/player - - run: bazel test --config=skip-ios --config=ci -- //... -//docs/site -//android/demo:android_instrumentation_test + - run: bazel test --config=skip-ios --config=ci --config=d8 -- //... -//docs/site -//android/demo:android_instrumentation_test - run: when: always @@ -233,10 +233,22 @@ jobs: sudo ln -s /opt/bazelisk-v1.11.0/bazelisk /usr/local/bin/bazel - run: - name: Create avd + name: Install Android tools + command: | + rm -rf $ANDROID_HOME/build-tools/* + JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 \ + $ANDROID_HOME/tools/bin/sdkmanager "build-tools;30.0.3"\ + "ndk;21.4.7075529" \ + "system-images;android-31;default;x86_64" + echo "export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/21.4.7075529" >> $BASH_ENV + source $BASH_ENV + echo "no" | avdmanager --verbose create avd -n test -k "system-images;android-31;default;x86_64" -g default + source $BASH_ENV + + - run: + name: Set python to 2.7 command: | - sdkmanager "system-images;android-29;default;x86" - echo "no" | avdmanager --verbose create avd -n test -k "system-images;android-29;default;x86" + pyenv global 2.7 - run: name: Launch emulator @@ -249,7 +261,7 @@ jobs: command: | circle-android wait-for-boot - - run: bazel test --config=ci -- //android/demo:android_instrumentation_test + - run: bazel test --config=ci --config=d8 -- //android/demo:android_instrumentation_test - run: when: always From 46ecd6e6c4098cd722424d630372d90fd0650711 Mon Sep 17 00:00:00 2001 From: A1shK <129784222+A1shK@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:51:10 -0400 Subject: [PATCH 3/8] Update config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 027213e92..96443b979 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,7 +96,7 @@ jobs: - attach_workspace: at: ~/player - - run: bazel build --config=ci --config=d8 --config=skip-ios -- //... + - run: bazel build --config=ci --config=skip-ios -- //... - save_cache: paths: @@ -200,7 +200,7 @@ jobs: - attach_workspace: at: ~/player - - run: bazel test --config=skip-ios --config=ci --config=d8 -- //... -//docs/site -//android/demo:android_instrumentation_test + - run: bazel test --config=skip-ios --config=ci -- //... -//docs/site -//android/demo:android_instrumentation_test - run: when: always @@ -261,7 +261,7 @@ jobs: command: | circle-android wait-for-boot - - run: bazel test --config=ci --config=d8 -- //android/demo:android_instrumentation_test + - run: bazel test --config=ci -- //android/demo:android_instrumentation_test - run: when: always From 71a82c984778b30dc10623133130a55d3c5ad8d4 Mon Sep 17 00:00:00 2001 From: A1shK <129784222+A1shK@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:53:54 -0400 Subject: [PATCH 4/8] Update WORKSPACE --- WORKSPACE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 5da464bdb..e073f4c73 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -33,7 +33,7 @@ load("@rules_player//:workspace.bzl", "deps") deps(android_api_version = 31) -load("@rules_player//:conf.bzl", "apple", "javascript") +load("@rules_player//:conf.bzl", "apple", "javascript", "kotlin") ##################### # Yarn Dependencies # @@ -75,6 +75,7 @@ pod_install( ###################### # Kotlin Setup # ###################### +kotlin() load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains") From 9d99f2c6e021f672e0ab72eb41b033376aab9ec4 Mon Sep 17 00:00:00 2001 From: A1shK <129784222+A1shK@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:14:11 -0400 Subject: [PATCH 5/8] Update install-android-tools.sh --- scripts/install-android-tools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-android-tools.sh b/scripts/install-android-tools.sh index 0f28ec88a..cd6464abc 100755 --- a/scripts/install-android-tools.sh +++ b/scripts/install-android-tools.sh @@ -41,7 +41,7 @@ accept_license_of() { } ANDROID_SDK_VERSION=4333796 -ANDROID_VERSION=29 +ANDROID_VERSION=31 ANDROID_BUILD_TOOLS_VERSION=30.0.0 ANDROID_NDK_VERSION=21.4.7075529 From 2c502caf55c4353607d4a2d240bdaeb1db71497b Mon Sep 17 00:00:00 2001 From: nancywu1 Date: Fri, 28 Jun 2024 10:35:18 -0400 Subject: [PATCH 6/8] get ios building --- .circleci/config.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 96443b979..465ee3832 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ executors: TZ: "/usr/share/zoneinfo/America/Los_Angeles" ios: working_directory: ~/player - resource_class: macos.x86.medium.gen2 + resource_class: macos.m1.medium.gen1 macos: xcode: 14.3 environment: @@ -43,6 +43,8 @@ commands: - attach_workspace: at: ~/player + - macos/install-rosetta + - restore_cache: keys: - v1-bazel-cache-core-{{ .Branch }}-{{ .Revision }} @@ -117,7 +119,14 @@ jobs: - run: name: Homebrew Dependencies command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install bazelisk maven openjdk@8 + echo "A" | softwareupdate --install-rosetta + - run: + shell: env /usr/bin/arch -x86_64 /bin/bash --login -eo pipefail + command: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + - run: + command: | + HOMEBREW_NO_AUTO_UPDATE=1 arch -x86_64 /usr/local/bin/brew install bazelisk maven openjdk@8 - run: name: Set Ruby Version @@ -157,7 +166,10 @@ jobs: - gem-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - gem-v1-{{ arch }}-main-{{ checksum "Gemfile.lock" }} - - run: bundle install + - run: + command: | + bundle config build.nokogiri --use-system-libraries + bundle install - save_cache: key: gem-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} From 467a17cec481eab510192c49af2f3f2c7e9610dc Mon Sep 17 00:00:00 2001 From: nancywu1 Date: Fri, 28 Jun 2024 11:04:45 -0400 Subject: [PATCH 7/8] install rosetta in right place --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 465ee3832..eb8f8f0d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,9 +42,6 @@ commands: steps: - attach_workspace: at: ~/player - - - macos/install-rosetta - - restore_cache: keys: - v1-bazel-cache-core-{{ .Branch }}-{{ .Revision }} @@ -116,10 +113,10 @@ jobs: - attach_workspace: at: ~/player + - macos/install-rosetta + - run: name: Homebrew Dependencies - command: | - echo "A" | softwareupdate --install-rosetta - run: shell: env /usr/bin/arch -x86_64 /bin/bash --login -eo pipefail command: | From 2712a73b0bfe93c278364f19d64cff467a6beab9 Mon Sep 17 00:00:00 2001 From: nancywu1 Date: Fri, 28 Jun 2024 11:23:59 -0400 Subject: [PATCH 8/8] fix error --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb8f8f0d8..89aedac4c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -117,7 +117,6 @@ jobs: - run: name: Homebrew Dependencies - - run: shell: env /usr/bin/arch -x86_64 /bin/bash --login -eo pipefail command: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"