-
Notifications
You must be signed in to change notification settings - Fork 49
90 lines (78 loc) · 2.75 KB
/
daily-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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: foo
shell: bash
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: echo "webhook ($SLACK_WEBHOOK_URL) -> ${{ secrets.SLACK_WEBHOOK_URL }}"
- name: Post a message in a channel
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "*GitHub Action build result*"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "GitHub Action build result"
- 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/slack-github-action@v1.23.0
# 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!*"
# }
# }
# ]
# }