Skip to content

Commit

Permalink
Remove conda stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Oct 1, 2024
1 parent 2dc270b commit d29865a
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 91 deletions.
Empty file modified .github/get_pypi_info.py
100644 → 100755
Empty file.
182 changes: 91 additions & 91 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,96 +231,96 @@ jobs:
- 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-Tunisia
- 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
# 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-Tunisia
# - 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_tunisia/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-tunisia-dev-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-tunisia-dev
- name: openfisca test
run: openfisca test --country-package openfisca_tunisia tests
# 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_tunisia/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-tunisia-dev-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-tunisia-dev
# - name: openfisca test
# run: openfisca test --country-package openfisca_tunisia 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
# 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 d29865a

Please sign in to comment.