-
Notifications
You must be signed in to change notification settings - Fork 84
148 lines (130 loc) · 4.17 KB
/
Copy pathconda.yml
File metadata and controls
148 lines (130 loc) · 4.17 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Conda End-to-end Test
env:
SANITIZER_CI_SCHEDULE: '25 6 * * 5'
on:
push:
branches:
- main
paths-ignore:
- LICENSE
- NOTICE
- README.md
- "docs/**"
pull_request:
branches:
- main
paths-ignore:
- LICENSE
- NOTICE
- README.md
- "docs/**"
workflow_dispatch:
inputs:
sanitizer:
description: "Run sanitized build"
required: false
type: boolean
default: false
schedule:
# Run conda CI on Monday and Thursday at 1:25am EST (06:25 UTC)
# Run conda sanitized builds on Fridays at 1:25 am EST (06:25 UTC)
- cron: '25 6 * * 1,4,5'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
checks: write
jobs:
initialize:
runs-on: ubuntu-24.04
outputs:
SANITIZER: ${{ steps.setupmanual.outputs.SANITIZER || steps.setupschedule.outputs.SANITIZER }}
steps:
- name: Display and Setup Build Args (Manual)
id: setupmanual
run: |
echo "Sanitizer: $SANITIZER"
echo "SANITIZER=$SANITIZER" >> $GITHUB_OUTPUT
env:
SANITIZER: ${{ github.event.inputs.sanitizer }}
if: ${{ github.event_name == 'workflow_dispatch' }}
- name: Display and Setup Build Args (Schedule)
id: setupschedule
run: |
echo "Sanitizer: $SANITIZER"
echo "SANITIZER=$SANITIZER" >> $GITHUB_OUTPUT
env:
SANITIZER: ${{ github.event.schedule == env.SANITIZER_CI_SCHEDULE }}
if: ${{ github.event_name == 'schedule' }}
build:
needs:
- initialize
strategy:
matrix:
os:
- ubuntu-24.04
- macos-14
- windows-2022
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '2.3.2-0'
environment-file: conda/dev-environment-unix.yml
init-shell: >-
bash
cache-environment: true
cache-downloads: true
post-cleanup: 'all'
if: ${{ runner.os != 'Windows' }}
- uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '2.3.2-0'
environment-file: conda/dev-environment-win.yml
init-shell: >-
cmd.exe
cache-environment: true
cache-downloads: true
post-cleanup: 'all'
if: ${{ runner.os == 'Windows' }}
- name: Set up Caches
uses: ./.github/actions/setup-caches
with:
vcpkg: false
- name: Python Lint Steps
run: make lint
shell: micromamba-shell {0}
if: ${{ runner.os != 'Windows' }}
- name: Python Lint Steps (Windows)
run: make lint
shell: cmd /C call {0}
if: ${{ runner.os == 'Windows' }}
- name: Python Build Steps (Linux)
run: make build-conda ${{ needs.initialize.outputs.SANITIZER == 'true' && 'ASAN="ON" UBSAN="ON"' || '' }}
shell: micromamba-shell {0}
if: ${{ runner.os == 'Linux' }}
- name: Python Build Steps (macOS)
run: make build-conda
shell: micromamba-shell {0}
if: ${{ runner.os == 'macOS' }}
- name: Python Build Steps (Windows)
env:
CSP_GENERATOR: "Visual Studio 17 2022"
run: make build-conda
shell: cmd /C call {0}
if: ${{ runner.os == 'Windows' }}
- name: Python Test Steps
run: make test
shell: micromamba-shell {0}
if: ${{ runner.os != 'Windows' && needs.initialize.outputs.SANITIZER == 'false' }}
- name: Python Test Steps (Sanitizer)
run: make test-sanitizer
shell: micromamba-shell {0}
if: ${{ runner.os != 'Windows' && needs.initialize.outputs.SANITIZER == 'true' }}
- name: Python Test Steps ( Windows )
run: make test
shell: cmd /C call {0}
if: ${{ runner.os == 'Windows' }}