- name: 'configure'
run: |
- [[ '${{ matrix.compiler }}' = 'llvm'* ]] && CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ if [[ '${{ matrix.compiler }}' = 'llvm'* ]]; then
+ CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ CC+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
+ CC+=" --target=$(uname -m)-apple-darwin"
+ options+=" --target=$(uname -m)-apple-darwin"
+ fi
CFLAGS+=' ${{ matrix.cflags }}'
if [[ '${{ matrix.compiler }}' = 'gcc'* ]]; then
libgccdir="$(dirname "$("${CC}" -print-libgcc-file-name)")"
fi
done
fi
- if [[ '${{ matrix.compiler }}' = 'llvm'* ]]; then
- options+=" --target=$(uname -m)-apple-darwin"
- CC+=" --target=$(uname -m)-apple-darwin"
- fi
if [ '${{ matrix.compiler }}' != 'clang' ]; then
options+=" --with-sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
CFLAGS+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
- name: 'cmake configure'
run: |
- [[ '${{ matrix.compiler }}' = 'llvm'* ]] && CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ if [[ '${{ matrix.compiler }}' = 'llvm'* ]]; then
+ CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ CC+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
+ CC+=" --target=$(uname -m)-apple-darwin"
+ fi
if [[ '${{ matrix.compiler }}' = 'gcc'* ]]; then
libgccdir="$(dirname "$("${CC}" -print-libgcc-file-name)")"
echo '::group::gcc include-fixed details'; find "${libgccdir}/include-fixed" | sort; echo '::endgroup::'
fi
cmake -B bld -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.build.macos-version-min }} \
+ "-DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)" \
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
${{ matrix.build.generate }}
fail-fast: false
matrix:
config: [SecureTransport] # also: OpenSSL
- compiler: [gcc-12, gcc-13, gcc-14, llvm@15, clang]
+ compiler: [gcc-12, gcc-13, gcc-14, llvm@15, llvm@18, clang]
# Xcode support matrix as of 2024-07, with default macOS SDK versions and OS names, years:
# * = default Xcode on the runner.
# macos-12: 13.1, 13.2.1, 13.3.1, 13.4.1, 14.0.1, 14.1,*14.2
# macos-13: 14.1, 14.2, 14.3.1,*15.0.1, 15.1, 15.2
# macos-14: 14.3.1, 15.0.1, 15.1, 15.2, 15.3,*15.4, 16.0
- # macOSSDK: 12.0, 12.1, 12.3, 12.3, 12.3, 13.0, 13.1, 13.3, 14.0, 14.2, 14.2, 14.4, 14.5, 15.0
+ # macos-15: *16.0, 16.1
+ # macOSSDK: 12.0, 12.1, 12.3, 12.3, 12.3, 13.0, 13.1, 13.3, 14.0, 14.2, 14.2, 14.4, 14.5, 15.0, 15.1
# Monterey (2021) Ventura (2022) Sonoma (2023) Sequoia (2024)
# https://github.com/actions/runner-images/tree/main/images/macos
# https://en.wikipedia.org/wiki/MacOS_version_history
- image: [macos-12, macos-13, macos-14]
+ image: [macos-12, macos-13, macos-14, macos-15]
# Can skip these to reduce jobs:
# 13.1, 13.2.1 are fairly old.
# 13.3.1, 14.0.1 have the same default macOS SDK as 13.4.1 and identical test results.
- { image: macos-14, xcode: '14.0.1' }
- { image: macos-14, xcode: '14.1' }
- { image: macos-14, xcode: '14.2' }
+ - { image: macos-15, xcode: '13.1' }
+ - { image: macos-15, xcode: '13.2.1' }
+ - { image: macos-15, xcode: '13.3.1' }
+ - { image: macos-15, xcode: '13.4.1' }
+ - { image: macos-15, xcode: '14.0.1' }
+ - { image: macos-15, xcode: '14.1' }
+ - { image: macos-15, xcode: '14.2' }
+ - { image: macos-15, xcode: '14.3.1' }
+ - { image: macos-15, xcode: '15.0.1' }
+ - { image: macos-15, xcode: '15.1' }
+ - { image: macos-15, xcode: '15.2' }
+ - { image: macos-15, xcode: '15.3' }
+ - { image: macos-15, xcode: '15.4' }
+ - { image: macos-12, compiler: 'llvm@18' }
+ - { image: macos-13, compiler: 'llvm@18' }
+ - { image: macos-14, compiler: 'llvm@18' }
+ - { image: macos-15, compiler: 'llvm@15' }
# Reduce build combinations, by dropping less interesting ones
- { compiler: gcc-12, config: SecureTransport }
- { compiler: gcc-13, build: cmake }
if: ${{ matrix.build == 'autotools' }}
run: |
echo automake libtool | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
- while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
+ while [[ $? == 0 ]]; do
+ for i in 1 2 3; do
+ [ '${{ matrix.image }}' != 'macos-12' ] && brew update # To avoid triggering updates needing build from source
+ brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; }
+ done
+ false Too many retries
+ done
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4
- name: 'configure / ${{ matrix.build }}'
run: |
- [[ '${{ matrix.compiler }}' = 'llvm'* ]] && CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ if [[ '${{ matrix.compiler }}' = 'llvm'* ]]; then
+ CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
+ CC+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
+ CC+=" --target=$(uname -m)-apple-darwin"
+ fi
# gcc ships with an `include-fixed` header set, which overrides SDK
# headers with the intent of making them compatible with gcc. The
export CFLAGS
if [[ '${{ matrix.compiler }}' = 'llvm'* ]]; then
options+=" --target=$(uname -m)-apple-darwin"
- CC+=" --target=$(uname -m)-apple-darwin"
fi
if [ '${{ matrix.compiler }}' != 'clang' ]; then
options+=" --with-sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
# would pick up nghttp2, libidn2, and libssh2
cmake -B bld -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.macos-version-min }} \
- "-DCMAKE_IGNORE_PREFIX_PATH=$(brew --prefix)" \
+ "-DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)" \
"-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
+ "-DCMAKE_IGNORE_PREFIX_PATH=$(brew --prefix)" \
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \
-DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF \
-DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \