Skip to content

Commit

Permalink
Add Bazel 7 support and CI (#843)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
luispadron authored Apr 18, 2024
1 parent 795191e commit a7b3885
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.1.0
2 changes: 1 addition & 1 deletion .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matrix:
bazel: ["6.x"]
bazel: ["6.x", "7.x"]
tasks:
verify_build_targets:
name: Verify Build targets on macOS
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
name: Build and test (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }} / Virtual Frameworks ${{ matrix.virtual_frameworks }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
virtual_frameworks: [true, false]
env:
Expand Down Expand Up @@ -63,8 +64,9 @@ jobs:
name: arm64 Simulator (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down Expand Up @@ -103,8 +105,9 @@ jobs:
name: Buildifier and Documentation (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [7.1.0] # Only run on latest Bazel version as stardoc changes between versions and produces different results
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down Expand Up @@ -133,8 +136,9 @@ jobs:
name: Legacy xcodeproj tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [6.5.0] # Only test on a single Bazel version as fixtures require updates across Bazel verisons
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand All @@ -155,8 +159,9 @@ jobs:
name: LLDB tests (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down Expand Up @@ -184,8 +189,9 @@ jobs:
name: iOS App Multiple Architectures (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0]
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
Expand Down
4 changes: 0 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ module(
version = "0",
bazel_compatibility = [
">=6.0.0",
# Temporarily limit the usage of Bazel 7+ until
# https://github.com/bazel-ios/rules_ios/issues/795
# is complete.
"<7.0.0",
],
compatibility_level = 1,
repo_name = "build_bazel_rules_ios",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ See the following table for supported release versions.

| Bazel release | Minimum supported rules version | Final supported rules version
|:-------------------:|:-------------------------:|:-------------------------:
| 7.* | 4.4.0 | current
| 6.* | 2.0.0 | current
| 5.* | 1.0.0 | 3.2.2
| 4.* | 1.0.0 | 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/app_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Builds and packages an iOS application.
| :------------- | :------------- | :------------- |
| <a id="ios_application-name"></a>name | The name of the iOS application. | none |
| <a id="ios_application-families"></a>families | A list of iOS device families the target supports. | `["iphone", "ipad"]` |
| <a id="ios_application-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
| <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>` |
| <a id="ios_application-infoplists"></a>infoplists | A list of Info.plist files to be merged into the iOS app. | `[]` |
| <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. | `{}` |
| <a id="ios_application-xcconfig"></a>xcconfig | A dictionary of xcconfigs to be applied to the iOS app by default. | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion docs/framework_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Builds and packages an Apple framework.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="apple_framework-name"></a>name | The name of the framework. | none |
| <a id="apple_framework-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
| <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>` |
| <a id="apple_framework-infoplists"></a>infoplists | A list of Info.plist files to be merged into the framework. | `[]` |
| <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. | `{}` |
| <a id="apple_framework-xcconfig"></a>xcconfig | A dictionary of xcconfigs to be applied to the framework by default. | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion docs/import_middleman_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ can be updated to work without the other behavior
| <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 | |
| <a id="import_middleman-deps"></a>deps | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="import_middleman-test_deps"></a>test_deps | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <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` |
| <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"` |


<a id="find_imports"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/library_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Extends a modulemap with a Swift submodule
| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <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 | |
| <a id="extend_modulemap-destination"></a>destination | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | |
| <a id="extend_modulemap-destination"></a>destination | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="extend_modulemap-module_name"></a>module_name | - | String | required | |
| <a id="extend_modulemap-source"></a>source | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="extend_modulemap-swift_header"></a>swift_header | - | String | optional | `""` |
Expand Down
12 changes: 6 additions & 6 deletions docs/test_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ Builds and packages iOS UI Tests.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="ios_ui_test-name"></a>name | The name of the UI test. | none |
| <a id="ios_ui_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
| <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>)` |
| <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>` |
| <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>)` |
| <a id="ios_ui_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_ui_test rules as appropriate. | none |


Expand All @@ -166,8 +166,8 @@ Builds and packages iOS Unit Snapshot Tests.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="ios_unit_snapshot_test-name"></a>name | The name of the UI test. | none |
| <a id="ios_unit_snapshot_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
| <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>)` |
| <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>` |
| <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>)` |
| <a id="ios_unit_snapshot_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_unit_test rules as appropriate. | none |


Expand All @@ -187,8 +187,8 @@ Builds and packages iOS Unit Tests.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="ios_unit_test-name"></a>name | The name of the unit test. | none |
| <a id="ios_unit_test-apple_library"></a>apple_library | The macro used to package sources into a library. | `<function apple_library>` |
| <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>)` |
| <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>` |
| <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>)` |
| <a id="ios_unit_test-kwargs"></a>kwargs | Arguments passed to the apple_library and ios_unit_test rules as appropriate. | none |


0 comments on commit a7b3885

Please sign in to comment.