Skip to content

Commit 8461942

Browse files
committed
ci: fix build order
1 parent 4db7e0f commit 8461942

File tree

12 files changed

+54
-67
lines changed

12 files changed

+54
-67
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
numpy:
2+
- 1.24
3+
- 1.25
4+
- 1.26
5+
6+
python:
7+
- 3.9
8+
- 3.10
9+
- 3.11

.conda/openfisca-core/meta.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,22 @@ build:
2424

2525
requirements:
2626
host:
27-
- python
2827
- pip
28+
- python
29+
- setuptools >=61.0
2930
run:
31+
- numpy
32+
- python
3033
{% for req in data['install_requires'] %}
34+
{% if not req.startswith('numpy') %}
3135
- {{ req }}
36+
{% endif %}
3237
{% endfor %}
3338

3439
test:
3540
imports:
3641
- openfisca_core
3742
- openfisca_core.commons
38-
requires:
39-
- pip
40-
commands:
41-
- pip check
42-
- openfisca --help
43-
- openfisca-run-test --help
4443

4544
outputs:
4645
- name: openfisca-core
@@ -52,7 +51,7 @@ outputs:
5251
host:
5352
- python
5453
run:
55-
- python >=3.9,<4.0
54+
- python
5655
{% for req in data['extras_require']['web-api'] %}
5756
- {{ req }}
5857
{% endfor %}
@@ -65,9 +64,7 @@ outputs:
6564
host:
6665
- python
6766
run:
68-
- python >=3.9,<4.0
69-
- openfisca-country-template
70-
- openfisca-extension-template
67+
- python
7168
{% for req in data['extras_require']['dev'] %}
7269
- {{ req }}
7370
{% endfor %}

.conda/openfisca-country-template/recipe.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,19 @@ build:
1818

1919
requirements:
2020
host:
21-
- python
21+
- numpy
2222
- pip
23+
- python
24+
- setuptools >=61.0
2325
run:
26+
- numpy
2427
- python
28+
- openfisca-core >=42,<43
2529

2630
tests:
2731
- python:
2832
imports:
2933
- openfisca_country_template
30-
- requirements:
31-
run:
32-
- pip
33-
script:
34-
- pip check
3534

3635
about:
3736
summary: OpenFisca Rules as Code model for Country-Template.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
numpy:
2+
- "1.26"
3+
14
python:
2-
- 3.9
3-
- 3.10
4-
- 3.11
5+
- "3.10"

.conda/openfisca-extension-template/recipe.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,19 @@ build:
1818

1919
requirements:
2020
host:
21+
- numpy
22+
- pip
2123
- python
2224
- setuptools >=61.0
23-
- pip
2425
run:
26+
- numpy
2527
- python
28+
- openfisca-country-template >=7,<8
2629

2730
tests:
2831
- python:
2932
imports:
3033
- openfisca_extension_template
31-
- requirements:
32-
run:
33-
- pip
34-
script:
35-
- pip check
3634

3735
about:
3836
summary: An OpenFisca extension that adds some variables to an already-existing
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
numpy:
2+
- "1.26"
3+
14
python:
2-
- 3.9
3-
- 3.10
4-
- 3.11
5+
- "3.10"

.conda/pylint-per-file-ignores/recipe.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ tests:
3030
- python:
3131
imports:
3232
- pylint_per_file_ignores
33-
- requirements:
34-
run:
35-
- pip
36-
script:
37-
- pip check
3833

3934
about:
4035
summary: A pylint plugin to ignore error codes per file.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
python:
2-
- 3.9
3-
- 3.10
4-
- 3.11
2+
- "3.10"

.github/workflows/_before-conda.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ jobs:
7979
environment-file: .env.yaml
8080
if: steps.cache-env.outputs.cache-hit == 'true'
8181

82-
- name: Build country template package
83-
run: |
84-
rattler-build build \
85-
--recipe .conda/openfisca-country-template \
86-
--output-dir ~/conda-rel \
87-
--no-test
88-
89-
- name: Build extension template package
90-
run: |
91-
rattler-build build \
92-
--recipe .conda/openfisca-extension-template \
93-
--output-dir ~/conda-rel \
94-
--no-test
95-
9682
- name: Build pylint plugin package
9783
run: |
9884
rattler-build build \
@@ -101,13 +87,24 @@ jobs:
10187
10288
- name: Build core package
10389
run: |
104-
mkdir -p ~/conda-rel
10590
conda build .conda/openfisca-core \
10691
--use-local \
10792
--no-anaconda-upload \
10893
--output-folder ~/conda-rel \
10994
--numpy ${{ inputs.numpy }} \
11095
--python ${{ inputs.python }}
11196
97+
- name: Build country template package
98+
run: |
99+
rattler-build build \
100+
--recipe .conda/openfisca-country-template \
101+
--output-dir ~/conda-rel \
102+
103+
- name: Build extension template package
104+
run: |
105+
rattler-build build \
106+
--recipe .conda/openfisca-extension-template \
107+
--output-dir ~/conda-rel
108+
112109
- name: Export env
113110
run: conda env export --name openfisca > .env.yaml

.github/workflows/_test-conda.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ jobs:
5858
auto-update-conda: true
5959
environment-file: .env.yaml
6060

61-
- name: Install core
62-
run: conda install openfisca-core-dev --channel file:///home/runner/conda-rel
61+
- name: Install packages
62+
run: |
63+
conda install --channel file:///home/runner/conda-rel \
64+
openfisca-core-dev \
65+
openfisca-country-template \
66+
openfisca-extension-template
6367
6468
- name: Run core tests
6569
run: make test-core

.github/workflows/merge.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,6 @@ jobs:
209209
- name: Publish to conda
210210
shell: bash -l {0}
211211
run: |
212-
anaconda upload ~/conda-rel/noarch/openfisca-extension-template-* \
213-
--token ${{ secrets.ANACONDA_TOKEN }}
214-
--user openfisca
215-
--force
216-
anaconda upload ~/conda-rel/noarch/openfisca-country-template-* \
217-
--token ${{ secrets.ANACONDA_TOKEN }}
218-
--user openfisca
219-
--force
220-
anaconda upload ~/conda-rel/noarch/pylint-per-file-ignores-* \
221-
--token ${{ secrets.ANACONDA_TOKEN }}
222-
--user openfisca
223-
--force
224212
anaconda upload ~/conda-rel/noarch/openfisca-core-* \
225213
--token ${{ secrets.ANACONDA_TOKEN }}
226214
--user openfisca

.github/workflows/push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
numpy: [1.26.4, 1.24.2]
1818
# Patch version must be specified to avoid any cache confusion, since
1919
# the cache key depends on the full Python version. If left unspecified,
20-
# different patch versions could be allocated between jobs, and any
20+
# different patch versions could be allocated between jobs, and any
2121
# such difference would lead to a cache not found error.
2222
python: [3.11.9, 3.9.13]
2323
include:

0 commit comments

Comments
 (0)