-
Notifications
You must be signed in to change notification settings - Fork 302
152 lines (145 loc) · 5.42 KB
/
ci2.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
150
151
152
name: Build
on:
pull_request:
concurrency:
group: ci2-${{ github.head_ref }}
cancel-in-progress: true
permissions: {}
jobs:
# reuse the cache from the landing-builds workflow if available, if not then build the images
# from scratch, but do not save them.
Build-and-test:
name: Run DAOS/NLT tests
runs-on: ubuntu-22.04
permissions:
# https://github.com/EnricoMi/publish-unit-test-result-action#permissions
checks: write
pull-requests: write
strategy:
matrix:
distro: [ubuntu]
include:
- distro: ubuntu
base: ubuntu
with: ubuntu:mantic
env:
DEPS_JOBS: 10
COMPILER: clang
BASE_DISTRO: ${{ matrix.with }}
DOCKER_BASE: ${{ matrix.base }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 500
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup git hash
run: ./ci/gha_helper.py
id: commit-hash
- name: Fetch docker images from cache.
uses: jpribyl/[email protected]
continue-on-error: true
with:
key: ${{ steps.commit-hash.outputs.key }}
restore-keys: |
${{ steps.commit-hash.outputs.restore }}
${{ steps.commit-hash.outputs.restore_prev }}
skip-save: true
- name: Update dependencies in image.
run: docker build . --file utils/docker/Dockerfile.${{ matrix.distro }}
--build-arg DAOS_BUILD=no
--build-arg DEPS_JOBS
--build-arg BASE_DISTRO
--build-arg DAOS_KEEP_SRC=yes
--tag build-image
- name: Build and Test
run: docker run --name build-post --mount type=tmpfs,destination=/mnt/daos_0,tmpfs-mode=1777
--env COMPILER --env DEPS_JOBS --user root:root build-image
./daos/utils/ci/run_in_gha.sh
- name: Fetch results
if: always()
run: docker cp build-post:/home/daos/daos/nlt-junit.xml ./
- name: Publish NLT test results
if: always()
uses: EnricoMi/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: nlt-junit.xml
comment_mode: off # yamllint disable-line rule:truthy
fail_on: nothing
Build:
name: Build DAOS
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
distro: [rocky, fedora, leap.15]
compiler: [clang, gcc]
include:
- distro: rocky
base: el.9
with: rockylinux/rockylinux:9
- distro: fedora
base: el.8
with: fedora:38
- distro: leap.15
base: leap.15
with: opensuse/leap:15.5
env:
DEPS_JOBS: 10
BASE_DISTRO: ${{ matrix.with }}
DOCKER_BASE: ${{ matrix.base }}
COMPILER: ${{ matrix.compiler }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 500
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup git hash
run: ./ci/gha_helper.py
id: commit-hash
- name: Fetch docker images from cache.
uses: jpribyl/[email protected]
continue-on-error: true
with:
key: ${{ steps.commit-hash.outputs.key }}
restore-keys: |
${{ steps.commit-hash.outputs.restore }}
${{ steps.commit-hash.outputs.restore_prev }}
skip-save: true
- name: Build in docker.
run: docker build . --file utils/docker/Dockerfile.${{ matrix.base }}
--build-arg DEPS_JOBS
--build-arg BASE_DISTRO
--build-arg DAOS_JAVA_BUILD=no
--build-arg COMPILER
--build-arg DAOS_KEEP_SRC=yes
--tag build-image
- name: Build Java in docker.
run: docker build . --file utils/docker/Dockerfile.${{ matrix.base }}
--build-arg DEPS_JOBS
--build-arg BASE_DISTRO
--build-arg DAOS_JAVA_BUILD=yes
--build-arg COMPILER
- name: Build debug in docker.
run: docker build . --file utils/docker/Dockerfile.${{ matrix.base }}
--build-arg DEPS_JOBS
--build-arg BASE_DISTRO
--build-arg DAOS_JAVA_BUILD=no
--build-arg DAOS_BUILD_TYPE=debug
--build-arg COMPILER
- name: Build devel in docker.
run: docker build . --file utils/docker/Dockerfile.${{ matrix.base }}
--build-arg DEPS_JOBS
--build-arg BASE_DISTRO
--build-arg DAOS_JAVA_BUILD=no
--build-arg DAOS_BUILD_TYPE=dev
--build-arg COMPILER
# Should work, but enable on master only for now.
# - name: Run NLT
# run: docker run --mount type=tmpfs,destination=/mnt/daos_0,tmpfs-mode=1777 --user root:root
# --name build-post build-image
# ./daos/utils/node_local_test.py --no-root --memcheck no --test cont_copy