-
Notifications
You must be signed in to change notification settings - Fork 132
136 lines (113 loc) · 5.34 KB
/
test.yaml
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
name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types: [opened, labeled, reopened, synchronize]
push:
branches:
- "trunk-*"
workflow_dispatch:
jobs:
start_action_runners:
name: Start
uses: glotzerlab/jetstream2-admin/.github/workflows/start.yaml@c89b62aa89f7886318edb166bc0500cfc658f24f # v1.3.0
secrets: inherit
typical:
name: "${{ join(matrix.compiler, '') }}-py${{ matrix.python }}-${{ join(matrix.config, '-') }}"
needs: start_action_runners
uses: ./.github/workflows/build_and_test.yaml
with:
compiler_family: ${{ matrix.compiler[0] }}
compiler_version: ${{ matrix.compiler[1] }}
config: ${{ join(matrix.config, '_') }}
# Use self-hosted runners or fall back to GitHub hosted runners when self-hosted are offline.
# When using GitHub hosted runners, no container image is needed.
# TODO: test failure mode
build_runner: ${{ needs.start_action_runners.outputs.active != '8' && '["self-hosted","jetstream2","CPU"]' || toJson(matrix.image) }}
# Note: Ternary "operators" have very strange behavior. This ordering is required:
# https://7tonshark.com/posts/github-actions-string-operations/
build_image: ${{ needs.start_action_runners.outputs.active != '8' && format('glotzerlab/ci:{0}',matrix.image) || ''}}
test_docker_options: ${{ matrix.test_docker_options }}
test_runner: ${{ !matrix.test_runner == toJson(matrix.test_runner) || toJson(matrix.image) }}
test_image: ${{ !matrix.test_runner && format('glotzerlab/ci:{0}',matrix.image) || '' }}
# Default to false when unset
validate: ${{ !matrix.validate && matrix.validate || 'false'}}
python: ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
include:
# TESTING: Limit test matrix
- config: [mpi, tbb]
python: "312"
compiler: [clang, 18]
validate: 'true'
image: 'ubuntu-24.04'
# - config: [gcc13_py312]
# validate: 'true'
# - config: [cuda120_gcc11_py310, mpi, llvm]
# test_runner: [self-hosted,GPU]
# test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl'
# validate: 'true'
# - config: [cuda120_gcc11_py310]
# test_runner: [self-hosted,GPU]
# test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl'
# validate: 'true'
# - config: [gcc14_py312, nomd]
# - config: [gcc14_py312, nohpmc]
- config: [nomd, nohpmc]
python: "312"
compiler: [gcc, 14]
image: 'ubuntu-24.04'
# - config: [cuda120_gcc11_py310, mpi, llvm, debug]
# test_runner: [self-hosted,GPU]
# test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl'
# - config: [gcc9_py39]
# release:
# if: ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
# name: "${{ join(matrix.config, '_') }}"
# needs: start_action_runners
# uses: ./.github/workflows/build_and_test.yaml
# with:
# config: ${{ join(matrix.config, '_') }}
# image: glotzerlab/ci:2024.06.04-${{ matrix.config[0] }}
# # Use self-hosted runners or fall back to GitHub hosted runners when self-hosted are offline
# build_runner: ${{ needs.start_action_runners.outputs.active == '0' && toJson('ubuntu-latest') || '["self-hosted","jetstream2","CPU"]' }}
# # Default to ubuntu-latest when unset
# test_runner: ${{ matrix.test_runner == '' && toJson('ubuntu-latest') || toJson(matrix.test_runner) }}
# test_docker_options: ${{ matrix.test_docker_options }}
# # Default to false when unset
# validate: ${{ matrix.validate == '' && 'false' || matrix.validate }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - config: [clang18_py312, mpi]
# - config: [clang17_py312, mpi]
# - config: [clang16_py312, mpi, llvm]
# - config: [clang15_py312, mpi, llvm]
# - config: [clang14_py311, mpi, tbb, llvm]
# - config: [clang13_py310, llvm]
# - config: [clang12_py310, llvm]
# - config: [clang11_py310, llvm]
# - config: [gcc13_py312, mpi]
# - config: [gcc12_py311]
# - config: [gcc11_py310]
# - config: [gcc10_py310]
# - config: [cuda118_gcc11_py310, mpi, llvm]
# test_runner: [self-hosted,GPU]
# test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl'
# - config: [cuda117_gcc11_py310, mpi, llvm]
# test_runner: [self-hosted,GPU]
# test_docker_options: '--gpus=all --device /dev/nvidia0 --device /dev/nvidia1 --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl'
tests_complete:
name: Unit test
if: always()
needs: [typical]
runs-on: ubuntu-latest
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0