Skip to content

Commit

Permalink
Streamline CI config settings
Browse files Browse the repository at this point in the history
Configure bazelrc in the `preflight_env.sh` script

Ensure we enable existing remote cache on github actions
  • Loading branch information
jerrymarino committed Aug 1, 2023
1 parent 39eb266 commit e09a3d5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
24 changes: 11 additions & 13 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 \
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit e09a3d5

Please sign in to comment.