Location of macOS SDKs unclear

The docs say that 10.12, 10.13, 10.14, 10.15 macOS SDKs are installed, however I can only see 10.14:

2019-09-22T22:32:30.1869080Z + ls -al /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
2019-09-22T22:32:30.2112000Z total 0
2019-09-22T22:32:30.2115160Z drwxr-xr-x 4 runner staff 128 Sep 17 16:06 .
2019-09-22T22:32:30.2116140Z drwxr-xr-x 5 runner staff 160 Jul 13 04:43 ..
2019-09-22T22:32:30.2118660Z drwxr-xr-x 7 runner staff 224 Jul 9 00:07 MacOSX.sdk
2019-09-22T22:32:30.2119350Z lrwxr-xr-x 1 runner staff 10 Sep 17 15:58 MacOSX10.14.sdk -> MacOSX.sdk
2019-09-22T22:32:30.2118040Z + xcodebuild -sdk -version
2019-09-22T22:32:32.7768200Z iPhoneOS12.4.sdk - iOS 12.4 (iphoneos12.4)
2019-09-22T22:32:32.7768560Z SDKVersion: 12.4
2019-09-22T22:32:32.7768730Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk
2019-09-22T22:32:32.7768890Z PlatformVersion: 12.4
2019-09-22T22:32:32.7769090Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform
2019-09-22T22:32:32.7769650Z BuildID: 6C36A3FC-A2C5-11E9-BADE-81366AEF9208
2019-09-22T22:32:32.7769830Z ProductBuildVersion: 16G73
2019-09-22T22:32:32.7770320Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7770460Z ProductName: iPhone OS
2019-09-22T22:32:32.7770580Z ProductVersion: 12.4
2019-09-22T22:32:32.7770640Z
2019-09-22T22:32:32.7771160Z iPhoneSimulator12.4.sdk - Simulator - iOS 12.4 (iphonesimulator12.4)
2019-09-22T22:32:32.7771320Z SDKVersion: 12.4
2019-09-22T22:32:32.7771500Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk
2019-09-22T22:32:32.7771670Z PlatformVersion: 12.4
2019-09-22T22:32:32.7771810Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform
2019-09-22T22:32:32.7772300Z BuildID: 6C36A3FC-A2C5-11E9-BADE-81366AEF9208
2019-09-22T22:32:32.7772470Z ProductBuildVersion: 16G73
2019-09-22T22:32:32.7772910Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7773070Z ProductName: iPhone OS
2019-09-22T22:32:32.7773190Z ProductVersion: 12.4
2019-09-22T22:32:32.7773280Z
2019-09-22T22:32:32.7773780Z MacOSX10.14.sdk - macOS 10.14 (macosx10.14)
2019-09-22T22:32:32.7773920Z SDKVersion: 10.14
2019-09-22T22:32:32.7774070Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
2019-09-22T22:32:32.7774270Z PlatformVersion: 1.1
2019-09-22T22:32:32.7774410Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/MacOSX.platform
2019-09-22T22:32:32.7774570Z ProductBuildVersion: 18G74
2019-09-22T22:32:32.7775050Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7775190Z ProductName: Mac OS X
2019-09-22T22:32:32.7775320Z ProductUserVisibleVersion: 10.14.6
2019-09-22T22:32:32.7775450Z ProductVersion: 10.14.6
2019-09-22T22:32:32.7775570Z iOSSupportVersion: 12.3.1
2019-09-22T22:32:32.7775640Z
2019-09-22T22:32:32.7776130Z AppleTVOS12.4.sdk - tvOS 12.4 (appletvos12.4)
2019-09-22T22:32:32.7776290Z SDKVersion: 12.4
2019-09-22T22:32:32.7776480Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.4.sdk
2019-09-22T22:32:32.7776640Z PlatformVersion: 12.4
2019-09-22T22:32:32.7776800Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/AppleTVOS.platform
2019-09-22T22:32:32.7777290Z BuildID: B22E1CAA-9DED-11E9-A86E-77B0BE4953B4
2019-09-22T22:32:32.7777450Z ProductBuildVersion: 16M567
2019-09-22T22:32:32.7777890Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7778650Z ProductName: Apple TVOS
2019-09-22T22:32:32.7778840Z ProductVersion: 12.4
2019-09-22T22:32:32.7778930Z
2019-09-22T22:32:32.7779480Z AppleTVSimulator12.4.sdk - Simulator - tvOS 12.4 (appletvsimulator12.4)
2019-09-22T22:32:32.7779680Z SDKVersion: 12.4
2019-09-22T22:32:32.7779840Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator12.4.sdk
2019-09-22T22:32:32.7780660Z PlatformVersion: 12.4
2019-09-22T22:32:32.7780840Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/AppleTVSimulator.platform
2019-09-22T22:32:32.7781380Z BuildID: B22E1CAA-9DED-11E9-A86E-77B0BE4953B4
2019-09-22T22:32:32.7781540Z ProductBuildVersion: 16M567
2019-09-22T22:32:32.7781990Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7782140Z ProductName: Apple TVOS
2019-09-22T22:32:32.7782280Z ProductVersion: 12.4
2019-09-22T22:32:32.7782370Z
2019-09-22T22:32:32.7782820Z WatchOS5.3.sdk - watchOS 5.3 (watchos5.3)
2019-09-22T22:32:32.7782970Z SDKVersion: 5.3
2019-09-22T22:32:32.7783130Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS5.3.sdk
2019-09-22T22:32:32.7783280Z PlatformVersion: 5.3
2019-09-22T22:32:32.7783420Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/WatchOS.platform
2019-09-22T22:32:32.7784020Z BuildID: 459593FC-9E0B-11E9-BF66-B0C6513733DA
2019-09-22T22:32:32.7784180Z ProductBuildVersion: 16U567
2019-09-22T22:32:32.7784660Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7784800Z ProductName: Watch OS
2019-09-22T22:32:32.7784930Z ProductVersion: 5.3
2019-09-22T22:32:32.7784980Z
2019-09-22T22:32:32.7785510Z WatchSimulator5.3.sdk - Simulator - watchOS 5.3 (watchsimulator5.3)
2019-09-22T22:32:32.7785670Z SDKVersion: 5.3
2019-09-22T22:32:32.7785830Z Path: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator5.3.sdk
2019-09-22T22:32:32.7785990Z PlatformVersion: 5.3
2019-09-22T22:32:32.7786150Z PlatformPath: /Applications/Xcode_10.3.app/Contents/Developer/Platforms/WatchSimulator.platform
2019-09-22T22:32:32.7786640Z BuildID: 459593FC-9E0B-11E9-BF66-B0C6513733DA
2019-09-22T22:32:32.7786790Z ProductBuildVersion: 16U567
2019-09-22T22:32:32.7787240Z ProductCopyright: 1983-2019 Apple Inc.
2019-09-22T22:32:32.7787400Z ProductName: Watch OS
2019-09-22T22:32:32.7787530Z ProductVersion: 5.3
2019-09-22T22:32:32.7787610Z
2019-09-22T22:32:32.7787730Z Xcode 10.3
2019-09-22T22:32:32.7787880Z Build version 10G8

