diff --git a/.bazelrc b/.bazelrc index 4eb09cb9c..35b6f4b8f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -54,19 +54,17 @@ build:ios_multi_arch_test --ios_minimum_os=10.2 build:ios_multi_arch_test --ios_multi_cpus=i386,x86_64 # - Remote cache configuration -build:remote_cache --bes_backend=grpcs://remote.buildbuddy.io -build:remote_cache --bes_results_url=https://app.buildbuddy.io/invocation/ -build:remote_cache --experimental_build_event_upload_strategy=local -build:remote_cache --experimental_remote_cache_compression -build:remote_cache --experimental_remote_merkle_tree_cache -build:remote_cache --modify_execution_info=^(BitcodeSymbolsCopy|BundleApp|BundleTreeApp|DsymDwarf|DsymLipo|GenerateAppleSymbolsFile|ObjcBinarySymbolStrip|CppLink|ObjcLink|ProcessAndSign|SignBinary|SwiftArchive|SwiftStdlibCopy)$=+no-remote,^(BundleResources|ImportedDynamicFrameworkProcessor)$=+no-remote-exec -build:remote_cache --nolegacy_important_outputs -build:remote_cache --noslim_profile -build:remote_cache --remote_cache=grpcs://remote.buildbuddy.io -build:remote_cache --remote_timeout=3600 - -# Enable remote_cache config by default -build --config=remote_cache +build:ci_remote_cache --bes_backend=grpcs://remote.buildbuddy.io +build:ci_remote_cache --bes_results_url=https://app.buildbuddy.io/invocation/ +build:ci_remote_cache --experimental_build_event_upload_strategy=local +build:ci_remote_cache --experimental_remote_cache_compression +build:ci_remote_cache --experimental_remote_merkle_tree_cache +build:ci_remote_cache --modify_execution_info=^(BitcodeSymbolsCopy|BundleApp|BundleTreeApp|DsymDwarf|DsymLipo|GenerateAppleSymbolsFile|ObjcBinarySymbolStrip|CppLink|ObjcLink|ProcessAndSign|SignBinary|SwiftArchive|SwiftStdlibCopy)$=+no-remote,^(BundleResources|ImportedDynamicFrameworkProcessor)$=+no-remote-exec +build:ci_remote_cache --nolegacy_important_outputs +build:ci_remote_cache --noslim_profile +build:ci_remote_cache --remote_cache=grpcs://remote.buildbuddy.io +build:ci_remote_cache --remote_timeout=3600 + # By default don't upload local results to remote cache, only CI does this. build --noremote_upload_local_results diff --git a/.github/workflows/xcode_select.sh b/.github/workflows/preflight_env.sh similarity index 67% rename from .github/workflows/xcode_select.sh rename to .github/workflows/preflight_env.sh index 2fcf5e55a..977d6c6fd 100755 --- a/.github/workflows/xcode_select.sh +++ b/.github/workflows/preflight_env.sh @@ -6,3 +6,7 @@ printenv sudo xcode-select -p sudo xcode-select -s /Applications/Xcode_14.2.app + +cat << EOF > $HOME/.bazelrc +build:ci --config=ci_remote_cache +EOF diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c55f9064d..7546405c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,8 +17,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Build and Test run: | # non-iOS tests @@ -56,8 +56,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Build and Test run: | # non-iOS tests @@ -89,8 +89,8 @@ jobs: USE_BAZEL_VERSION: 5.3.2 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Build and Test run: | # iOS tests @@ -112,8 +112,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Build and Test run: | bazelisk build \ @@ -146,8 +146,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh # Note: we need to pass the absolute to the Bazel run - name: buildifier run: | @@ -165,8 +165,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode 14.2.0 - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Run tests run: ./tests/xcodeproj-tests.sh --run && ./tests/test-tests.sh - uses: actions/upload-artifact@v2 @@ -180,8 +180,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode 14.2.0 - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Run tests run: | bazelisk test \ @@ -202,8 +202,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - name: Select Xcode - run: .github/workflows/xcode_select.sh + - name: Preflight Env + run: .github/workflows/preflight_env.sh - name: Build App run: | bazelisk build \