-
Notifications
You must be signed in to change notification settings - Fork 11
208 lines (200 loc) · 5.82 KB
/
Copy pathbuild-and-test.yml
File metadata and controls
208 lines (200 loc) · 5.82 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: Build and test installer
on:
push:
# Only build for pushes to branches
branches:
- main
tags-ignore:
- '**'
pull_request:
branches:
- main
schedule:
- cron: '6 2 * * *'
workflow_dispatch:
jobs:
build-installer:
name: Build installer
if: github.repository == 'DIRACGrid/DIRACOS2'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target_arch: linux-64
os: ubuntu-latest
- target_arch: linux-aarch64
os: ubuntu-24.04-arm
- target_arch: osx-arm64
os: macos-14
- target_arch: osx-64
os: macos-15-intel
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.9.6
with:
cache: true
- name: Build installer
run: pixi run build-installer
- name: Upload installer
uses: actions/upload-artifact@v7
with:
name: installer-${{ matrix.target_arch }}
path: DIRACOS-*.sh
get-info:
name: Create environment.yaml
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: build-installer
runs-on: ubuntu-latest
strategy:
matrix:
target_arch: ["linux-64"]
steps:
- name: Download installer
uses: actions/download-artifact@v8
with:
name: installer-${{ matrix.target_arch }}
- name: Generate environment.yaml
run: |
bash DIRACOS-*.sh
source diracos/diracosrc
conda env export --file environment.yaml --prefix $DIRACOS
- name: Upload environment.yaml
uses: actions/upload-artifact@v7
with:
name: environment-yaml-${{ matrix.target_arch }}
path: |
environment.yaml
release-notes:
name: Show release notes and diff
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: get-info
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.9.6
with:
cache: true
environments: release
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Create release notes
run: |
pixi run -e release release-notes \
--token="${{ secrets.GITHUB_TOKEN }}" \
--artifacts-dir="${PWD}/artifacts" \
> release-notes.md
cat release-notes.md
- name: Upload release-notes.md
uses: actions/upload-artifact@v7
with:
name: release-notes
path: |
release-notes.md
basic-tests:
name: Basic tests
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: build-installer
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# x86_64 tests: run against varous EL versions with the linux-64 installer
- os: ubuntu-latest
docker_image: almalinux:8
installer: installer-linux-64
- os: ubuntu-latest
docker_image: almalinux:9
installer: installer-linux-64
- os: ubuntu-latest
docker_image: almalinux:10
installer: installer-linux-64
# ARM tests: run only AlmaLinux 9 tests with the linux-aarch64 installer
- os: ubuntu-24.04-arm
docker_image: almalinux:9
installer: installer-linux-aarch64
steps:
- uses: actions/checkout@v7
- name: Download installer
uses: actions/download-artifact@v8
with:
name: ${{ matrix.installer }}
- name: Run tests
run: scripts/run_basic_tests.sh ${{ matrix.docker_image }} DIRACOS-*.sh
macos-64-tests:
name: macOS (x86_64) tests
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: build-installer
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15-intel]
steps:
- uses: actions/checkout@v7
- name: Download installer
uses: actions/download-artifact@v8
with:
name: installer-osx-64
- name: Run tests
run: |
bash DIRACOS-*.sh
set -x
source diracos/diracosrc
pip install DIRAC
macos-tests:
name: macOS (arm64) tests
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: build-installer
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-15]
steps:
- uses: actions/checkout@v7
- name: Download installer
uses: actions/download-artifact@v8
with:
name: installer-osx-arm64
- name: Run tests
run: |
bash DIRACOS-*.sh
set -x
source diracos/diracosrc
pip install DIRAC
integration-tests-client-and-server:
name: Integration tests (Py3 server)
if: github.repository == 'DIRACGrid/DIRACOS2'
needs: build-installer
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dirac-branch:
- rel-v8r0
- rel-v9r0
- integration
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Download installer
uses: actions/download-artifact@v8
with:
name: installer-linux-64
- name: Prepare environment
run: |
pip install typer pyyaml gitpython packaging
git clone https://github.com/DIRACGrid/DIRAC.git -b "${{ matrix.dirac-branch }}" DIRACRepo
- name: Run tests
run: |
DIRACOS_TARBALL_PATH=$(echo ${PWD}/DIRACOS-*.sh)
echo "DIRACOS_TARBALL_PATH is ${DIRACOS_TARBALL_PATH}"
cd DIRACRepo
./integration_tests.py create \
"DIRACOS_TARBALL_PATH=${DIRACOS_TARBALL_PATH}"