Skip to content

Commit a7b3885

Browse files
authored
Add Bazel 7 support and CI (#843)
This PR adds 7.1.0 as a tested version in CI. It additionally updates the README to specify the next release will officially support Bazel 7+ Depends on: - #848 - #847 - #850 Closes #795
1 parent 795191e commit a7b3885

File tree

10 files changed

+25
-22
lines changed

10 files changed

+25
-22
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.1.0

.bcr/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
matrix:
2-
bazel: ["6.x"]
2+
bazel: ["6.x", "7.x"]
33
tasks:
44
verify_build_targets:
55
name: Verify Build targets on macOS

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
name: Build and test (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }} / Virtual Frameworks ${{ matrix.virtual_frameworks }})
1919
runs-on: macos-14
2020
strategy:
21+
fail-fast: false
2122
matrix:
22-
bazel_version: [6.5.0]
23+
bazel_version: [6.5.0, 7.1.0]
2324
xcode_version: [15.2]
2425
virtual_frameworks: [true, false]
2526
env:
@@ -63,8 +64,9 @@ jobs:
6364
name: arm64 Simulator (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
6465
runs-on: macos-14
6566
strategy:
67+
fail-fast: false
6668
matrix:
67-
bazel_version: [6.5.0]
69+
bazel_version: [6.5.0, 7.1.0]
6870
xcode_version: [15.2]
6971
env:
7072
XCODE_VERSION: ${{ matrix.xcode_version }}
@@ -103,8 +105,9 @@ jobs:
103105
name: Buildifier and Documentation (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
104106
runs-on: macos-14
105107
strategy:
108+
fail-fast: false
106109
matrix:
107-
bazel_version: [6.5.0]
110+
bazel_version: [7.1.0] # Only run on latest Bazel version as stardoc changes between versions and produces different results
108111
xcode_version: [15.2]
109112
env:
110113
XCODE_VERSION: ${{ matrix.xcode_version }}
@@ -133,8 +136,9 @@ jobs:
133136
name: Legacy xcodeproj tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
134137
runs-on: macos-14
135138
strategy:
139+
fail-fast: false
136140
matrix:
137-
bazel_version: [6.5.0]
141+
bazel_version: [6.5.0] # Only test on a single Bazel version as fixtures require updates across Bazel verisons
138142
xcode_version: [15.2]
139143
env:
140144
XCODE_VERSION: ${{ matrix.xcode_version }}
@@ -155,8 +159,9 @@ jobs:
155159
name: LLDB tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
156160
runs-on: macos-14
157161
strategy:
162+
fail-fast: false
158163
matrix:
159-
bazel_version: [6.5.0]
164+
bazel_version: [6.5.0, 7.1.0]
160165
xcode_version: [15.2]
161166
env:
162167
XCODE_VERSION: ${{ matrix.xcode_version }}
@@ -184,8 +189,9 @@ jobs:
184189
name: iOS App Multiple Architectures (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
185190
runs-on: macos-14
186191
strategy:
192+
fail-fast: false
187193
matrix:
188-
bazel_version: [6.5.0]
194+
bazel_version: [6.5.0, 7.1.0]
189195
xcode_version: [15.2]
190196
env:
191197
XCODE_VERSION: ${{ matrix.xcode_version }}

MODULE.bazel

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ module(
99
version = "0",
1010
bazel_compatibility = [
1111
">=6.0.0",
12-
# Temporarily limit the usage of Bazel 7+ until
13-
# https://github.com/bazel-ios/rules_ios/issues/795
14-
# is complete.
15-
"<7.0.0",
1612
],
1713
compatibility_level = 1,
1814
repo_name = "build_bazel_rules_ios",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ See the following table for supported release versions.
3030

3131
| Bazel release | Minimum supported rules version | Final supported rules version
3232
|:-------------------:|:-------------------------:|:-------------------------:
33+
| 7.* | 4.4.0 | current
3334
| 6.* | 2.0.0 | current
3435
| 5.* | 1.0.0 | 3.2.2
3536
| 4.* | 1.0.0 | 1.0.0

docs/app_doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Builds and packages an iOS application.
2020
| :------------- | :------------- | :------------- |
2121
| <a id="ios_application-name"></a>name | The name of the iOS application. | none |
2222
| <a id="ios_application-families"></a>families | A list of iOS device families the target supports. | `["iphone", "ipad"]` |
23-
| <a id="ios_application-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
23+
| <a id="ios_application-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library from //rules:library.bzl>` |
2424
| <a id="ios_application-infoplists"></a>infoplists | A list of Info.plist files to be merged into the iOS app. | `[]` |
2525
| <a id="ios_application-infoplists_by_build_setting"></a>infoplists_by_build_setting | A dictionary of infoplists grouped by bazel build setting.<br><br>Each value is applied if the respective bazel build setting is resolved during the analysis phase.<br><br>If '//conditions:default' is not set the value in 'infoplists' is set as default. | `{}` |
2626
| <a id="ios_application-xcconfig"></a>xcconfig | A dictionary of xcconfigs to be applied to the iOS app by default. | `{}` |

docs/framework_doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Builds and packages an Apple framework.
6161
| Name | Description | Default Value |
6262
| :------------- | :------------- | :------------- |
6363
| <a id="apple_framework-name"></a>name | The name of the framework. | none |
64-
| <a id="apple_framework-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
64+
| <a id="apple_framework-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library from //rules:library.bzl>` |
6565
| <a id="apple_framework-infoplists"></a>infoplists | A list of Info.plist files to be merged into the framework. | `[]` |
6666
| <a id="apple_framework-infoplists_by_build_setting"></a>infoplists_by_build_setting | A dictionary of infoplists grouped by bazel build setting.<br><br>Each value is applied if the respective bazel build setting is resolved during the analysis phase.<br><br>If '//conditions:default' is not set the value in 'infoplists' is set as default. | `{}` |
6767
| <a id="apple_framework-xcconfig"></a>xcconfig | A dictionary of xcconfigs to be applied to the framework by default. | `{}` |

docs/import_middleman_doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ can be updated to work without the other behavior
4242
| <a id="import_middleman-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
4343
| <a id="import_middleman-deps"></a>deps | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
4444
| <a id="import_middleman-test_deps"></a>test_deps | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
45-
| <a id="import_middleman-update_in_place"></a>update_in_place | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `//tools/m1_utils:update_in_place` |
45+
| <a id="import_middleman-update_in_place"></a>update_in_place | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@rules_ios//tools/m1_utils:update_in_place"` |
4646

4747

4848
<a id="find_imports"></a>

docs/library_doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Extends a modulemap with a Swift submodule
1818
| Name | Description | Type | Mandatory | Default |
1919
| :------------- | :------------- | :------------- | :------------- | :------------- |
2020
| <a id="extend_modulemap-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
21-
| <a id="extend_modulemap-destination"></a>destination | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | |
21+
| <a id="extend_modulemap-destination"></a>destination | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
2222
| <a id="extend_modulemap-module_name"></a>module_name | - | String | required | |
2323
| <a id="extend_modulemap-source"></a>source | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
2424
| <a id="extend_modulemap-swift_header"></a>swift_header | - | String | optional | `""` |

docs/test_doc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ Builds and packages iOS UI Tests.
145145
| Name | Description | Default Value |
146146
| :------------- | :------------- | :------------- |
147147
| <a id="ios_ui_test-name"></a>name | The name of the UI test. | none |
148-
| <a id="ios_ui_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
149-
| <a id="ios_ui_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split>, make_runner_split = <function _make_runner_split>, make_test = <function _make_test>, make_test_suite = <function _make_test_suite>, make_test_suite_splits = <function _make_test_suite_splits>, make_tests = <function _make_tests>)` |
148+
| <a id="ios_ui_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library from //rules:library.bzl>` |
149+
| <a id="ios_ui_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split from //rules:test.bzl>, make_runner_split = <function _make_runner_split from //rules:test.bzl>, make_test = <function _make_test from //rules:test.bzl>, make_test_suite = <function _make_test_suite from //rules:test.bzl>, make_test_suite_splits = <function _make_test_suite_splits from //rules:test.bzl>, make_tests = <function _make_tests from //rules:test.bzl>)` |
150150
| <a id="ios_ui_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_ui_test rules as appropriate. | none |
151151

152152

@@ -166,8 +166,8 @@ Builds and packages iOS Unit Snapshot Tests.
166166
| Name | Description | Default Value |
167167
| :------------- | :------------- | :------------- |
168168
| <a id="ios_unit_snapshot_test-name"></a>name | The name of the UI test. | none |
169-
| <a id="ios_unit_snapshot_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
170-
| <a id="ios_unit_snapshot_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split>, make_runner_split = <function _make_runner_split>, make_test = <function _make_test>, make_test_suite = <function _make_test_suite>, make_test_suite_splits = <function _make_test_suite_splits>, make_tests = <function _make_tests>)` |
169+
| <a id="ios_unit_snapshot_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library from //rules:library.bzl>` |
170+
| <a id="ios_unit_snapshot_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split from //rules:test.bzl>, make_runner_split = <function _make_runner_split from //rules:test.bzl>, make_test = <function _make_test from //rules:test.bzl>, make_test_suite = <function _make_test_suite from //rules:test.bzl>, make_test_suite_splits = <function _make_test_suite_splits from //rules:test.bzl>, make_tests = <function _make_tests from //rules:test.bzl>)` |
171171
| <a id="ios_unit_snapshot_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_unit_test rules as appropriate. | none |
172172

173173

@@ -187,8 +187,8 @@ Builds and packages iOS Unit Tests.
187187
| Name | Description | Default Value |
188188
| :------------- | :------------- | :------------- |
189189
| <a id="ios_unit_test-name"></a>name | The name of the unit test. | none |
190-
| <a id="ios_unit_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
191-
| <a id="ios_unit_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split>, make_runner_split = <function _make_runner_split>, make_test = <function _make_test>, make_test_suite = <function _make_test_suite>, make_test_suite_splits = <function _make_test_suite_splits>, make_tests = <function _make_tests>)` |
190+
| <a id="ios_unit_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library from //rules:library.bzl>` |
191+
| <a id="ios_unit_test-test_factory"></a>test_factory | Use this to generate other variations of tests. | `struct(make_named_split = <function _make_named_split from //rules:test.bzl>, make_runner_split = <function _make_runner_split from //rules:test.bzl>, make_test = <function _make_test from //rules:test.bzl>, make_test_suite = <function _make_test_suite from //rules:test.bzl>, make_test_suite_splits = <function _make_test_suite_splits from //rules:test.bzl>, make_tests = <function _make_tests from //rules:test.bzl>)` |
192192
| <a id="ios_unit_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_unit_test rules as appropriate. | none |
193193

194194

0 commit comments

Comments
 (0)