Skip to content

Commit fe0e434

Browse files
committed
Skip test package on package build
1 parent 2712ecf commit fe0e434

10 files changed

Lines changed: 118 additions & 80 deletions

File tree

‎.github/workflows/20.yml‎

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,33 @@ on:
2828
default: 20
2929

3030
jobs:
31-
verify-linux-x86_64:
32-
uses: ./.github/workflows/verify.yml
33-
with:
34-
display_name: Linux x86_64
35-
version: ${{ inputs.version }}
36-
os: ubuntu-24.04
31+
# verify-linux-x86_64:
32+
# uses: ./.github/workflows/verify.yml
33+
# with:
34+
# display_name: Linux x86_64
35+
# version: ${{ inputs.version }}
36+
# os: ubuntu-24.04
3737

38-
verify-linux-arm:
39-
uses: ./.github/workflows/verify.yml
40-
with:
41-
display_name: Linux ARM
42-
version: ${{ inputs.version }}
43-
os: ubuntu-24.04-arm
38+
# verify-linux-arm:
39+
# uses: ./.github/workflows/verify.yml
40+
# with:
41+
# display_name: Linux ARM
42+
# version: ${{ inputs.version }}
43+
# os: ubuntu-24.04-arm
4444

45-
verify-macos-15-intel:
46-
uses: ./.github/workflows/verify.yml
47-
with:
48-
display_name: macOS 15 Intel
49-
version: ${{ inputs.version }}
50-
os: macos-15-intel
45+
# verify-macos-15-intel:
46+
# uses: ./.github/workflows/verify.yml
47+
# with:
48+
# display_name: macOS 15 Intel
49+
# version: ${{ inputs.version }}
50+
# os: macos-15-intel
5151

52-
verify-macos-15-arm:
53-
uses: ./.github/workflows/verify.yml
54-
with:
55-
display_name: macOS 15 ARM
56-
version: ${{ inputs.version }}
57-
os: macos-15
52+
# verify-macos-15-arm:
53+
# uses: ./.github/workflows/verify.yml
54+
# with:
55+
# display_name: macOS 15 ARM
56+
# version: ${{ inputs.version }}
57+
# os: macos-15
5858

5959
verify-windows-x86_64:
6060
uses: ./.github/workflows/verify.yml
@@ -70,45 +70,45 @@ jobs:
7070
version: ${{ inputs.version }}
7171
os: windows-11-arm
7272

73-
verify-linux-x86_64-cortex-m4f:
74-
uses: ./.github/workflows/verify.yml
75-
with:
76-
display_name: Linux x86_64 → Cortex-M4F
77-
version: ${{ inputs.version }}
78-
os: ubuntu-24.04
79-
host_profile: cortex-m4f
73+
# verify-linux-x86_64-cortex-m4f:
74+
# uses: ./.github/workflows/verify.yml
75+
# with:
76+
# display_name: Linux x86_64 → Cortex-M4F
77+
# version: ${{ inputs.version }}
78+
# os: ubuntu-24.04
79+
# host_profile: cortex-m4f
8080

81-
verify-linux-arm-cortex-m4:
82-
uses: ./.github/workflows/verify.yml
83-
with:
84-
display_name: Linux ARM → Cortex-M4
85-
version: ${{ inputs.version }}
86-
os: ubuntu-24.04-arm
87-
host_profile: cortex-m4
81+
# verify-linux-arm-cortex-m4:
82+
# uses: ./.github/workflows/verify.yml
83+
# with:
84+
# display_name: Linux ARM → Cortex-M4
85+
# version: ${{ inputs.version }}
86+
# os: ubuntu-24.04-arm
87+
# host_profile: cortex-m4
8888

89-
verify-macos-14-arm-cortex-m4f:
90-
uses: ./.github/workflows/verify.yml
91-
with:
92-
display_name: macOS 14 ARM → Cortex-M4F
93-
version: ${{ inputs.version }}
94-
os: macos-14
95-
host_profile: cortex-m4f
89+
# verify-macos-14-arm-cortex-m4f:
90+
# uses: ./.github/workflows/verify.yml
91+
# with:
92+
# display_name: macOS 14 ARM → Cortex-M4F
93+
# version: ${{ inputs.version }}
94+
# os: macos-14
95+
# host_profile: cortex-m4f
9696

