[build] Migrate to uv #808
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily CI | |
on: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
# COMMENTED OUT: only for testing CI action changes | |
pull_request: | |
branches: | |
- main | |
# END | |
jobs: | |
daily-ci: | |
strategy: | |
matrix: | |
dependencies-factor: ["lowest-direct", "highest"] | |
module-factor: ["cartesian", "eve", "next", "storage"] | |
os: ["ubuntu-latest"] #, "macos-latest"] | |
python-version: ["3.10", "3.11"] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Post blocks to a Slack channel | |
uses: slackapi/[email protected] | |
with: | |
method: chat.postMessage | |
token: ${{ secrets.SLACK_BOT_TOKEN }} | |
payload: | | |
channel: ${{ vars.SLACK_BOT_CHANNEL }} | |
text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" | |
blocks: | |
- type: "section" | |
text: | |
type: "mrkdwn" | |
text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" | |
- uses: actions/checkout@v4 | |
- name: Install C++ libraries | |
if: ${{ matrix.os == 'macos-latest' }} | |
shell: bash | |
run: brew install boost | |
- name: Install C++ libraries | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
shell: bash | |
run: sudo apt install libboost-dev | |
- name: Install uv and set the python version | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
python-version: ${{ matrix.python-version }} | |
- name: Run CPU tests for '${{ matrix.module-factor }}' with '${{ matrix.dependencies-factor }}' resolution strategy | |
env: | |
NUM_PROCESSES: auto | |
UV_RESOLUTION: ${{ matrix.dependencies-factor }} | |
run: uv run nox -s '${{ matrix.module-factor }}_tests-${{ matrix.python-version }}' -t 'cpu' | |
# - name: Notify slack | |
# if: ${{ failure() }} | |
# env: | |
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
# uses: slackapi/[email protected] | |
# with: | |
# channel-id: ${{ vars.SLACK_BOT_CHANNEL }} | |
# payload: | | |
# { | |
# "text": "${{ github.workflow }}: `Daily CI: '**${{ matrix.module-factor }} (CPU)** for **Python-${{ matrix.python-version }}**>: *Failed tests!*", | |
# "blocks": [ | |
# { | |
# "type": "section", | |
# "text": { | |
# "type": "mrkdwn", | |
# "text": "<https://github.com/GridTools/gt4py/actions/runs/${{ github.run_id }}|${{ github.workflow }}: **${{ matrix.module-factor }} (CPU)** for **Python-${{ matrix.python-version }}**>: *Failed tests!*" | |
# } | |
# } | |
# ] | |
# } |