Skip to content

Commit

Permalink
Retire conda
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-cty committed Jun 26, 2024
1 parent 268b475 commit f656b60
Showing 1 changed file with 0 additions and 94 deletions.
94 changes: 0 additions & 94 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,97 +230,3 @@ jobs:
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_TOKEN
- name: Publish a git tag
run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh"

build-conda:
runs-on: "ubuntu-20.04"
needs: [ check-version-and-changelog ]
# Do not build on master, the artifact will be used
if: github.ref != 'refs/heads/master'
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.9.9"
# Add conda-forge for OpenFisca-Core
channels: openfisca,conda-forge
activate-environment: true
- uses: actions/checkout@v3
- name: Update meta.yaml
run: |
python3 -m pip install requests argparse
python3 .github/get_pypi_info.py -p OpenFisca-France
- name: Get version
run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV
- name: Conda Config
run: |
conda install conda-build anaconda-client
conda info
- name: Build Conda package
run: conda build -c openfisca -c conda-forge --croot /tmp/conda .conda
- name: Upload Conda build
uses: actions/upload-artifact@v3
with:
name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }}
path: /tmp/conda
retention-days: 30

test-on-windows:
runs-on: "windows-latest"
needs: [ build-conda ]
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.9.9"
# Add conda-forge for OpenFisca-Core
channels: openfisca,conda-forge
activate-environment: true
- uses: actions/checkout@v3
# - name: Test max path length
# run: "python3 openfisca_france/scripts/check_path_length.py"
- name: Get version
run: |
# chcp 65001 #set code page to utf-8
echo ("PACKAGE_VERSION=" + (python3 ./setup.py --version) ) >> $env:GITHUB_ENV
echo "Version setup.py: ${{ env.PACKAGE_VERSION }}"
- name: Download conda build
uses: actions/download-artifact@v3
with:
name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }}
path: conda-build-tmp
- name: Install with conda
run: |
conda install -c ./conda-build-tmp/noarch/openfisca-france-pension-dev-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-france-pension-dev
- name: openfisca test
run: openfisca test --country-package openfisca_france_pension tests

publish-to-conda:
runs-on: "ubuntu-20.04"
needs: [ deploy ]
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.9.9"
# Add conda-forge for OpenFisca-Core
channels: conda-forge
activate-environment: true
- name: Get source code
uses: actions/checkout@v3
- name: Get version
run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV
# Get the last commit hash on the PR (-2 : before the merge commit)
- uses: actions/github-script@v6
id: last_pr_commit
with:
script: |
const commits = ${{ toJSON(github.event.commits) }}
return commits.at(-2).id;
result-encoding: string
- name: Conda build and upload
# This shell is made necessary by https://github.com/conda-incubator/setup-miniconda/issues/128
shell: bash -l {0}
run: |
conda install --yes conda-build anaconda-client
conda config --set anaconda_upload yes
conda build --channel conda-forge --channel openfisca --token ${{ secrets.ANACONDA_TOKEN }} --user openfisca .conda

0 comments on commit f656b60

Please sign in to comment.