|
9 | 9 | # Versions disponibles visibles sur https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json |
10 | 10 | DEFAULT_PYTHON_VERSION: &upper_pyver 3.13.11 |
11 | 11 | MIN_PYTHON_VERSION: &min_pyver 3.10.11 |
12 | | - # Et sur https://anaconda.org/anaconda/python/files pour Conda. |
13 | | - # Mais la 3.13.11 disponible ne fonctionnait pas pour autant pour des problème de dépendances. |
14 | | - # On reste donc en 3.10.11 dans l'attente de la suppression de Conda. |
15 | | - CONDA_PYTHON_VERSION: &conda_pyver 3.10.11 |
16 | 12 |
|
17 | 13 | jobs: |
18 | 14 | build: |
|
52 | 48 | path: dist |
53 | 49 | key: release-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-${{ matrix.os }}-${{ matrix.openfisca-dependencies }} |
54 | 50 |
|
55 | | - build-and-test-conda: |
56 | | - runs-on: windows-latest |
57 | | - steps: |
58 | | - - name: Checkout |
59 | | - uses: actions/checkout@v4 |
60 | | - - name: Cache build |
61 | | - uses: actions/cache@v4 |
62 | | - with: |
63 | | - path: ./conda-bld |
64 | | - key: build-conda-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} |
65 | | - enableCrossOsArchive: true |
66 | | - - name: set version |
67 | | - run: | |
68 | | - python3 .github/pyproject_version.py --replace True |
69 | | - - name: Build conda package |
70 | | - uses: prefix-dev/rattler-build-action@v0.2.16 |
71 | | - with: |
72 | | - build-args: --quiet --channel openfisca --channel conda-forge --output-dir ./conda-bld |
73 | | - recipe-path: .conda/recipe.yaml |
74 | | - upload-artifact: false |
75 | | - - name: Setup conda |
76 | | - uses: conda-incubator/setup-miniconda@v3 |
77 | | - with: |
78 | | - activate-environment: openfisca |
79 | | - miniforge-version: latest |
80 | | - python-version: ${{ env.CONDA_PYTHON_VERSION }} |
81 | | - use-mamba: true |
82 | | - channels: conda-forge,defaults |
83 | | - - name: Install package |
84 | | - shell: pwsh |
85 | | - run: mamba install --channel ./conda-bld --channel openfisca openfisca-france |
86 | | - - name: Test openfisca-france conda package |
87 | | - shell: pwsh |
88 | | - run: openfisca test tests/formulas/irpp.yaml |
89 | | - |
90 | 51 | lint-files: |
91 | 52 | runs-on: ubuntu-24.04 |
92 | 53 | strategy: |
@@ -237,36 +198,6 @@ jobs: |
237 | 198 | shell: pwsh |
238 | 199 | run: uv run openfisca test --country-package openfisca_france tests/formulas/irpp.yaml |
239 | 200 |
|
240 | | - test-on-windows-conda: |
241 | | - runs-on: windows-latest |
242 | | - if: github.ref == 'refs/heads/master' # Only triggered for the `master` branch |
243 | | - needs: [ build-and-test-conda ] |
244 | | - steps: |
245 | | - # Checkout needed to get github.sha |
246 | | - - uses: actions/checkout@v4 |
247 | | - - uses: conda-incubator/setup-miniconda@v3 |
248 | | - with: |
249 | | - activate-environment: openfisca |
250 | | - miniforge-version: latest |
251 | | - python-version: ${{ env.CONDA_PYTHON_VERSION }} |
252 | | - use-mamba: true |
253 | | - channels: conda-forge,defaults |
254 | | - - name: Restore build |
255 | | - uses: actions/cache@v4 |
256 | | - with: |
257 | | - path: ./conda-bld |
258 | | - key: build-conda-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} |
259 | | - fail-on-cache-miss: true |
260 | | - enableCrossOsArchive: true |
261 | | - - name: Test max path length |
262 | | - run: "python3 openfisca_france/scripts/check_path_length.py" |
263 | | - - name: Install package |
264 | | - shell: pwsh |
265 | | - run: mamba install --channel ./conda-bld --channel openfisca openfisca-france |
266 | | - - name: Test conda package |
267 | | - shell: pwsh |
268 | | - run: openfisca test tests/formulas/irpp.yaml |
269 | | - |
270 | 201 | check-version-and-changelog: |
271 | 202 | runs-on: ubuntu-24.04 |
272 | 203 | needs: [ lint-files, test-python, test-yaml, test-api ] # Last job to run |
@@ -335,34 +266,3 @@ jobs: |
335 | 266 | run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_TOKEN |
336 | 267 | - name: Publish a git tag |
337 | 268 | run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh" |
338 | | - |
339 | | - publish-to-conda: |
340 | | - runs-on: windows-latest |
341 | | - needs: [ deploy, test-on-windows-conda ] |
342 | | - steps: |
343 | | - - uses: actions/checkout@v4 |
344 | | - - name: Restore build |
345 | | - uses: actions/cache@v4 |
346 | | - with: |
347 | | - path: ./conda-bld |
348 | | - key: build-conda-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} |
349 | | - fail-on-cache-miss: true |
350 | | - enableCrossOsArchive: true |
351 | | - - uses: conda-incubator/setup-miniconda@v3 |
352 | | - with: |
353 | | - activate-environment: openfisca |
354 | | - miniforge-version: latest |
355 | | - python-version: ${{ env.CONDA_PYTHON_VERSION }} |
356 | | - use-mamba: true |
357 | | - channels: conda-forge,defaults |
358 | | - - name: Install package |
359 | | - shell: pwsh |
360 | | - run: mamba install --channel ./conda-bld --channel openfisca openfisca-france |
361 | | - - name: Test conda package |
362 | | - shell: pwsh |
363 | | - run: openfisca test tests/formulas/irpp.yaml |
364 | | - - name: Conda upload already built package |
365 | | - shell: pwsh |
366 | | - run: | |
367 | | - conda install --yes anaconda-client |
368 | | - anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --user openfisca ./conda-bld\noarch\openfisca-france-* |
0 commit comments