Closed okwasniewski closed 1 week ago
both cmake 3.28.4 and 3.29 are released! https://cmake.org/download/
Out of curiosity, what functionality was needed in CMake?
Out of curiosity, what functionality was needed in CMake?
There were a few bugs/enhancements like this one when linking a simulator binary versus a real device binary: https://gitlab.kitware.com/cmake/cmake/-/issues/25188
Thanks for working on this, most of the changes seem safe and in line with the existing implementation (apart from the tests failures). I know this isn't quite ready yet, but we took a look and wanted to share some thoughts.
brew update
? We deliberately disable automatically running brew update in our CircleCI jobs because we have had problems with it in the past. Could we omit that step? (potentially by using a newer version of the image if necessary)Hey @neildhar,
default
:
So without a brew upgrade, we are installing CMake 3.28.3 (and 3.28.4) is required for Apple Vision 😕
The problem with running brew update
is that we end up potentially performing every test run with different versions of tools.
brew install
?if(CMAKE_VERSION VERSION_LESS 3.28.4)
message("VisionOS Simulator requires CMake version >= 3.28.4")
endif()
@okwasniewski I think the Android image issue should be addressed by #1364, so you should be able to remove those changes from this PR
@neildhar I've rebased the PR - for some reason everything works locally but pod install
fails on the CI.
Also regarding brew update
we can wait for next circleci image to be released which will include a newer version of CMake as its not possible to install a specific version newer than what homebrew has set in its current version
Hey @neildhar, @tmikov
I finally figured out why the build is failing and it's now all green. The last thing left to sort out is the homebrew upgrade. I've removed HOMEBREW_NO_AUTO_UPDATE
env variable as it was linking to an issue from 2019 (https://discuss.circleci.com/t/brew-install-fails-while-updating/32992) do you think it's okay to remove it?
Hey @okwasniewski, thanks for getting everything up and passing. Regarding the Homebrew updates, I propose that we leave HOMEBREW_NO_AUTO_UPDATE
in the file. Instead, we should split up installing the homebrew packages into two steps, where the second step only installs CMake, pinned to whatever version we need. Then we should run brew update
only before the CMake installation, with a comment explaining why.
That way, all packages will continue to be installed at a deterministic version.
@neildhar I've applied your comment. CMake is now installed separately.
@neildhar has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@okwasniewski has updated the pull request. You must reimport the pull request before landing.
@okwasniewski has updated the pull request. You must reimport the pull request before landing.
@neildhar has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Hey! Is there anything I can do to help you resolve those internal build issues?
Hey @okwasniewski, I tried doing some cleanup internally to minimise changes but can't export them back out to your PR.
Could you apply this patch to the CI config? It addresses some lints and removes changes in jobs that do not build for visionOS.
@@ -5,16 +5,6 @@
android: circleci/android@2.0.3
node: circleci/node@4.7.0
-commands:
- # Install latest CMake version, needed for building Hermes for visionOS which requires at least CMake 3.29.
- brew-install-cmake:
- steps:
- - run:
- name: Install CMake
- command: |
- brew update
- brew install cmake
-
workflows:
version: 2
build:
@@ -176,11 +166,6 @@
- restore_cache:
key: v4-repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
- name: Install dependencies
- command: |
- brew install ninja
- - brew-install-cmake
- - run:
name: Build the test application
command: |
pod install
@@ -227,9 +212,12 @@
- run:
name: Install dependencies
command: |
- brew install ninja
sudo gem install cocoapods
- - brew-install-cmake
+ # TODO: Building for Apple Vision Pro requires a newer version of
+ # CMake than is available by default. Remove "brew update" once the
+ # CircleCI image contains CMake > 3.29.2.
+ brew update
+ brew install cmake
- run:
name: Build the iOS frameworks
command: ./utils/build-ios-framework.sh
@@ -259,9 +247,10 @@
- run:
name: Install dependencies
command: |
- brew install cmake
sudo gem install cocoapods
- - brew-install-cmake
+ # TODO: See comment in build-apple-runtime.
+ brew update
+ brew install cmake
- run:
name: Package the framework
command: |
@@ -289,7 +278,7 @@
macos:
macos:
- xcode: 15.3
+ xcode: 13.4.1
steps:
- checkout:
path: hermes
@@ -327,12 +316,15 @@
test-macos:
macos:
- xcode: 15.3
+ xcode: 13.4.1
steps:
- checkout:
path: hermes
- - brew-install-cmake
- run:
+ name: Install dependencies
+ command: |
+ brew install cmake
+ - run:
name: Run MacOS regression tests in debug mode
command: |
cmake -S hermes -B build -GXcode
@@ -701,7 +693,7 @@
test-macos-test262:
macos:
- xcode: 15.3
+ xcode: 13.4.1
steps:
- checkout:
path: hermes
@okwasniewski has updated the pull request. You must reimport the pull request before landing.
Hey @neildhar, sorry for the delay I was on time off. I've updated the PR, hopefully the tests will be green now 🤞
@okwasniewski has updated the pull request. You must reimport the pull request before landing.
@okwasniewski has updated the pull request. You must reimport the pull request before landing.
@neildhar has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@neildhar merged this pull request in facebook/hermes@dda343b80784fb75c791979c32ce943f8997dd37.
Summary
This PR adds support for visionOS.
Note: Unreleased version of CMake 3.28.4 is required to build for visionOS. We might need to wait until it gets released.
Things to sort out:
Test Plan
Build test app for visionOS