Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI tests for latest rules_swift and rules_apple #899

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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 }}) / Sandbox ${{ matrix.sandbox }}
name: Build and test (Bazel ${{ matrix.bazel_version }} / Xcode ${{ matrix.xcode_version }} / VFS ${{ matrix.virtual_frameworks }} / Sandbox ${{ matrix.sandbox }} / Latest rules ${{ matrix.latest_rules }})
runs-on: macos-14
strategy:
fail-fast: false
Expand All @@ -24,9 +24,13 @@ jobs:
xcode_version: [15.2]
virtual_frameworks: [true, false]
sandbox: [true, false]
latest_rules: [true, false]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can consider adding exclude here for the known not working combo so that we don't even bother running it until we fixed the underlying issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to run it so that any future PRs can ensure thats green if they intended to fix the issue. I just wont mark it required in github so it wont block merges, thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that sounds reasonable. Looks like the latest rules don't work with bazel 6.5

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They also dont work in bazel 7 with vfs turned off

env:
XCODE_VERSION: ${{ matrix.xcode_version }}
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
LATEST_RULES_SWIFT_VERSION: 2.1.1
LATEST_RULES_APPLE_VERSION: 3.8.0
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Preflight Env
Expand All @@ -39,8 +43,18 @@ jobs:
name: Enable sandbox mode
run: |
echo "build --config=sandboxed" >> user.bazelrcc
- if: matrix.latest_rules
name: Use latest rules
run: |
gh repo clone bazelbuild/rules_swift /tmp/rules_swift -- --branch "${{ env.LATEST_RULES_SWIFT_VERSION }}" --depth=1
echo "common --override_module=rules_swift=/tmp/rules_swift" >> user.bazelrc
gh repo clone bazelbuild/rules_apple /tmp/rules_apple -- --branch "${{ env.LATEST_RULES_APPLE_VERSION }}" --depth=1
echo "common --override_module=rules_apple=/tmp/rules_apple" >> user.bazelrc
- name: Build and Test
run: |
echo "Running with config:"
cat user.bazelrc

# non-iOS tests
bazelisk test \
-- \
Expand Down
Loading