Skip to content

Commit e7e79a8

Browse files
Revert "Remove build system equivalence workflows"
This reverts commit 9cf04f3.
1 parent 9cf04f3 commit e7e79a8

File tree

2 files changed

+192
-0
lines changed

2 files changed

+192
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check Bazel/Erlang.mk Equivalence on Release Branches
2+
on:
3+
schedule:
4+
- cron: '0 2 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
check-main:
8+
uses: ./.github/workflows/check-build-system-equivalence.yaml
9+
with:
10+
ref: refs/heads/main
11+
erlang_version: 26.2
12+
elixir_version: 1.15
13+
project_version: 4.0.0
14+
15+
check-v4_0_x:
16+
uses: ./.github/workflows/check-build-system-equivalence.yaml
17+
with:
18+
ref: refs/heads/main
19+
erlang_version: 26.2
20+
elixir_version: 1.15
21+
project_version: 4.0.0
22+
23+
check-v3_13_x:
24+
uses: ./.github/workflows/check-build-system-equivalence.yaml
25+
with:
26+
ref: refs/heads/v3.13.x
27+
erlang_version: 26.2
28+
elixir_version: 1.15
29+
project_version: 3.13.0
30+
31+
check-v3_12_x:
32+
uses: ./.github/workflows/check-build-system-equivalence.yaml
33+
with:
34+
ref: refs/heads/v3.12.x
35+
erlang_version: 26.1
36+
elixir_version: 1.15
37+
project_version: 3.12.0
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Check Bazel/Erlang.mk Equivalence
2+
on:
3+
workflow_call:
4+
inputs:
5+
ref:
6+
required: true
7+
type: string
8+
erlang_version:
9+
required: true
10+
type: string
11+
elixir_version:
12+
required: true
13+
type: string
14+
project_version:
15+
required: true
16+
type: string
17+
workflow_dispatch:
18+
inputs:
19+
erlang_version:
20+
description: 'OTP version to build with'
21+
required: true
22+
default: "26.2"
23+
elixir_version:
24+
description: 'Elixir version to build with'
25+
required: true
26+
default: "1.15"
27+
project_version:
28+
description: 'PROJECT_VERSION used for make'
29+
required: true
30+
default: "4.0.0"
31+
env:
32+
erlang_version: ${{ inputs.erlang_version || github.event.inputs.erlang_version }}
33+
elixir_version: ${{ inputs.elixir_version || github.event.inputs.elixir_version }}
34+
VERSION: ${{ inputs.project_version || github.event.inputs.project_version }}
35+
PLUGINS: amqp10_common amqp10_client rabbitmq_amqp1_0 rabbitmq_auth_backend_cache rabbitmq_auth_backend_http rabbitmq_auth_backend_oauth2 rabbitmq_auth_mechanism_ssl rabbitmq_consistent_hash_exchange rabbitmq_event_exchange rabbitmq_federation rabbitmq_jms_topic_exchange rabbitmq_mqtt rabbitmq_random_exchange rabbitmq_recent_history_exchange rabbitmq_sharding rabbitmq_shovel rabbitmq_stomp rabbitmq_stream rabbitmq_trust_store rabbitmq_web_dispatch rabbitmq_management_agent rabbitmq_management rabbitmq_prometheus rabbitmq_federation_management rabbitmq_shovel_management rabbitmq_stream_management rabbitmq_top rabbitmq_tracing rabbitmq_web_mqtt rabbitmq_web_mqtt_examples rabbitmq_web_stomp rabbitmq_web_stomp_examples rabbitmq_aws rabbitmq_peer_discovery_common rabbitmq_peer_discovery_aws rabbitmq_peer_discovery_k8s rabbitmq_peer_discovery_consul rabbitmq_peer_discovery_etcd
36+
EXTRA_PLUGINS: accept amqp_client aten base64url cowboy cowlib credentials_obfuscation cuttlefish eetcd enough gen_batch_server getopt gun jose observer_cli osiris prometheus quantile_estimator ra ranch recon redbug seshat stdout_formatter syslog sysmon_handler systemd thoas
37+
jobs:
38+
build-with-bazel:
39+
name: bazel build package-generic-unix.tar.xz
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 15
42+
steps:
43+
- name: CHECKOUT REPOSITORY
44+
uses: actions/checkout@v4
45+
with:
46+
ref: ${{ inputs.ref || github.ref }}
47+
- name: CONFIGURE ERLANG
48+
uses: erlef/setup-beam@v1.17
49+
with:
50+
otp-version: ${{ env.erlang_version }}
51+
elixir-version: ${{ env.elixir_version }}
52+
- name: CONFIGURE BAZEL
53+
run: |
54+
cat << EOF >> user.bazelrc
55+
build --disk_cache=
56+
build --color=yes
57+
EOF
58+
- name: BUILD package-generic-unix.tar.xz
59+
run: |
60+
bazelisk build //:package-generic-unix
61+
- name: RESOLVE ARCHIVES_DIR
62+
run: |
63+
echo "archives_dir=$(readlink -f bazel-bin)" >> $GITHUB_ENV
64+
- name: UPLOAD package-generic-unix.tar.xz
65+
uses: actions/upload-artifact@v4.3.2
66+
with:
67+
name: bazel-package-generic-unix-${{ env.VERSION }}.tar.xz
68+
path: ${{ env.archives_dir }}/package-generic-unix.tar.xz
69+
if-no-files-found: error
70+
71+
build-with-make:
72+
name: make package-generic-unix.tar.xz
73+
runs-on: ubuntu-latest
74+
timeout-minutes: 15
75+
steps:
76+
- name: CHECKOUT REPOSITORY
77+
uses: actions/checkout@v4
78+
with:
79+
path: rabbitmq
80+
ref: ${{ inputs.ref || github.ref }}
81+
- name: CONFIGURE ERLANG
82+
uses: erlef/setup-beam@v1.17
83+
with:
84+
otp-version: ${{ env.erlang_version }}
85+
elixir-version: ${{ env.elixir_version }}
86+
- name: BUILD package-generic-unix.tar.xz
87+
env:
88+
MAKE: make
89+
run: |
90+
$MAKE -C rabbitmq \
91+
source-dist \
92+
PACKAGES_DIR="$PWD/PACKAGES" \
93+
PLUGINS="$PLUGINS" \
94+
PROJECT_VERSION="$VERSION"
95+
$MAKE -C rabbitmq/packaging \
96+
package-generic-unix \
97+
PACKAGES_DIR="$PWD/PACKAGES" \
98+
VERSION="$VERSION"
99+
- name: UPLOAD package-generic-unix.tar.xz
100+
uses: actions/upload-artifact@v4.3.2
101+
with:
102+
name: make-package-generic-unix-${{ env.VERSION }}.tar.xz
103+
path: PACKAGES/rabbitmq-server-generic-unix-*.tar.xz
104+
if-no-files-found: error
105+
106+
compare:
107+
needs:
108+
- build-with-bazel
109+
- build-with-make
110+
name: Compare package-generic-unix.tar.xz
111+
runs-on: ubuntu-latest
112+
timeout-minutes: 10
113+
steps:
114+
- name: CHECKOUT REPOSITORY
115+
uses: actions/checkout@v4
116+
with:
117+
path: rabbitmq-server
118+
ref: ${{ inputs.ref || github.ref }}
119+
- name: CONFIGURE ERLANG
120+
uses: erlef/setup-beam@v1.17
121+
with:
122+
otp-version: ${{ env.erlang_version }}
123+
elixir-version: ${{ env.elixir_version }}
124+
- name: DOWNLOAD bazel-package-generic-unix.tar.xz
125+
uses: actions/download-artifact@v4
126+
with:
127+
name: bazel-package-generic-unix-${{ env.VERSION }}.tar.xz
128+
- name: DOWNLOAD make-package-generic-unix.tar.xz
129+
uses: actions/download-artifact@v4
130+
with:
131+
name: make-package-generic-unix-${{ env.VERSION }}.tar.xz
132+
- name: EXPAND & COMPARE
133+
run: |
134+
mkdir bazel
135+
pushd bazel
136+
tar -xf ${{ github.workspace }}/package-generic-unix.tar.xz
137+
find . | sort > ${{ github.workspace }}/bazel.manifest
138+
popd
139+
140+
mkdir make
141+
pushd make
142+
tar -xf ${{ github.workspace }}/rabbitmq-server-generic-unix-*.tar.xz
143+
# delete an empty directory
144+
rm -d rabbitmq_server-*/plugins/rabbitmq_random_exchange-*/include
145+
find . | sort > ${{ github.workspace }}/make.manifest
146+
popd
147+
148+
tree -L 3 bazel
149+
tree -L 3 make
150+
151+
sleep 1
152+
153+
set -x
154+
155+
./rabbitmq-server/tools/compare_dist.sh make bazel

0 commit comments

Comments
 (0)