Skip to content

Commit 5832225

Browse files
committed
add github build action
1 parent 2e875cb commit 5832225

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build
2+
on: [push, pull_request]
3+
env:
4+
SERVER_FOLDER: rabbitmq-server
5+
PLUGIN_FOLDER: rabbitmq-server/deps/rabbitmq_web_ocpp
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
strategy:
10+
matrix:
11+
PLATFORM:
12+
- { RMQREF: "4.0.9", ERLVER: "26.2", ELXVER: "1.16" }
13+
- { RMQREF: "4.1.4", ERLVER: "27", ELXVER: "1.18" }
14+
name: "Broker: ${{ matrix.PLATFORM.RMQREF }} - Erlang: ${{ matrix.PLATFORM.ERLVER }} - Elixir: ${{ matrix.PLATFORM.ELXVER }}"
15+
steps:
16+
- name: Checkout RabbitMQ Server
17+
uses: actions/checkout@v4
18+
with:
19+
repository: rabbitmq/rabbitmq-server
20+
ref: v${{ matrix.PLATFORM.RMQREF }}
21+
path: ${{ env.SERVER_FOLDER }}
22+
- name: Checkout Plugin
23+
uses: actions/checkout@v4
24+
with:
25+
path: ${{ env.PLUGIN_FOLDER }}
26+
- name: Install Erlang and Elixir
27+
uses: erlef/setup-beam@v1
28+
with:
29+
otp-version: ${{ matrix.PLATFORM.ERLVER }}
30+
elixir-version: ${{ matrix.PLATFORM.ELXVER }}
31+
- name: Build distribution files
32+
working-directory: ${{ env.PLUGIN_FOLDER }}
33+
run: |
34+
make dist RABBITMQ_VERSION=${{ matrix.PLATFORM.RMQREF }} MIX_ENV=prod DIST_AS_EZS=yes IS_DEP=true
35+
- name: Store build artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: plugins-ocpp-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }}
39+
path: |
40+
${{ env.PLUGIN_FOLDER }}/plugins/rabbitmq_web_ocpp-[0-9].*.ez

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LOCAL_DEPS = ssl
1717
DEPS = rabbit cowboy
1818
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers rabbitmq_management rabbitmq_stomp rabbitmq_consistent_hash_exchange
1919

20-
PLT_APPS += rabbitmq_cli elixir cowlib
20+
PLT_APPS += rabbitmqctl elixir cowlib
2121

2222
# FIXME: Add Ranch as a BUILD_DEPS to be sure the correct version is picked.
2323
# See rabbitmq-components.mk.
@@ -26,9 +26,5 @@ BUILD_DEPS += ranch
2626
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk
2727
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
2828

29-
# The monorepo structure of RabbitMQ does not work for OOT plugins.
30-
DEPS_DIR ?= $(abspath ../rabbitmq-server/deps)
31-
ERLANG_MK_TMP ?= $(abspath ./.erlang.mk)
32-
33-
include ../rabbitmq-server/rabbitmq-components.mk
34-
include ../rabbitmq-server/erlang.mk
29+
include ../../rabbitmq-components.mk
30+
include ../../erlang.mk

0 commit comments

Comments
 (0)