Skip to content

Commit

Permalink
Use build_test rule to test builds
Browse files Browse the repository at this point in the history
  • Loading branch information
thii committed Mar 1, 2021
1 parent 0ffc2a9 commit 12808d0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

build --strategy=Stardoc=standalone
common --subcommands

build --strategy=Stardoc=local

build --incompatible_objc_compile_info_migration
build --incompatible_strict_action_env
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: sudo xcode-select -s /Applications/Xcode_12.4.app
- name: Build
run: bazelisk build --subcommands //examples/ios/PureSwift:PureSwiftFramework //examples/ios/PureObjC:PureObjCFramework //examples/ios/Mixed:MixedFramework //examples/ios/App
- name: Package dSYM
run: bazelisk build --subcommands --apple_generate_dsym --output_groups=+dsyms //examples/ios/App:App_dSYM
- name: Test
run: bazelisk test //test/...
- name: Test Package dSYM
run: bazelisk test --apple_generate_dsym --output_groups=+dsyms //test:pkg_dsym_build_test
buildifier:
name: Run Buildifier and Verify Documentation Generation
runs-on: macOS-latest
Expand Down
1 change: 1 addition & 0 deletions examples/ios/App/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ pkg_dsym(
"//examples/ios/App/WatchKitExtension",
],
out = "App.dSYM.zip",
visibility = ["//visibility:public"],
)
19 changes: 19 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")

build_test(
name = "examples_build_test",
targets = [
"//examples/ios/App",
"//examples/ios/Mixed:MixedFramework",
"//examples/ios/PureObjC:PureObjCFramework",
"//examples/ios/PureSwift:PureSwiftFramework",
],
)

build_test(
name = "pkg_dsym_build_test",
tags = ["manual"],
targets = [
"//examples/ios/App:App_dSYM",
],
)

0 comments on commit 12808d0

Please sign in to comment.