Skip to content

build(actions): explicitly set branches and environment variables #169

build(actions): explicitly set branches and environment variables

build(actions): explicitly set branches and environment variables #169

Workflow file for this run

name: build
on: [push, pull_request]
env:
SERVER_FOLDER: rabbitmq-server
PLUGIN_FOLDER: rabbitmq-server/deps/rabbitmq-message-deduplication
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
PLATFORM:
- { RMQREF: "v3.13.x", ERLVER: "26.2", ELXVER: "1.16" }
- { RMQREF: "v4.0.x", ERLVER: "26.2", ELXVER: "1.16" }
- { RMQREF: "v4.1.x", ERLVER: "27", ELXVER: "1.18" }
name: "Broker: ${{ matrix.PLATFORM.RMQREF }} - Erlang: ${{ matrix.PLATFORM.ERLVER }} - Elixir: ${{ matrix.PLATFORM.ELXVER }}"
steps:
- name: Checkout RabbitMQ Server
uses: actions/checkout@v4
with:
repository: rabbitmq/rabbitmq-server
path: ${{ env.SERVER_FOLDER }}
ref: ${{ matrix.PLATFORM.RMQREF }}
- name: Checkout Plugin
uses: actions/checkout@v4
with:
path: ${{ env.PLUGIN_FOLDER }}
- name: Checkout Plugin branch
working-directory: ${{ env.PLUGIN_FOLDER }}
run: |
git checkout -B ${{ matrix.PLATFORM.RMQREF }}
- name: Install Erlang and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.PLATFORM.ERLVER }}
elixir-version: ${{ matrix.PLATFORM.ELXVER }}
- name: Build RabbitMQ Server
working-directory: ${{ env.SERVER_FOLDER }}
run: |
make
- name: Run tests
working-directory: ${{ env.PLUGIN_FOLDER }}
env:
MIX_ENV: 'test'
run: |
make tests
- name: Build distribution files
working-directory: ${{ env.PLUGIN_FOLDER }}
env:
MIX_ENV: 'prod'
DIST_AS_EZS: 'yes'
run: |
make dist
- name: Store test artifacts
uses: actions/upload-artifact@v4
with:
name: tests-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }}
path: ${{ env.SERVER_FOLDER }}/logs/
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: plugins-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }}
path: ${{ env.PLUGIN_FOLDER }}/plugins/