diff --git a/.github/workflows/conda_package.yml b/.github/workflows/conda_package.yml index d2f1fe68dd..7cdddbd655 100644 --- a/.github/workflows/conda_package.yml +++ b/.github/workflows/conda_package.yml @@ -38,23 +38,37 @@ jobs: with: miniconda-version: "latest" auto-update-conda: true + channel-priority: true + mamba-version: "*" python-version: ${{ matrix.python }} activate-environment: recipe channels: ml4t, conda-forge, defaults, anaconda, ranaroussi, adteam - - name: conda install + - name: create uploader + # address broken client under py3.9 + if: ${{ matrix.python == '3.9' }} + run: conda create -n up python=3.7 anaconda-client + + - name: conda build for ${{ matrix.os }} run: | conda activate recipe - conda install -n recipe conda-build conda-verify anaconda-client + mamba install -n recipe boa conda-verify anaconda-client + conda mambabuild --output-folder . --python ${{ matrix.python }} conda/zipline-reloaded - - name: conda build for ${{ matrix.os }} - run: conda-build --output-folder . --python ${{ matrix.python }} conda/zipline-reloaded/ + - name: activate uploader + # address broken client under py3.9 + if: ${{ matrix.python == '3.9' }} + run: conda activate up - - name: store macos result + - name: store windows result uses: actions/upload-artifact@v2 - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'windows-latest' }} with: - path: osx-64/*.tar.bz2 + path: win-64/*.tar.bz2 + + - name: upload windows + if: ${{ matrix.os == 'windows-latest' }} + run: anaconda upload -l main -u ml4t win-64/*.tar.bz2 - name: store linux result uses: actions/upload-artifact@v2 @@ -62,23 +76,16 @@ jobs: with: path: linux-64/*.tar.bz2 - - name: store windows result + - name: upload linux + if: ${{ matrix.os == 'ubuntu-latest' }} + run: anaconda upload -l main -u ml4t linux-64/*.tar.bz2 + + - name: store macos result uses: actions/upload-artifact@v2 - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'macos-latest' }} with: - path: win-64/*.tar.bz2 + path: osx-64/*.tar.bz2 - - name: upload ${{ matrix.os }} result to anaconcda - if: ${{ matrix.python != '3.9'}} - env: - OS: ${{ matrix.os }} - run: | - if [ "$OS" == "ubuntu-latest" ] ; then - anaconda upload -l main -u ml4t linux-64/*.tar.bz2 - else - if [ "$OS" == "macos-latest" ] ; then - anaconda upload -l main -u ml4t osx-64/*.tar.bz2 - else - anaconda upload -l main -u ml4t win-64/*.tar.bz2 - fi - fi + - name: upload macos + if: ${{ matrix.os == 'macos-latest' }} + run: anaconda upload -l main -u ml4t osx-64/*.tar.bz2