diff options
-rw-r--r-- | coin/instructions/common_environment.yaml | 9 | ||||
-rw-r--r-- | coin/instructions/execute_build_instructions.yaml | 26 | ||||
-rw-r--r-- | coin_build_instructions.py | 3 |
3 files changed, 35 insertions, 3 deletions
diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index fcbd97455..de83714e5 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -163,3 +163,12 @@ instructions: - type: EnvironmentVariable variableName: LLVM_INSTALL_DIR variableValue: "{{.Env.LLVM_DYNAMIC_LIBS_100}}" + disable_if: + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64-ARM64 # When target arch is universal binary, we can use the default libclang + - condition: property + property: host.os + equals_value: MacOS diff --git a/coin/instructions/execute_build_instructions.yaml b/coin/instructions/execute_build_instructions.yaml index e1a082bb6..71ed80172 100644 --- a/coin/instructions/execute_build_instructions.yaml +++ b/coin/instructions/execute_build_instructions.yaml @@ -15,9 +15,29 @@ instructions: maxTimeInSeconds: 14400 maxTimeBetweenOutput: 1200 enable_if: - condition: property - property: host.os - equals_value: MacOS + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64 + - condition: property + property: host.os + equals_value: MacOS + userMessageOnFailure: > + Failed to execute build instructions on osx + - type: ExecuteCommand + command: "python3 -u coin_build_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} {{.Env.CI_USE_SCCACHE}} --instdir=/Users/qt/work/install --targetOs={{.Env.CI_OS}} --hostArch=X86_64 --targetArch=X86_64-ARM64 --phase=ALL" + maxTimeInSeconds: 14400 + maxTimeBetweenOutput: 1200 + enable_if: + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64-ARM64 + - condition: property + property: host.os + equals_value: MacOS userMessageOnFailure: > Failed to execute build instructions on osx - type: ExecuteCommand diff --git a/coin_build_instructions.py b/coin_build_instructions.py index ed7055e31..fff680587 100644 --- a/coin_build_instructions.py +++ b/coin_build_instructions.py @@ -148,6 +148,9 @@ def call_setup(python_ver, phase): cmd += ["--build-tests", "--verbose-build"] + if CI_TARGET_ARCH == "X86_64-ARM64": + cmd += ["--macos-arch='x86_64;arm64'"] + if CI_USE_SCCACHE: cmd += [f"--compiler-launcher={CI_USE_SCCACHE}"] |