Skip to content

Commit

Permalink
ci: fix conda
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Oct 1, 2024
1 parent afca357 commit 3fb834c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,34 +172,6 @@ jobs:
https://api.github.com/repos/openfisca/openfisca-doc/actions/workflows/deploy.yaml/dispatches \
-d '{"ref":"main"}'
build-conda:
runs-on: ubuntu-22.04
needs: [setup]
# 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.10.6
# Add conda-forge for OpenFisca-Core
channels: conda-forge
activate-environment: true
- uses: actions/checkout@v4
- name: Display version
run: echo "version=`python setup.py --version`"
- name: Conda Config
run: |
conda install conda-build anaconda-client
conda info
- name: Build Conda package
run: conda build --croot /tmp/conda .conda
- name: Upload Conda build
uses: actions/upload-artifact@v3
with:
name: conda-build-`python setup.py --version`-${{ github.sha }}
path: /tmp/conda

publish-to-conda:
runs-on: ubuntu-22.04
needs: [publish-to-pypi]
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,41 @@ jobs:
python: ${{ matrix.python }}
activate_command: source venv/bin/activate

build-conda:
runs-on: ubuntu-22.04
needs: [setup]
# 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.10.6
# Add conda-forge for OpenFisca-Core
channels: conda-forge
activate-environment: true
- uses: actions/checkout@v4
- name: Display version
run: echo "version=`python setup.py --version`"
- name: Conda Config
run: |
conda install conda-build anaconda-client
conda info
- name: Build Conda package
run: conda build --croot /tmp/conda .conda
- name: Upload Conda build
uses: actions/upload-artifact@v3
with:
name: conda-build-`python setup.py --version`-${{ github.sha }}
path: /tmp/conda

# The idea behind these dependencies is we want to give feedback to
# contributors on the version number only after they have passed all tests,
# so they don't have to do it twice after changes happened to the main branch
# during the time they took to fix the tests.
check-version:
runs-on: ubuntu-22.04
needs: [test, lint]
needs: [test, lint, build-conda]

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 3fb834c

Please sign in to comment.