5454Other examples often found in the wild:
5555
5656` ` ` yaml
57- if : build_platform != target_platform ... # true if cross-platform build
57+ if : build_platform != host_platform ... # true if cross-platform build
5858if : osx and arm64 ... # true for apple silicon (osx-arm64)
5959if : linux and (aarch64 or ppc64le)) ... # true for linux ppc64le or linux-aarch64
6060` ` `
@@ -65,12 +65,13 @@ The following variables are available during rendering of the recipe:
6565
6666| Variable | Description |
6767|----------------------|------------------------------------------------------------------------|
68- | ` target_platform` | the configured `target_platform` for the build |
6968| ` build_platform` | the configured `build_platform` for the build |
70- | `linux` | "true" if `target_platform` is Linux |
71- | `osx` | "true" if `target_platform` is OSX / macOS |
72- | `win` | "true" if `target_platform` is Windows |
73- | `unix` | "true" if `target_platform` is a Unix (macOS or Linux) |
69+ | `host_platform` | the configured `host_platform` for the build |
70+ | `target_platform` | the configured `target_platform` for the build |
71+ | `linux` | "true" if `host_platform` is Linux |
72+ | `osx` | "true" if `host_platform` is OSX / macOS |
73+ | `win` | "true" if `host_platform` is Windows |
74+ | `unix` | "true" if `host_platform` is a Unix (macOS or Linux) |
7475| `x86`, `x86_64` | x86 32/64-bit Architecture |
7576| `aarch64`, `arm64` | 64-bit Arm (these are the same but are both supported for legacy) |
7677| `armV6l`, `armV7l` | 32-bit Arm |
@@ -149,9 +150,9 @@ Some notable options are:
149150` ` ` yaml
150151- if: python == "3.8" # equal
151152- if: python != "3.8" # not equal
152- - if: python and linux # true if python variant is set and the target_platform is linux
153- - if: python and not linux # true if python variant is set and the target_platform is not linux
154- - if: python and (linux or osx) # true if python variant is set and the target_platform is linux or osx
153+ - if: python and linux # true if python variant is set and the host_platform is linux
154+ - if: python and not linux # true if python variant is set and the host_platform is not linux
155+ - if: python and (linux or osx) # true if python variant is set and the host_platform is linux or osx
155156` ` `
156157
157158[minijinja] : https://github.com/mitsuhiko/minijinja
0 commit comments