I don’t have much macOS experience, so I may be doing something wrong.

My goal is to set the SDKROOT environment variable so that CMake uses a certain SDK. Can the docs be extended to have the full paths to the available SDKs?

Looks like each macOS SDK is inside the different Xcode catalog. You can get the Xcode paths from the documentation https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#xcode

macOS 10.15:

Run ls -al /Applications/Xcode_11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
drwxr-xr-x 5 runner staff 160 Sep 17 16:24 .
drwxr-xr-x 6 runner staff 192 Sep 11 11:47 ..
drwxr-xr-x 4 runner staff 128 Aug 30 06:47 DriverKit19.0.sdk
drwxr-xr-x 8 runner staff 256 Aug 30 06:47 MacOSX.sdk
lrwxr-xr-x 1 runner staff 10 Sep 17 16:21 MacOSX10.15.sdk -> MacOSX.sdk

macOS 10.13:

Run ls -al /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
drwxr-xr-x 4 runner staff 128 Sep 17 14:54 .
drwxr-xr-x 5 runner staff 160 Jun 5 2018 ..
drwxr-xr-x 5 runner staff 160 May 21 2022 MacOSX.sdk
lrwxr-xr-x 1 runner staff 10 Sep 17 14:48 MacOSX10.13.sdk -> MacOSX.sdk