-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
84 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,127 +16,83 @@ jobs: | |
daily-ci: | ||
strategy: | ||
matrix: | ||
dependencies-factor: ["lowest-direct", "highest"] | ||
module-factor: ["cartesian", "eve", "next", "storage"] | ||
dependencies-factor: ["lowest-direct"] #, "highest"] | ||
module-factor: ["docs"] #""cartesian", "docs", "eve", "next", "storage"] | ||
os: ["ubuntu-latest"] #, "macos-latest"] | ||
python-version: ["3.10", "3.11"] | ||
python-version: ["3.10"] #, "3.11"] | ||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.os }} | ||
# runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get day of the week | ||
id: day_of_the_week | ||
run: echo "{day_of_the_week}={$(date +'%u')}" >> $GITHUB_STATE | ||
- name: Install C++ libraries | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
shell: bash | ||
run: brew install boost | ||
|
||
- name: Weekly notification | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
uses: slackapi/[email protected] | ||
- 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: | ||
channel-id: ${{ vars.SLACK_BOT_CHANNEL_TEST }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Weekly reminder to check the latest runs of the <https://github.com/GridTools/gt4py/actions/workflows/daily-ci.yml|GT4Py Daily CI> workflow at the <https://github.com/GridTools/gt4py/actions/|GitHub Actions dashboard>." | ||
} | ||
} | ||
] | ||
} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Test with environment variables | ||
if: ${{ env.day_of_the_week == '3' }} | ||
- 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 'test_${{ matrix.module-factor }}-${{ 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_TEST }} | ||
payload: | | ||
{ | ||
"text": "Failed tests for ${{ github.workflow }} with (component='${{ matrix.module-factor }} (CPU)', python='${{ matrix.python-version }}, [https://github.com/GridTools/gt4py/actions/runs/${{ github.run_id }}].", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "if3 Weekly reminder to check the latest runs of the <https://github.com/GridTools/gt4py/actions/workflows/daily-ci.yml|GT4Py Daily CI> workflow at the <https://github.com/GridTools/gt4py/actions/|GitHub Actions dashboard>." | ||
"text": "Failed tests: <https://github.com/GridTools/gt4py/actions/runs/${{ github.run_id }}|${{ github.workflow }}: **${{ matrix.module-factor }} (CPU)** for **Python-${{ matrix.python-version }}**>" | ||
} | ||
} | ||
] | ||
} | ||
- name: Test not | ||
if: ${{ env.day_of_the_week != '3' }} | ||
- id: get_day_of_the_week | ||
name: Get day of the week | ||
run: echo "day_of_week=$(date +'%u')" >> $GITHUB_OUTPUT | ||
|
||
- name: Weekly notification | ||
if: "env.DAY_OF_WEEK == 4" | ||
env: | ||
DAY_OF_WEEK: ${{ steps.get_day_of_the_week.outputs.day_of_week }} | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: ${{ vars.SLACK_BOT_CHANNEL_TEST }} | ||
payload: | | ||
{ | ||
"text": "Weekly reminder to check the latest runs of the GT4Py Daily CI workflow at the GitHub Actions dashboard [https://github.com/GridTools/gt4py/actions/workflows/daily-ci.yml].", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "ifnot3 Weekly reminder to check the latest runs of the <https://github.com/GridTools/gt4py/actions/workflows/daily-ci.yml|GT4Py Daily CI> workflow at the <https://github.com/GridTools/gt4py/actions/|GitHub Actions dashboard>." | ||
"text": "Weekly reminder to check the latest runs of the <https://github.com/GridTools/gt4py/actions/workflows/daily-ci.yml|GT4Py Daily CI> workflow at the GitHub Actions dashboard." | ||
} | ||
} | ||
] | ||
} | ||
# - 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 'test_${{ matrix.module-factor }}-${{ 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_TEST }} | ||
# # payload: | | ||
# # { | ||
# # "text": "${{ github.workflow }}: Daily CI: '**${{ matrix.module-factor }} (CPU)** for **Python-${{ matrix.python-version }}**>: *Failed tests!*" | ||
# # } | ||
# 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!*" | ||
# } | ||
# } | ||
# ] | ||
# } |