Repository: conda-forge/conda-smithy

Issue:
Enable Travis build for ppc64le
This PR is a continuation of: https://github.com/conda-forge/conda-smithy/pull/763  by @kamasubb

I've not seen activity on that PR, so I figured we should start fresh. I've resolved the merge conflicts that have popped up since 763 was opened, but have not yet tested it. I'll try and lead this work now and would like some feedback on where this one left off. Thanks!

=======
Added New Build Queue for PowerPC builds
Added changes to download and Install miniconda for PPC
Added changes to build conda-forge-build-setup

TODO:

- [x]    Build su-exec locally and copy
- [x]    Build tini locally and copy
- [x]    Build conda-forge-ci-setup locally and copy
- [x]    Merge conda-forge/conda-forge-pinning-feedstock#78 and release
- [x]    Merge conda-forge/docker-images#67 and upload to dockerhub
- [x]    Fix this PR to use docker.
- [ ]    Create a help-ppc64le team
- [ ]    Build su-exec using this PR
- [ ]    Build tini using this PR
- [ ]    Build conda-forge-ci-setup using this PR



Discussion:

Resolving patch:
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py
--- a/conda_smithy/configure_feedstock.py
+++ b/conda_smithy/configure_feedstock.py
@@ -435,6 +435,7 @@ def dump_subspace_config_files(metas, root_path, platform, arch, upload):
         config = finalize_config(config, platform)
         with write_file(out_path) as f:
             yaml.dump(config, f, default_flow_style=False)
+
         target_platform = config.get("target_platform", [platform_arch])[0]
         result.append((config_name, target_platform, upload))
     return sorted(result)
@@ -537,22 +538,6 @@ def _render_ci_provider(
                 enable_platform[i] = True
         metas_list_of_lists.append(metas)
 
-    if os.path.isdir(os.path.join(forge_dir, ".ci_support")):
-        configs = glob.glob(
-            os.path.join(
-                forge_dir, ".ci_support", "{}_*".format(provider_name)
-            )
-        )
-        for config in configs:
-            remove_file(config)
-
-        for platform in platforms:
-            configs = glob.glob(
-                os.path.join(forge_dir, ".ci_support", "{}_*".format(platform))
-            )
-            for config in configs:
-                remove_file(config)
-
     if not any(enable_platform):
         # There are no cases to build (not even a case without any special
         # dependencies), so remove the run_docker_build.sh if it exists.
@@ -880,8 +865,17 @@ def _travis_specific_setup(jinja_env, forge_config, forge_dir, platform):
         """
         )
 
-    # TODO: Conda has a convenience for accessing nested yaml content.
-    template_files = []
+    platform_templates = {
+        "linux": [
+            "run_docker_build.sh.tmpl",
+            "build_steps.sh.tmpl",
+        ],
+        "osx": [
+            "run_osx_build.sh.tmpl",
+        ],
+        "win": [],
+    }
+    template_files = platform_templates.get(platform, [])
 
     _render_template_exe_files(
         forge_config=forge_config,
@@ -921,6 +915,14 @@ def render_travis(jinja_env, forge_config, forge_dir):
         "travis", forge_config
     )
 
+    extra_platform_files = {
+        "linux": [
+            os.path.join(forge_dir, ".travis", "run_docker_build.sh"),
+            os.path.join(forge_dir, ".travis", "build_steps.sh"),
+        ],
+        "osx": [os.path.join(forge_dir, ".travis", "run_osx_build.sh")],
+    }
+
     return _render_ci_provider(
         "travis",
         jinja_env=jinja_env,
@@ -934,6 +936,7 @@ def render_travis(jinja_env, forge_config, forge_dir):
         keep_noarchs=keep_noarchs,
         platform_specific_setup=_travis_specific_setup,
         upload_packages=upload_packages,
+        extra_platform_files=extra_platform_files,
     )
 
 
@@ -1240,10 +1243,13 @@ def _load_forge_config(forge_dir, exclusive_config_file):
     print(log)
     print("## END CONFIGURATION\n")
 
-    for platform in ["linux_aarch64", "linux_ppc64le"]:
+    for platform in ["linux_aarch64"]:
         if config["provider"][platform] == "default":
             config["provider"][platform] = "azure"
 
+    if config["provider"]["linux_ppc64le"] in {"native", "default"}:
+        config["provider"][platform] = "travis"
+
     # Set the environment variable for the compiler stack
     os.environ["CF_COMPILER_STACK"] = config["compiler_stack"]
     # Set valid ranger for the supported platforms
@@ -1347,6 +1353,17 @@ def get_cfp_file_path(resolve=None, error_on_warn=True):
     return cf_pinning_file, cf_pinning_ver
 
 
+def clear_variants(forge_dir):
+    "Remove all variant files placed in the .ci_support path"
+    if os.path.isdir(os.path.join(forge_dir, ".ci_support")):
+        configs = glob.glob(
+            os.path.join(
+                forge_dir, ".ci_support", "*")
+        )
+        for config in configs:
+            remove_file(config)
+
+
 def main(
     forge_file_directory, no_check_uptodate=False, commit=False, exclusive_config_file=None, check=False
 ):
@@ -1400,6 +1417,7 @@ def main(
     )
 
     copy_feedstock_content(forge_dir)
+    clear_variants(forge_dir)
 
     render_circle(env, config, forge_dir)
     render_travis(env, config, forge_dir)


Test patch: