2021-07-20 12:00:36 +02:00
|
|
|
name: Runtime
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '*'
|
|
|
|
- '!*.md'
|
2022-05-02 20:18:52 +02:00
|
|
|
- '.github/workflows/runtime.yml'
|
2021-07-20 12:00:36 +02:00
|
|
|
- 'checkouts/**'
|
|
|
|
- 'config/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'm4/**'
|
|
|
|
- 'plugins/**'
|
|
|
|
- 'rel/**'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '*'
|
|
|
|
- '!*.md'
|
2022-05-02 20:18:52 +02:00
|
|
|
- '.github/workflows/runtime.yml'
|
2021-07-20 12:00:36 +02:00
|
|
|
- 'checkouts/**'
|
|
|
|
- 'config/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'm4/**'
|
|
|
|
- 'plugins/**'
|
|
|
|
- 'rel/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
rebars:
|
|
|
|
name: Rebars
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-03-27 11:50:46 +02:00
|
|
|
otp: ['20.3', '25.3', '26']
|
2021-07-20 12:00:36 +02:00
|
|
|
rebar: ['rebar', 'rebar3']
|
2023-03-27 11:50:46 +02:00
|
|
|
exclude:
|
|
|
|
- otp: '26'
|
|
|
|
rebar: 'rebar'
|
2022-09-02 11:28:02 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-07-20 12:00:36 +02:00
|
|
|
container:
|
|
|
|
image: erlang:${{ matrix.otp }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Prepare libraries
|
|
|
|
run: |
|
|
|
|
apt-get -qq update
|
2022-07-26 12:28:07 +02:00
|
|
|
apt-get purge -y libgd3
|
2021-07-20 12:00:36 +02:00
|
|
|
apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
|
|
|
|
libsqlite3-dev libwebp-dev libyaml-dev
|
|
|
|
|
|
|
|
- name: Compile
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
|
|
|
./configure --with-rebar=`which ${{ matrix.rebar }}` \
|
|
|
|
--prefix=/tmp/ejabberd \
|
|
|
|
--enable-all \
|
|
|
|
--disable-elixir \
|
|
|
|
--disable-odbc
|
|
|
|
make update
|
|
|
|
make
|
|
|
|
|
2022-06-10 17:45:15 +02:00
|
|
|
- name: Prepare rebar
|
|
|
|
run: |
|
|
|
|
echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2}
|
|
|
|
]}.' >>rebar.config
|
|
|
|
echo '{xref_checks, [deprecated_function_calls, deprecated_functions,
|
|
|
|
locals_not_used, undefined_function_calls, undefined_functions]}.
|
|
|
|
% Disabled: exports_not_used,' >>rebar.config
|
|
|
|
|
2021-07-20 12:00:36 +02:00
|
|
|
- run: make xref
|
|
|
|
|
|
|
|
- name: Test rel (rebar2)
|
|
|
|
if: matrix.rebar == 'rebar'
|
|
|
|
run: |
|
|
|
|
make rel
|
|
|
|
rel/ejabberd/bin/ejabberdctl start \
|
|
|
|
&& rel/ejabberd/bin/ejabberdctl started
|
|
|
|
rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
|
|
|
rel/ejabberd/bin/ejabberdctl registered_users localhost
|
|
|
|
cat rel/ejabberd/logs/*
|
|
|
|
|
|
|
|
- name: Test rel
|
|
|
|
if: matrix.rebar != 'rebar'
|
|
|
|
run: |
|
|
|
|
make rel
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl start \
|
|
|
|
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
|
|
|
|
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
|
|
|
|
cat _build/prod/rel/ejabberd/logs/*
|
|
|
|
|
|
|
|
- name: Test dev
|
|
|
|
if: matrix.rebar != 'rebar'
|
|
|
|
run: |
|
|
|
|
make dev
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl start \
|
|
|
|
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
|
|
|
|
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
|
|
|
|
cat _build/dev/rel/ejabberd/logs/*
|
|
|
|
|
|
|
|
mix:
|
|
|
|
name: Mix
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-06-09 22:15:53 +02:00
|
|
|
otp: ['21.3', '22.0', '25.0']
|
2022-11-14 13:17:03 +01:00
|
|
|
elixir: ['1.10.3', '1.11.4', '1.12.3', '1.13.0', '1.14.0']
|
2021-07-20 12:00:36 +02:00
|
|
|
exclude:
|
|
|
|
- otp: '21.3'
|
|
|
|
elixir: '1.12.3'
|
|
|
|
- otp: '21.3'
|
|
|
|
elixir: '1.13.0'
|
2022-11-14 13:17:03 +01:00
|
|
|
- otp: '21.3'
|
|
|
|
elixir: '1.14.0'
|
|
|
|
- otp: '22.0'
|
|
|
|
elixir: '1.14.0'
|
2022-06-09 22:15:53 +02:00
|
|
|
- otp: '25.0'
|
2021-07-20 12:00:36 +02:00
|
|
|
elixir: '1.10.3'
|
2022-06-09 22:15:53 +02:00
|
|
|
- otp: '25.0'
|
2021-07-20 12:00:36 +02:00
|
|
|
elixir: '1.11.4'
|
2022-06-09 22:15:53 +02:00
|
|
|
- otp: '25.0'
|
|
|
|
elixir: '1.12.3'
|
2022-12-13 23:35:14 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2021-07-20 12:00:36 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Get specific Erlang/OTP
|
|
|
|
uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{matrix.otp}}
|
|
|
|
elixir-version: ${{matrix.elixir}}
|
|
|
|
|
|
|
|
- name: Prepare libraries
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
2022-07-26 12:28:07 +02:00
|
|
|
sudo apt-get -y purge libgd3 nginx
|
2021-07-20 12:00:36 +02:00
|
|
|
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
|
|
|
|
libsqlite3-dev libwebp-dev libyaml-dev
|
|
|
|
|
|
|
|
- name: Remove Elixir Matchers
|
|
|
|
run: |
|
|
|
|
echo "::remove-matcher owner=elixir-mixCompileWarning::"
|
|
|
|
echo "::remove-matcher owner=elixir-credoOutputDefault::"
|
|
|
|
echo "::remove-matcher owner=elixir-mixCompileError::"
|
|
|
|
echo "::remove-matcher owner=elixir-mixTestFailure::"
|
|
|
|
echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"
|
|
|
|
|
|
|
|
- name: Compile
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
|
|
|
./configure --with-rebar=mix \
|
|
|
|
--prefix=/tmp/ejabberd \
|
|
|
|
--enable-all \
|
|
|
|
--disable-elixir \
|
|
|
|
--disable-odbc
|
|
|
|
mix deps.get
|
|
|
|
make
|
|
|
|
|
|
|
|
- run: make xref
|
|
|
|
|
|
|
|
- name: Run rel
|
|
|
|
run: |
|
|
|
|
make rel
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl start \
|
|
|
|
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
|
|
|
|
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
|
|
|
|
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
|
|
|
|
|
|
|
|
- name: Run dev
|
|
|
|
run: |
|
|
|
|
make dev
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl start \
|
|
|
|
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
|
|
|
|
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
|
|
|
|
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
|
|
|
|
|
|
|
|
- name: Check rel
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
grep -q '^user1$' registered.log
|
|
|
|
grep -q '^user2$' registered.log
|
|
|
|
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
|
|
|
|
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
|
|
|
|
test $(find _build/prod/ -empty -name error.log)
|
|
|
|
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
|
|
|
|
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
|
|
|
|
test $(find _build/dev/ -empty -name error.log)
|
|
|
|
|
|
|
|
- name: View logs failures
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
cat _build/prod/rel/ejabberd/logs/ejabberd.log
|
|
|
|
cat _build/prod/rel/ejabberd/logs/error.log
|
|
|
|
cat _build/dev/rel/ejabberd/logs/ejabberd.log
|
|
|
|
cat _build/dev/rel/ejabberd/logs/error.log
|