The macos-10.15 image contains Xcode 12, which should be sufficient... let's find out
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-11.0]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
python_version: ['3.7']
|
python_version: ['3.7']
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import platform
|
import platform
|
||||||
|
import subprocess
|
||||||
|
from typing import Tuple, cast
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@@ -12,11 +14,23 @@ ALL_MACOS_WHEELS = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def get_xcode_version() -> Tuple[int, int]:
|
||||||
|
output = subprocess.check_output(
|
||||||
|
['xcodebuild', '-version'],
|
||||||
|
universal_newlines=True,
|
||||||
|
)
|
||||||
|
lines = output.splitlines()
|
||||||
|
_, version_str = lines[0].split()
|
||||||
|
|
||||||
|
version = tuple(int(x) for x in version_str.split('.'))
|
||||||
|
return cast(Tuple[int, int], version)
|
||||||
|
|
||||||
|
|
||||||
def test_cross_compiled_build(tmp_path):
|
def test_cross_compiled_build(tmp_path):
|
||||||
if utils.platform != 'macos':
|
if utils.platform != 'macos':
|
||||||
pytest.skip('this test is only relevant to macos')
|
pytest.skip('this test is only relevant to macos')
|
||||||
if utils.get_macos_version() < (10, 16):
|
if get_xcode_version() < (12, 0):
|
||||||
pytest.skip('this test only works on macOS 11 or greater')
|
pytest.skip('this test only works with Xcode 12 or greater')
|
||||||
|
|
||||||
project_dir = tmp_path / 'project'
|
project_dir = tmp_path / 'project'
|
||||||
basic_project.generate(project_dir)
|
basic_project.generate(project_dir)
|
||||||
@@ -34,8 +48,8 @@ def test_cross_compiled_build(tmp_path):
|
|||||||
def test_cross_compiled_test(tmp_path, capfd, build_universal2):
|
def test_cross_compiled_test(tmp_path, capfd, build_universal2):
|
||||||
if utils.platform != 'macos':
|
if utils.platform != 'macos':
|
||||||
pytest.skip('this test is only relevant to macos')
|
pytest.skip('this test is only relevant to macos')
|
||||||
if utils.get_macos_version() < (10, 16):
|
if get_xcode_version() < (12, 0):
|
||||||
pytest.skip('this test only works on macOS 11 or greater')
|
pytest.skip('this test only works with Xcode 12 or greater')
|
||||||
|
|
||||||
project_dir = tmp_path / 'project'
|
project_dir = tmp_path / 'project'
|
||||||
basic_project.generate(project_dir)
|
basic_project.generate(project_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user