-
Notifications
You must be signed in to change notification settings - Fork 256
149 lines (134 loc) · 3.67 KB
/
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
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
name: "ci"
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container: quay.io/sssd/ci-client-devel:latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
id: dependencies
uses: ./.github/actions/install-dependencies
- name: Configure sssd
uses: ./.github/actions/configure
- name: make
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make CFLAGS+="$SSS_WARNINGS -Werror"
- name: make check
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make CFLAGS+="$SSS_WARNINGS -Werror" check
- name: make distcheck
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make distcheck
- uses: actions/upload-artifact@v4
if: always()
with:
name: build
path: |
x86_64/config.log
x86_64/config.h
x86_64/test-suite.log
if-no-files-found: ignore
prepare:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Get matrix
id: matrix
run: ./contrib/ci/get-matrix.py --action
intgcheck:
needs: [prepare, build]
strategy:
fail-fast: false
matrix:
tag: ${{ fromJson(needs.prepare.outputs.matrix).intgcheck }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: sssd
- name: Setup containers
uses: SSSD/sssd-ci-containers/actions/setup@master
with:
path: sssd-ci-containers
tag: ${{ matrix.tag }}
limit: dns client
override: |
services:
client:
image: ${REGISTRY}/ci-client-devel:${TAG}
volumes:
- ../sssd:/sssd:rw
- name: Run integration tests
uses: SSSD/sssd-ci-containers/actions/exec@master
with:
working-directory: /sssd
script: ./contrib/ci/run --moderate
- name: Print logs
uses: next-actions/print-logs@master
if: always()
with:
working-directory: ./sssd/ci-build-debug
files: |
test-suite.log
ci-make-intgcheck.log
ci-make-distcheck.log
- name: Upload main artifacts
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.tag }}-intgcheck
path: |
./sssd/var/log/sssd/*.log
./sssd/ci-build-debug/ci-*.log
./sssd/ci-build-debug/config.log
./sssd/ci-build-debug/test-suite.log
./sssd/ci-build-debug/ci-mock-result/*.log
./sssd/ci-build-debug/src/tests/cwrap/test-suite.log
- name: Upload valgrind artifacts
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.tag }}-intgcheck-valgrind
path: |
./sssd/ci-build-debug/*.valgrind.log
result:
name: All tests are successful
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [build, intgcheck]
steps:
- name: Fail on failure
if: |
needs.build.result != 'success'
|| needs.intgcheck.result != 'success'
run: exit 1