-
Notifications
You must be signed in to change notification settings - Fork 65
131 lines (112 loc) · 3.51 KB
/
nightly_testing.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
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# SPDX-FileCopyrightText: Copyright 2021 Micron Technology, Inc.
name: Nightly Testing
on:
pull_request:
branches:
- master
- "v[0-9]+.[0-9]+"
paths:
- .github/workflows/nightly_testing.yaml
workflow_dispatch:
inputs:
branch:
description: "Branch to use"
required: true
default: "master"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions: {}
env:
MESON_TESTTHREADS: 1
jobs:
determine-tag:
runs-on: ubuntu-latest
continue-on-error: false
outputs:
tag: ${{ steps.determine-tag.outputs.tag }}
steps:
- name: Determine tag
id: determine-tag
run: |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
echo "tag=$GITHUB_BASE_REF" >> "$GITHUB_OUTPUT"
else
echo "tag=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
fi
nightly:
runs-on: ubuntu-latest
needs:
- determine-tag
container:
image: ghcr.io/hse-project/ci-images/ubuntu-20.04:${{ needs.determine-tag.outputs.tag }}
strategy:
fail-fast: false
matrix:
buildtype: [release, debug]
steps:
- name: Checkout HSE
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Determine branches
id: determine-branches
shell: sh +e {0}
run: |
for p in hse-java hse-python; do
branch=master
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
git ls-remote --exit-code --heads \
"https://github.com/hse-project/$p.git" "$GITHUB_HEAD_REF" \
> /dev/null
if [ $? -eq 0 ]; then
branch="$GITHUB_HEAD_REF"
fi
elif [ "$GITHUB_EVENT_NAME" = "release" ]; then
branch=$(git rev-parse --abbrev-ref HEAD)
else
git ls-remote --exit-code --heads \
"https://github.com/hse-project/$p.git" "$GITHUB_REF" \
> /dev/null
if [ $? -eq 0 ]; then
branch="$GITHUB_REF_NAME"
fi
fi
echo "$p=$branch" >> "$GITHUB_OUTPUT"
done
- name: Checkout hse-java
uses: actions/checkout@v3
with:
repository: hse-project/hse-java
path: subprojects/hse-java
ref: ${{ steps.determine-branches.outputs.hse-java }}
- name: Checkout hse-python
uses: actions/checkout@v3
with:
repository: hse-project/hse-python
path: subprojects/hse-python
- name: Cache Meson packagecache
uses: actions/cache@v3
with:
path: subprojects/packagecache
key: meson-packagecache-ubuntu-20.04-${{ hashFiles('subprojects/*.wrap') }}
- name: Setup
run: |
meson setup builddir --fatal-meson-warnings --werror \
--buildtype=${{ matrix.buildtype }} -Dtools=enabled \
-Ddocs=disabled -Dbindings=all
- name: Test
run: |
meson test -C builddir --suite=nightly-small --suite=hse-java \
--suite=hse-python --print-errorlogs --no-stdsplit
- uses: actions/upload-artifact@v3
if: failure()
with:
name: build-artifact-ubuntu-${{ matrix.buildtype }}
path: |
builddir/meson-logs/
/var/log/messages
/var/log/syslog
/var/log/kern.log