From 9b8d5af8abef56c5c763d4719031d068ecd03984 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 13 Feb 2022 09:24:40 +1100 Subject: [PATCH 1/6] rebuild for llvm 11.1 --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index eff7340..124b5eb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,9 +1,9 @@ {% set clang_variant = os.environ.get('CLANG_VARIANT', 'flang') %} {% set flang_commit = "1192ff0775ddf94f7944dc40181406c088b4d575" %} -{% set llvm_version = "11.0.1" %} +{% set llvm_version = "11.1.0" %} {% set version = llvm_version %} {% set sha256 = "e4fa46a0b29cabf4c4583231b79f923d6296efc4196099cbaebf5828f03a2607" %} -{% set build_number = "20210131" %} +{% set build_number = "20220213" %} package: name: flang-split From dd423d6f9787382ffc56373a9df5d984c25f3655 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 13 Feb 2022 09:25:10 +1100 Subject: [PATCH 2/6] add @wolfv to maintainers Closes #23 --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 124b5eb..b9e8b27 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -110,4 +110,5 @@ about: extra: recipe-maintainers: - isuruf + - wolfv feedstock-name: flang From 9770a6febfe1cfc2a509ffee9183378ceda6e849 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 13 Feb 2022 09:26:41 +1100 Subject: [PATCH 3/6] MNT: Re-rendered with conda-build 3.21.8, conda-smithy 3.16.2, and conda-forge-pinning 2022.02.12.08.56.54 --- .azure-pipelines/azure-pipelines-win.yml | 8 +++--- .ci_support/win_64_.yaml | 2 +- .gitattributes | 1 + .github/CODEOWNERS | 2 +- .scripts/logging_utils.sh | 35 ++++++++++++++++++++++++ LICENSE.txt | 2 +- README.md | 15 ++++++---- build-locally.py | 32 ++++++++++++++++++++-- 8 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 .scripts/logging_utils.sh diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 1fd8ea1..e8029d9 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -5,7 +5,7 @@ jobs: - job: win pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 strategy: matrix: win_64_: @@ -52,7 +52,7 @@ jobs: - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.6 conda-build conda "conda-forge-ci-setup=3" pip' # Optional + packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment @@ -86,7 +86,7 @@ jobs: - script: | call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables displayName: Build recipe env: PYTHONUNBUFFERED: 1 @@ -107,4 +107,4 @@ jobs: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 5875235..861fd1f 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,7 +1,7 @@ c_compiler: - vs2017 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.gitattributes b/.gitattributes index 9060b27..ce52713 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,6 +18,7 @@ bld.bat text eol=crlf .gitignore linguist-generated=true .travis.yml linguist-generated=true .scripts/* linguist-generated=true +.woodpecker.yml linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f66daf5..76dabe7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @isuruf \ No newline at end of file +* @isuruf @wolfv \ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh new file mode 100644 index 0000000..57bc95c --- /dev/null +++ b/.scripts/logging_utils.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Provide a unified interface for the different logging +# utilities CI providers offer. If unavailable, provide +# a compatible fallback (e.g. bare `echo xxxxxx`). + +function startgroup { + # Start a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[group]$1";; + travis ) + echo "$1" + echo -en 'travis_fold:start:'"${1// /}"'\\r';; + github_actions ) + echo "::group::$1";; + * ) + echo "$1";; + esac +} 2> /dev/null + +function endgroup { + # End a foldable group of log lines + # Pass a single argument, quoted + + case ${CI:-} in + azure ) + echo "##[endgroup]";; + travis ) + echo -en 'travis_fold:end:'"${1// /}"'\\r';; + github_actions ) + echo "::endgroup::";; + esac +} 2> /dev/null diff --git a/LICENSE.txt b/LICENSE.txt index 5f30279..6ec1401 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2020, conda-forge contributors +Copyright (c) 2015-2022, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index dd71227..9ed40bd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-flang-green.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang.svg)](https://anaconda.org/conda-forge/flang) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-flang_linux--64-green.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang_linux-64.svg)](https://anaconda.org/conda-forge/flang_linux-64) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-flang_win--64-green.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/flang_win-64.svg)](https://anaconda.org/conda-forge/flang_win-64) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libflang-green.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libflang.svg)](https://anaconda.org/conda-forge/libflang) | Installing flang @@ -57,12 +57,13 @@ Installing `flang` from the `conda-forge` channel can be achieved by adding `con ``` conda config --add channels conda-forge +conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `flang, flang_linux-64, libflang` can be installed with: +Once the `conda-forge` channel has been enabled, `flang, flang_win-64, libflang` can be installed with: ``` -conda install flang flang_linux-64 libflang +conda install flang flang_win-64 libflang ``` It is possible to list all of the versions of `flang` available on your platform with: @@ -75,7 +76,8 @@ conda search flang --channel conda-forge About conda-forge ================= -[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) +[![Powered by +NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the @@ -127,13 +129,14 @@ build distinct package versions. In order to produce a uniquely identifiable distribution: * If the version of a package **is not** being increased, please add or increase - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string). + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). * If the version of a package **is** being increased, please remember to return - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) back to 0. Feedstock Maintainers ===================== * [@isuruf](https://github.com/isuruf/) +* [@wolfv](https://github.com/wolfv/) diff --git a/build-locally.py b/build-locally.py index 3453cfe..8b74348 100755 --- a/build-locally.py +++ b/build-locally.py @@ -7,15 +7,25 @@ import glob import subprocess from argparse import ArgumentParser +import platform def setup_environment(ns): os.environ["CONFIG"] = ns.config os.environ["UPLOAD_PACKAGES"] = "False" + os.environ["IS_PR_BUILD"] = "True" if ns.debug: os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: os.environ["BUILD_OUTPUT_ID"] = ns.output_id + if "MINIFORGE_HOME" not in os.environ: + os.environ["MINIFORGE_HOME"] = os.path.join( + os.path.dirname(__file__), "miniforge3" + ) + if "OSX_SDK_DIR" not in os.environ: + os.environ["OSX_SDK_DIR"] = os.path.join( + os.path.dirname(__file__), "SDKs" + ) def run_docker_build(ns): @@ -23,6 +33,11 @@ def run_docker_build(ns): subprocess.check_call([script]) +def run_osx_build(ns): + script = ".scripts/run_osx_build.sh" + subprocess.check_call([script]) + + def verify_config(ns): valid_configs = { os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") @@ -46,10 +61,16 @@ def verify_config(ns): else: raise ValueError("config " + ns.config + " is not valid") # Remove the following, as implemented - if not ns.config.startswith("linux"): + if ns.config.startswith("win"): raise ValueError( - f"only Linux configs currently supported, got {ns.config}" + f"only Linux/macOS configs currently supported, got {ns.config}" ) + elif ns.config.startswith("osx") and platform.system() == "Darwin": + if "OSX_SDK_DIR" not in os.environ: + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'" + "to download the SDK automatically to '/opt/MacOSX.sdk'" + ) def main(args=None): @@ -68,7 +89,12 @@ def main(args=None): verify_config(ns) setup_environment(ns) - run_docker_build(ns) + if ns.config.startswith("linux") or ( + ns.config.startswith("osx") and platform.system() == "Linux" + ): + run_docker_build(ns) + elif ns.config.startswith("osx"): + run_osx_build(ns) if __name__ == "__main__": From 3beae49bb29c10f3ba6b88f4562608ba8554ed77 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 13 Feb 2022 09:28:13 +1100 Subject: [PATCH 4/6] spdx lint --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b9e8b27..b2533fc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -103,7 +103,7 @@ outputs: about: home: http://github.com/flang-compiler/flang - license: Apache 2.0 + license: Apache-2.0 license_file: LICENSE.txt summary: Flang is a Fortran compiler targeting LLVM. From 2fb175872b79548e9549a201775b905efdf72a91 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 13 Feb 2022 09:33:23 +1100 Subject: [PATCH 5/6] set buildnum as suggested --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b2533fc..837b990 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -3,7 +3,7 @@ {% set llvm_version = "11.1.0" %} {% set version = llvm_version %} {% set sha256 = "e4fa46a0b29cabf4c4583231b79f923d6296efc4196099cbaebf5828f03a2607" %} -{% set build_number = "20220213" %} +{% set build_number = "20210201" %} package: name: flang-split From 39f7db3b0b2deb546ab0306857a135d80374808b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 20 Feb 2022 14:11:53 +1100 Subject: [PATCH 6/6] MNT: Re-rendered with conda-build 3.21.8, conda-smithy 3.17.1, and conda-forge-pinning 2022.02.19.23.26.53 --- .azure-pipelines/azure-pipelines-win.yml | 3 +-- .ci_support/README | 7 ++++++- .gitattributes | 1 + README.md | 2 +- build-locally.py | 11 ++++------- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index e8029d9..88fd9c1 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -49,10 +49,9 @@ jobs: condition: contains(variables['CONFIG'], 'vs2008') displayName: Patch vs2008 (if needed) - - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional + packageSpecs: 'python=3.9 conda-build conda pip boa conda-forge-ci-setup=3' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment diff --git a/.ci_support/README b/.ci_support/README index e4e2dce..69c5db6 100644 --- a/.ci_support/README +++ b/.ci_support/README @@ -1 +1,6 @@ -This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly. \ No newline at end of file +This file is automatically generated by conda-smithy. If any +particular build configuration is expected, but it is not found, +please make sure all dependencies are satisfiable. To add/modify any +matrix elements, you should create/change conda-smithy's input +recipe/conda_build_config.yaml and re-render the recipe, rather than +editing these files directly. diff --git a/.gitattributes b/.gitattributes index ce52713..7f32763 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ bld.bat text eol=crlf # github helper pieces to make some files not show up in diffs automatically .azure-pipelines/* linguist-generated=true .circleci/* linguist-generated=true +.ci_support/README linguist-generated=true .drone/* linguist-generated=true .drone.yml linguist-generated=true .github/* linguist-generated=true diff --git a/README.md b/README.md index 9ed40bd..589bf01 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ About flang Home: http://github.com/flang-compiler/flang -Package license: Apache 2.0 +Package license: Apache-2.0 Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/flang-feedstock/blob/master/LICENSE.txt) diff --git a/build-locally.py b/build-locally.py index 8b74348..eec38a0 100755 --- a/build-locally.py +++ b/build-locally.py @@ -22,10 +22,6 @@ def setup_environment(ns): os.environ["MINIFORGE_HOME"] = os.path.join( os.path.dirname(__file__), "miniforge3" ) - if "OSX_SDK_DIR" not in os.environ: - os.environ["OSX_SDK_DIR"] = os.path.join( - os.path.dirname(__file__), "SDKs" - ) def run_docker_build(ns): @@ -65,11 +61,12 @@ def verify_config(ns): raise ValueError( f"only Linux/macOS configs currently supported, got {ns.config}" ) - elif ns.config.startswith("osx") and platform.system() == "Darwin": + elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'" - "to download the SDK automatically to '/opt/MacOSX.sdk'" + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " + "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." )