Runtime: Add new Rebar3+Elixir job #177
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Runtime | ||
on: | ||
push: | ||
paths: | ||
- '*' | ||
- '!*.md' | ||
- '.github/workflows/runtime.yml' | ||
- 'checkouts/**' | ||
- 'config/**' | ||
- 'lib/**' | ||
- 'm4/**' | ||
- 'plugins/**' | ||
- 'rel/**' | ||
pull_request: | ||
paths: | ||
- '*' | ||
- '!*.md' | ||
- '.github/workflows/runtime.yml' | ||
- 'checkouts/**' | ||
- 'config/**' | ||
- 'lib/**' | ||
- 'm4/**' | ||
- 'plugins/**' | ||
- 'rel/**' | ||
jobs: | ||
rebars: | ||
name: Rebars | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
otp: ['20.3', '25.3', '26'] | ||
rebar: ['rebar', 'rebar3'] | ||
exclude: | ||
- otp: '26' | ||
rebar: 'rebar' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: erlang:${{ matrix.otp }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare libraries | ||
run: | | ||
apt-get -qq update | ||
apt-get purge -y libgd3 | ||
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 | ||
- 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 register user2 localhost s0mePass | ||
rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log | ||
cat rel/ejabberd/logs/* | ||
- name: Run 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 > registered.log | ||
_build/prod/rel/ejabberd/bin/ejabberdctl stop \ | ||
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped | ||
- name: Run 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 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: View logs | ||
if: matrix.rebar != 'rebar' | ||
if: always() | ||
Check failure on line 102 in .github/workflows/runtime.yml GitHub Actions / RuntimeInvalid workflow file
|
||
run: | | ||
echo "===> Registered:" | ||
cat registered.log | ||
echo "===> Prod:" | ||
cat _build/prod/rel/ejabberd/logs/* | ||
echo "===> Dev:" | ||
cat _build/dev/rel/ejabberd/logs/* | ||
- name: Check rel | ||
if: matrix.rebar != 'rebar' | ||
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: matrix.rebar != 'rebar' | ||
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 | ||
rebar3-elixir: | ||
name: Rebar3+Elixir | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
otp: ['23.0', '25', '26'] | ||
elixir: ['1.14.0', '1.15'] | ||
exclude: | ||
- otp: '23.0' | ||
elixir: '1.15' | ||
- otp: '26' | ||
elixir: '1.14.0' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- 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 | ||
sudo apt-get -y purge libgd3 nginx | ||
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \ | ||
libsqlite3-dev libwebp-dev libyaml-dev | ||
- name: Compile | ||
run: | | ||
./autogen.sh | ||
./configure --with-rebar=./rebar3 \ | ||
--prefix=/tmp/ejabberd \ | ||
--enable-all \ | ||
--disable-odbc | ||
make update | ||
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: View logs | ||
if: always() | ||
run: | | ||
echo "===> Registered:" | ||
cat registered.log | ||
echo "===> Prod:" | ||
cat _build/prod/rel/ejabberd/logs/* | ||
echo "===> Dev:" | ||
cat _build/dev/rel/ejabberd/logs/* | ||
- 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 | ||
mix: | ||
name: Mix | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
otp: ['23.0', '25', '26'] | ||
elixir: ['1.14.0', '1.15'] | ||
exclude: | ||
- otp: '23.0' | ||
elixir: '1.15' | ||
- otp: '26' | ||
elixir: '1.14.0' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- 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 | ||
sudo apt-get -y purge libgd3 nginx | ||
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-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: View logs | ||
if: always() | ||
run: | | ||
echo "===> Registered:" | ||
cat registered.log | ||
echo "===> Prod:" | ||
cat _build/prod/rel/ejabberd/logs/* | ||
echo "===> Dev:" | ||
cat _build/dev/rel/ejabberd/logs/* | ||
- 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 |