blob: b64fe018310a49fd10d57e12c736a1d002f104b3 (
plain)
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
|
name: Test Mixed Version Clusters
on:
push:
branches:
- main
- v3.11.x
- v3.10.x
- v3.9.x
- v3.8.x
- bump-otp-*
- bump-elixir-*
- bump-rbe-*
- bump-rules_erlang
paths:
- 'deps/**'
- 'scripts/**'
- Makefile
- plugins.mk
- rabbitmq-components.mk
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- .github/workflows/test-mixed-versions.yaml
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-mixed-versions:
name: Test (Mixed Version Cluster)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
otp_version_id:
- "25_1"
timeout-minutes: 120
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: MOUNT BAZEL CACHE
uses: actions/cache@v3.0.11
with:
path: "/home/runner/repo-cache/"
key: repo-cache
- name: CONFIGURE BAZEL
run: |
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
EOF
fi
cat << EOF >> user.bazelrc
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PUBLIC
build:buildbuddy --repository_cache=/home/runner/repo-cache/
build:buildbuddy --color=yes
build:buildbuddy --disk_cache=
EOF
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN TESTS
run: |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
bazelisk test //... \
--config=rbe-${{ matrix.otp_version_id }} \
--test_tag_filters=mixed-version-cluster,-exclusive,-aws,-docker \
--build_tests_only \
--verbose_failures
test-exclusive-mixed-versions:
name: Test (Exclusive Tests with Mixed Version Cluster)
runs-on: ubuntu-latest
strategy:
matrix:
include:
- erlang_version: "25.1"
elixir_version: 1.14.0
timeout-minutes: 60
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: CONFIGURE OTP & ELIXIR
uses: erlef/setup-beam@v1.15
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
- name: MOUNT BAZEL CACHE
uses: actions/cache@v3.0.11
with:
path: "/home/runner/repo-cache/"
key: repo-cache
- name: CONFIGURE BAZEL
run: |
ERLANG_HOME="$(dirname $(dirname $(which erl)))"
ELIXIR_HOME="$(dirname $(dirname $(which iex)))"
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
EOF
fi
cat << EOF >> user.bazelrc
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
build:buildbuddy --repository_cache=/home/runner/repo-cache/
build:buildbuddy --color=yes
build:buildbuddy --disk_cache=
build --@rules_erlang//:erlang_version=${{ matrix.erlang_version }}
build --@rules_erlang//:erlang_home=${ERLANG_HOME}
build --//:elixir_home=${ELIXIR_HOME}
EOF
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN EXCLUSIVE TESTS
run: |
MIXED_EXCLUSIVE_TESTS=$(bazel query 'attr(tags, "mixed-version-cluster", attr(tags, "exclusive", tests(//...)))')
bazelisk test $MIXED_EXCLUSIVE_TESTS \
--config=buildbuddy \
--test_tag_filters=-aws,-docker \
--build_tests_only \
--test_env RABBITMQ_CT_HELPERS_DELETE_UNUSED_NODES=true \
--verbose_failures
|