Skip to content

Commit

Permalink
wip: workaround for iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Jun 18, 2023
1 parent c2c5114 commit 828786b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,21 @@ jobs:
- name: Install NumPy
run: pip install --no-cache-dir --user numpy

- name: Build bazel to circumvent a compile error
run: |
mkdir bin
git clone https://github.com/bazelbuild/bazel.git
cd bazel
git checkout 6.1.1
git apply ../third_party/bazel_ios_workaround.diff
bazel build --java_runtime_version=remotejdk_11 //src:bazel
cp bazel-bin/src/bazel ../bin
cd ..
echo "bin" >> $GITHUB_PATH
- name: Build MediaPipeUnity.framework
run: |
echo $PATH
unset ANDROID_NDK_HOME
sed -i -e 's/PLEASE_SET_YOUR_BUNDLE_ID_HERE/com.github.homuler.mediapipe.unity/g' mediapipe_api/objc/BUILD
python build.py build --bazel_build_opts="${{ inputs.bazelBuildArgs }}" ${{ inputs.iosBuildArgs }} -vv
Expand Down
13 changes: 13 additions & 0 deletions third_party/bazel_ios_workaround.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ExecutionTransitionFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ExecutionTransitionFactory.java
index a4559c333d..ca8c15148f 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/ExecutionTransitionFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ExecutionTransitionFactory.java
@@ -126,7 +126,7 @@ public class ExecutionTransitionFactory

// Then unset isHost.
CoreOptions coreOptions = checkNotNull(execOptions.get(CoreOptions.class));
- coreOptions.isHost = false;
+ coreOptions.isHost = true;
coreOptions.isExec = true;
// Disable extra actions
coreOptions.actionListeners = ImmutableList.of();

0 comments on commit 828786b

Please sign in to comment.