97-
verify-macos-15-arm-cortex-m4f:
98-
uses: ./.github/workflows/verify.yml
99-
with:
100-
display_name: macOS 15 ARM → Cortex-M4F
101-
version: ${{ inputs.version }}
102-
os: macos-15
103-
host_profile: cortex-m4f
97+
# verify-macos-15-arm-cortex-m4f:
98+
# uses: ./.github/workflows/verify.yml
99+
# with:
100+
# display_name: macOS 15 ARM → Cortex-M4F
101+
# version: ${{ inputs.version }}
102+
# os: macos-15
103+
# host_profile: cortex-m4f
104104

105-
verify-macos-15-intel-cortex-m4f:
106-
uses: ./.github/workflows/verify.yml
107-
with:
108-
display_name: macOS 15 Intel → Cortex-M4F
109-
version: ${{ inputs.version }}
110-
os: macos-15-intel
111-
host_profile: cortex-m4f
105+
# verify-macos-15-intel-cortex-m4f:
106+
# uses: ./.github/workflows/verify.yml
107+
# with:
108+
# display_name: macOS 15 Intel → Cortex-M4F
109+
# version: ${{ inputs.version }}
110+
# os: macos-15-intel
111+
# host_profile: cortex-m4f
112112

113113
verify-windows-x86_64-cortex-m33f:
114114
uses: ./.github/workflows/verify.yml
@@ -120,17 +120,17 @@ jobs:
120120

121121
upload-package:
122122
needs:
123-
- verify-linux-x86_64
124-
- verify-linux-arm
125-
- verify-macos-15-intel
126-
- verify-macos-15-arm
123+
# - verify-linux-x86_64
124+
# - verify-linux-arm
125+
# - verify-macos-15-intel
126+
# - verify-macos-15-arm
127127
- verify-windows-x86_64
128128
- verify-windows-arm
129-
- verify-linux-x86_64-cortex-m4f
130-
- verify-linux-arm-cortex-m4
131-
- verify-macos-14-arm-cortex-m4f
132-
- verify-macos-15-arm-cortex-m4f
133-
- verify-macos-15-intel-cortex-m4f
129+
# - verify-linux-x86_64-cortex-m4f
130+
# - verify-linux-arm-cortex-m4
131+
# - verify-macos-14-arm-cortex-m4f
132+
# - verify-macos-15-arm-cortex-m4f
133+
# - verify-macos-15-intel-cortex-m4f
134134
- verify-windows-x86_64-cortex-m33f
135135
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.upload == true }}
136136
uses: ./.github/workflows/upload.yml

