Skip to content

build: Add scripts to build and test using Xcode #2335

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

Merged
merged 2 commits into from
Oct 24, 2019

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jun 12, 2019

  • xcode-build.sh builds and optionally tests SwiftFoundation.
    usage: ./xcode-build.sh [--clean] [--test]

  • DarwinCompatibilityTests/xcode-build.sh builds and tests using
    the DarwinCompatibilityTests.
    usage: DarwinCompatibilityTests/xcode-build.sh [--clean]

This adds two shell scripts for building/testing scl-foundation using Xcode as a check that changes don't break the Xcode builds for TestFoundation and DarwinCompatibilityTests. A recent toolchain snapshot is required. The idea is that both scripts could be hooked up to swift-ci test commands to enable extra CI testing. If these scripts look OK, I will open a jira to get swift-ci updated.

The DarwinCompatibiltyTests only includes test classes that currently work without any failing test cases.

@spevans
Copy link
Contributor Author

spevans commented Jun 12, 2019

cc @millenomi @shahmishal

@spevans
Copy link
Contributor Author

spevans commented Jun 12, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Jun 12, 2019

@swift-ci test linux

@millenomi
Copy link
Contributor

Why do we need the script again?

@spevans
Copy link
Contributor Author

spevans commented Jun 12, 2019

I want to get a swift-ci target setup that allows testing a PR against the Dawin Compatibility Tests.
A second one can be setup to build/run the normal TestFoundation tests so that we can catch issues that break the Xcode build. These can be built against snapshot toolchains so should be quite quick to run.

@millenomi
Copy link
Contributor

Good enough. Do you want to set the toolchain in the script?

@spevans spevans force-pushed the pr_xcode_build branch 2 times, most recently from e1d6046 to 64b1f3d Compare June 20, 2019 19:34
@spevans
Copy link
Contributor Author

spevans commented Jun 20, 2019

@millenomi Im not sure how to set the toolchain, ideally the swift-ci would just use the latest one available, I assume it would need to download it and set it as the default in Xcode as part of its setup before invoking the script.

@spevans
Copy link
Contributor Author

spevans commented Jun 20, 2019

@swift-ci test

@gottesmm
Copy link
Contributor

@spevans We do that for the protobuf builds. E.x.:

https://ci.swift.org/view/all/job/swift-protobuf-linux-ubuntu-16_04/1222/consoleFull

I would talk with Mishal about the frequency though. I imagine that we probably want to run it only when the toolchain changes.

@gottesmm
Copy link
Contributor

And if that, probably at most once a day (if not once a week).

@spevans
Copy link
Contributor Author

spevans commented Jun 23, 2019

@gottesmm I opened https://bugs.swift.org/browse/SR-10990 for getting the test setup. For now I just want the ability to run them manually as there will be times when they would fail (eg with a PR dependant on a PR in another repo where its not in a toolchain) , eventually they may get added to the swift-ci test for scl-f alongside linux and macos

@spevans
Copy link
Contributor Author

spevans commented Jul 19, 2019

Please test with following PR:

swiftlang/swift-integration-tests#58
@swift-ci test

- xcode-build.sh builds and optionally tests SwiftFoundation.
  usage: ./xcode-build.sh [--clean] [--debug|--release] [--test]

- DarwinCompatibilityTests/xcode-build.sh builds and tests using
  the DarwinCompatibilityTests.
  usage: DarwinCompatibilityTests/xcode-build.sh [--clean]
@spevans
Copy link
Contributor Author

spevans commented Oct 23, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Oct 24, 2019

@swift-ci test and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants