diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index f74d17f14d..69681b48aa 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -80,7 +80,13 @@ jobs: run: rustup override set ${{ steps.toolchain.outputs.name }} - name: Run cargo test working-directory: ./aws-lc-rs - run: cargo test --features bindgen,unstable --target ${{ matrix.target }} - env: - # Surely there's a way to dynamially locate this path - DYLD_ROOT_PATH: "/Library/Developer/CoreSimulator/Volumes/iOS_21C62/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.2.simruntime/Contents/Resources/RuntimeRoot/" + run: | + function latest_xcode() { + mdfind "kMDItemCFBundleIdentifier = 'com.apple.dt.Xcode'" | sort | tail -n 1 + } + sudo xcode-select --switch $(latest_xcode) + xcode-select -p + xcodebuild -runFirstLaunch + export DYLD_ROOT_PATH=$(xcrun --sdk iphonesimulator17.2 --show-sdk-path) + echo DYLD_ROOT_PATH=${DYLD_ROOT_PATH} + cargo test --features bindgen,unstable --target ${{ matrix.target }}