‎.github/workflows/verify.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ jobs:
7777
if: ${{ inputs.host_profile != '' }}
7878
run: conan create all --version=${{ inputs.version }} --build-require --build=cmake --build=missing:cmake/* -pr:h llvm-${{ inputs.version }} $HOST_PROFILE --build=make --build=missing:make/* -c tools.build:skip_test=True
7979

80+
# Windows requires this setting which we do not specify. We get the
81+
# following conan error: "Visual Studio Runtime version (v140-v145) not
82+
# defined. Please, add the compiler. runtime_version=[v140-v145] setting
83+
# to your profile."
8084
- name: ⚙️ Build/Install ninja from scratch using LLVM for build platform
81-
run: conan install --tool-requires="ninja/1.13.2" --build="ninja/*" -pr:a llvm-${{ inputs.version }}
85+
if: ${{ runner.os != 'Windows' }}
86+
run: >
87+
conan install --tool-requires="ninja/1.13.2" --build="ninja/*" -pr:a llvm-${{ inputs.version }} -c tools.cmake.cmaketoolchain:extra_variables="{'CMAKE_MSVC_RUNTIME_LIBRARY': ''}"
8288

8389
- name: 📦 Build C++ demo using LLVM toolchain
8490
run: conan build demos/cpp -pr:a llvm-${{ inputs.version }} $HOST_PROFILE

‎all/conanfile.py‎

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ def add_common_flags(self):
428428
def setup_linux(self):
429429
self.cpp_info.libdirs = []
430430

431+
# Explicitly set system name for CMake
432+
self.conf_info.define(
433+
"tools.cmake.cmaketoolchain:system_name", "Linux")
434+
431435
library_path = ""
432436
if self.settings.arch == "x86_64":
433437
library_path = self._lib_path / "x86_64-unknown-linux-gnu"
@@ -454,10 +458,19 @@ def setup_windows(self):
454458
# unused.
455459
self.conf_info.append("tools.gnu:disable_flags", 'libcxx')
456460

461+
# Ensure CMake knows this is a Windows build, not a freestanding/embedded
462+
# build. Without this, CMake may add -nostartfiles -nostdlib flags.
463+
self.conf_info.define(
464+
"tools.cmake.cmaketoolchain:system_name", "Windows")
465+
457466
def setup_mac_osx(self):
458467
# Disable Conan's automatic library directories
459468
self.cpp_info.libdirs = []
460469

470+
# Explicitly set system name for CMake
471+
self.conf_info.define(
472+
"tools.cmake.cmaketoolchain:system_name", "Darwin")
473+
461474
def package_info(self):
462475
self.conf_info.define("tools.build:compiler_executables", {
463476
"c": "clang",
@@ -508,17 +521,27 @@ def package_info(self):
508521
self.buildenv_info.define("ADDR2LINE", "llvm-addr2line")
509522
self.buildenv_info.define("GDB", "lldb")
510523

524+
# Determine which OS we're targeting
525+
target_os = None
526+
target_arch = None
511527
if self.settings_target:
528+
target_os = self.settings_target.get_safe('os')
529+
target_arch = self.settings_target.get_safe('arch')
530+
else:
531+
# Native build - target is same as host
532+
target_os = str(self.settings.os)
533+
target_arch = str(self.settings.arch)
534+
535+
if target_os:
512536
self.add_common_flags()
513-
if self.settings_target.get_safe('os') == 'Macos':
537+
if target_os == 'Macos':
514538
self.setup_mac_osx()
515-
elif self.settings_target.get_safe('os') == 'Linux':
539+
elif target_os == 'Linux':
516540
self.setup_linux()
517-
elif self.settings_target.get_safe('os') == 'Windows':
541+
elif target_os == 'Windows':
518542
self.setup_windows()
519-
elif self.settings_target.get_safe('os') == 'baremetal':
520-
ARCH = str(self.settings_target.get_safe('arch'))
521-
if ARCH.startswith('cortex-m'):
543+
elif target_os == 'baremetal':
544+
if target_arch and target_arch.startswith('cortex-m'):
522545
self.setup_arm_cortex_m()
523546

524547
def package_id(self):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def generate(self):
2020
tc = CMakeToolchain(self)
2121
tc.generator = "Unix Makefiles"
2222
tc.generate()
23+
if self.settings.os == "Windows":
24+
tc.cache_variables["CMAKE_MSVC_RUNTIME_LIBRARY"] = ""
2325

2426
deps = CMakeDeps(self)
2527
deps.generate()

‎conan/profiles/v1/llvm-20‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
include(default)
1+
{% if context == "host" %}
22

33
[settings]
4+
os={{ detect_api.detect_os() }}
5+
arch={{ detect_api.detect_arch() }}
6+
build_type=Release
47
compiler=clang
58
compiler.cppstd=23
69
compiler.libcxx=libc++
710
compiler.version=20
811

9-
{% if context == "host" %}
10-
1112
[tool_requires]
1213
llvm-toolchain/20
1314

1415
{% elif context == "build" %}
1516

17+
include(default)
18+
1619
[tool_requires]
1720
!llvm-toolchain/*:llvm-toolchain/20,cmake/[>=3.28.0 <5.0.0]
1821

‎demos/cpp-modules/conanfile.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def requirements(self):
1010
pass
1111

1212
def build_requirements(self):
13-
self.tool_requires("ninja/[^1.0.0]")
13+
self.tool_requires("ninja/1.13.2")
1414
self.tool_requires("cmake/[>=3.28.0 <5.0.0]")
1515

1616
def layout(self):
@@ -19,6 +19,8 @@ def layout(self):
1919
def generate(self):
2020
tc = CMakeToolchain(self)
2121
tc.generator = "Ninja"
22+
if self.settings.os == "Windows":
23+
tc.cache_variables["CMAKE_MSVC_RUNTIME_LIBRARY"] = ""
2224
tc.generate()
2325
deps = CMakeDeps(self)
2426
deps.generate()

‎demos/cpp/conanfile.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def requirements(self):
1010
pass
1111

1212
def build_requirements(self):
13-
self.tool_requires("ninja/[^1.0.0]")
13+
self.tool_requires("ninja/1.13.2")
1414
self.tool_requires("cmake/[>=3.28.0 <5.0.0]")
1515

1616
def layout(self):
@@ -19,6 +19,8 @@ def layout(self):
1919
def generate(self):
2020
tc = CMakeToolchain(self)
2121
tc.generator = "Ninja"
22+
if self.settings.os == "Windows":
23+
tc.cache_variables["CMAKE_MSVC_RUNTIME_LIBRARY"] = ""
2224
tc.generate()
2325
deps = CMakeDeps(self)
2426
deps.generate()

0 commit comments

Comments
 (0)