From eedd89780ef8e35be8bf1ed5c7e69c70e7d0e7bc Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Thu, 8 Oct 2020 14:17:46 +0100 Subject: [PATCH 1/2] add conda build workflow --- .github/workflows/action-conda-build.yml | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/action-conda-build.yml diff --git a/.github/workflows/action-conda-build.yml b/.github/workflows/action-conda-build.yml new file mode 100644 index 0000000000..be7c992dbd --- /dev/null +++ b/.github/workflows/action-conda-build.yml @@ -0,0 +1,42 @@ +name: Conda-build + +# runs on a push on master and at the end of every day +on: + push: + branches: + - master + - github-actions2 # testing branch + schedule: + - cron: '0 0 * * *' + +jobs: + linux: + runs-on: "ubuntu-latest" # use only Linux for conda build + strategy: + matrix: + python-version: [3.8] # use only the latest for conda build + fail-fast: false + name: Linux Python ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v2 + - uses: goanpeca/setup-miniconda@v1 + with: + python-version: ${{ matrix.python-version }} + miniconda-version: "latest" + channels: conda-forge + - shell: bash -l {0} + run: mkdir -p condabuild_artifacts_python_${{ matrix.python-version }} + - shell: bash -l {0} + run: conda --version 2>&1 | tee condabuild_artifacts_python_${{ matrix.python-version }}/conda_version.txt + - shell: bash -l {0} + run: python -V 2>&1 | tee condabuild_artifacts_python_${{ matrix.python-version }}/python_version.txt + - shell: bash -l {0} + run: conda install -y conda-build conda-verify ripgrep anaconda-client 2>&1 | tee condabuild_artifacts_python_${{ matrix.python-version }}/install_conda_buildtools.txt + - shell: bash -l {0} + run: conda build package -c conda-forge -c esmvalgroup 2>&1 | tee condabuild_artifacts_python_${{ matrix.python-version }}/conda_build.txt + - name: Upload artifacts + if: ${{ always() }} # upload artifacts even if fail + uses: actions/upload-artifact@v2 + with: + name: Condabuild_python_${{ matrix.python-version }} + path: condabuild_artifacts_python_${{ matrix.python-version }} From e88d6dc2c88d97b835a5c23dbacbc7b531076385 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Fri, 11 Dec 2020 14:22:31 +0000 Subject: [PATCH 2/2] update conda hook --- .github/workflows/action-conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-conda-build.yml b/.github/workflows/action-conda-build.yml index be7c992dbd..acdb970571 100644 --- a/.github/workflows/action-conda-build.yml +++ b/.github/workflows/action-conda-build.yml @@ -19,7 +19,7 @@ jobs: name: Linux Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 - - uses: goanpeca/setup-miniconda@v1 + - uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python-version }} miniconda-version: "latest"