55 - cron : ' 0 4 * * *'
66 workflow_dispatch :
77
8- # # COMMENTED OUT: only for testing CI action changes
9- # pull_request:
10- # branches:
11- # - main
12- # # END
8+ # COMMENTED OUT: only for testing CI action changes
9+ pull_request :
10+ branches :
11+ - main
12+ # END
1313
1414jobs :
1515 daily-ci :
1616 strategy :
1717 matrix :
18+ dependencies-factor : ["lowest-direct", "highest"]
19+ module-factor : ["cartesian", "eve", "next", "storage"]
20+ os : ["ubuntu-latest"] # , "macos-latest"]
1821 python-version : ["3.10", "3.11"]
19- tox-module-factor : ["cartesian", "eve", "next", "storage"]
20- os : ["ubuntu-latest"]
21- requirements-file : ["requirements-dev.txt", "min-requirements-test.txt", "min-extra-requirements-test.txt"]
2222 fail-fast : false
2323
2424 runs-on : ${{ matrix.os }}
2525 steps :
2626 - uses : actions/checkout@v4
27+
2728 - name : Install C++ libraries
2829 if : ${{ matrix.os == 'macos-latest' }}
2930 shell : bash
30- run : |
31- brew install boost
31+ run : brew install boost
32+
3233 - name : Install C++ libraries
3334 if : ${{ matrix.os == 'ubuntu-latest' }}
3435 shell : bash
35- run : |
36- sudo apt install libboost-dev
37- - name : Set up Python ${{ matrix. python-version }}
38- uses : actions /setup-python @v5
36+ run : sudo apt install libboost-dev
37+
38+ - name : Install uv and set the python version
39+ uses : astral-sh /setup-uv @v5
3940 with :
41+ enable-cache : true
42+ cache-dependency-glob : " uv.lock"
4043 python-version : ${{ matrix.python-version }}
41- cache : ' pip'
42- cache-dependency-path : |
43- **/pyproject.toml
44- **/constraints.txt
45- **/requirements-dev.txt
46- - name : Install tox
47- run : |
48- python -m pip install -c ./constraints.txt pip setuptools wheel tox
49- python -m pip list
50- - name : Update requirements
51- run : |
52- pyversion=${{ matrix.python-version }}
53- pyversion_no_dot=${pyversion//./}
54- tox run -e requirements-py${pyversion_no_dot}
55- # TODO(egparedes): add notification for dependencies updates
56- # - name: Check for updated requirements
57- # id: update-requirements
58- # continue-on-error: true
59- # if: ${{ matrix.python-version == '3.8' && matrix.tox-module-factor == 'cartesian' }}
60- # shell: bash
61- # run: |
62- # if diff -q constraints.txt CURRENT-constraints.txt; then
63- # echo "REQS_DIFF=''" >> $GITHUB_OUTPUT
64- # else
65- # diff --changed-group-format='%<' --unchanged-group-format='' constraints.txt CURRENT-constraints.txt | tr '\n' ' ' > constraints.txt.diff
66- # echo "REQS_DIFF='$(cat constraints.txt.diff)'" >> $GITHUB_OUTPUT
67- # fi
68- # echo "REQS_DIFF_TEST="FOOOOOOOO" >> $GITHUB_OUTPUT
69- # - name: Notify updated requirements (if any)
70- # if: ${{ steps.update-requirements.outputs.REQS_DIFF }}
71- # env:
72- # SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
73- # uses: slackapi/slack-github-action@v1.23.0
74- # with:
75- # channel-id: ${{ vars.SLACK_BOT_CHANNEL }}
76- # payload: |
77- # {
78- # "text": "TEXT",
79- # "blocks": [
80- # {
81- # "type": "section",
82- # "text": {
83- # "type": "plain_text",
84- # "text": "@channel: AA/${{ steps.update-requirements.outputs.REQS_DIFF }}/BB/ ${{ steps.update-requirements.outputs.REQS_DIFF_TEST }} /CC"
85- # }
86- # },
87- # {
88- # "type": "section",
89- # "text": {
90- # "type": "mrkdwn",
91- # "text": "@channel: AA/${{ steps.update-requirements.outputs.REQS_DIFF }}/BB/ ${{ steps.update-requirements.outputs.REQS_DIFF_TEST }} /CC"
92- # }
93- # }
94- # ]
95- # }
96- - name : Run tests
44+
45+ # - name: Update requirements
46+ # run: uv lock --resolution=${{ matrix.dependencies-factor }} --prerelease=allow
47+
48+ - name : Run CPU tests for '${{ matrix.module-factor }}' with '${{ matrix.dependencies-factor }}' resolution strategy
9749 env :
9850 NUM_PROCESSES : auto
99- ENV_REQUIREMENTS_FILE : ${{ matrix.requirements-file }}
100- run : |
101- tox run --skip-missing-interpreters -m test-${{ matrix.tox-module-factor }}-cpu
51+ UV_RESOLUTION : ${{ matrix.dependencies-factor }}
52+ run : uv run nox -s '${{ matrix.module-factor }}_tests-${{ matrix.python-version }}' -t 'cpu'
53+
10254 - name : Notify slack
10355 if : ${{ failure() }}
10456 env :
@@ -108,13 +60,13 @@ jobs:
10860 channel-id : ${{ vars.SLACK_BOT_CHANNEL }}
10961 payload : |
11062 {
111- "text": "${{ github.workflow }}: `test- ${{ matrix.tox- module-factor }}-cpu (python ${{ matrix.python-version }})` >: *Failed tests!*",
63+ "text": "${{ github.workflow }}: `Daily CI: '** ${{ matrix.module-factor }} (CPU)** for **Python- ${{ matrix.python-version }}** >: *Failed tests!*",
11264 "blocks": [
11365 {
11466 "type": "section",
11567 "text": {
11668 "type": "mrkdwn",
117- "text": "<https://github.com/GridTools/gt4py/actions/runs/${{ github.run_id }}|${{ github.workflow }}: `test- ${{ matrix.tox- module-factor }}-cpu (python ${{ matrix.python-version }})` >: *Failed tests!*"
69+ "text": "<https://github.com/GridTools/gt4py/actions/runs/${{ github.run_id }}|${{ github.workflow }}: ** ${{ matrix.module-factor }} (CPU)** for **Python- ${{ matrix.python-version }}** >: *Failed tests!*"
11870 }
11971 }
12072 ]
0 commit comments