Skip to content

Commit

Permalink
Add CI sandbox mode
Browse files Browse the repository at this point in the history
fix redefinition of enum
  • Loading branch information
gyfelton committed Aug 20, 2024
1 parent 7b16cda commit 2d69588
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
common --enable_bzlmod

# Spawn strategy required for some tests
build --spawn_strategy=standalone
build --spawn_strategy=local

# Setup Xcode configuration.
build --xcode_version_config=//:host_xcodes
Expand Down Expand Up @@ -62,6 +62,14 @@ build:remote_cache --noslim_profile
build:remote_cache --remote_cache=grpcs://remote.buildbuddy.io
build:remote_cache --remote_timeout=3600

build:sandboxed --strategy=SwiftCompile=sandboxed
build:sandboxed --spawn_strategy=sandboxed
build:sandboxed --strategy=Genrule=sandboxed,local
build:sandboxed --strategy=StoryboardCompile=sandboxed,local
build:sandboxed --strategy=CleaningFramework=sandboxed,local
build:sandboxed --strategy=StoryboardLink=sandboxed,local
build:sandboxed --strategy=ProcessAndSign=sandboxed,local

# By default don't upload local results to remote cache, only CI does this.
build --noremote_upload_local_results
build:ci --remote_upload_local_results
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ concurrency:
# when adding a new job / changing the matrix, make sure to update all jobs
jobs:
integration_tests:
name: Build and test (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }} / Virtual Frameworks ${{ matrix.virtual_frameworks }})
name: Build and test (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }} / Virtual Frameworks ${{ matrix.virtual_frameworks }}) / Sandbox ${{ matrix.sandbox }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
bazel_version: [6.5.0, 7.1.0]
xcode_version: [15.2]
virtual_frameworks: [true, false]
sandbox: [true, false]
env:
XCODE_VERSION: ${{ matrix.xcode_version }}
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
Expand All @@ -34,6 +35,10 @@ jobs:
name: Add vfs config
run: |
echo "build --config=vfs" >> user.bazelrc
- if: matrix.sandbox
name: Enable sandbox mode
run: |
echo "build --config=sandboxed" >> user.bazelrcc
- name: Build and Test
run: |
# non-iOS tests
Expand Down
2 changes: 0 additions & 2 deletions rules/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,6 @@ def apple_library(
generated_swift_header_name = module_name + "-Swift.h"

if module_map:
# TODO: now that we always add module_map as a swiftc_input,
# we should consider removing this one if it's not needed
extend_modulemap(
name = module_map + ".extended." + name,
destination = "%s.extended.modulemap" % name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#import <TestImports-Unit-Tests/testhelper.h>
#import <TestImports-App/Header2.h>
2 changes: 1 addition & 1 deletion tests/ios/unit-test/test-imports-app/test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ class SwiftTests : XCTestCase {
func testPasses() {
_ = EmptyStruct()
XCTAssertTrue(true)
XCTAssertEqual(TestHelper.createString(), "ObjcTestHelperString_EnumValue=1")
XCTAssertEqual(TestHelper.createString(), "ObjcTestHelperString_EnumValue=\(AppErrorCode.unknown.rawValue)")
}
}

0 comments on commit 2d69588

Please sign in to comment.