From 8e01c04e9672b0136f451b0cfe61aa809015dc32 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 9 Feb 2026 10:27:12 +0100 Subject: [PATCH] Use manage-ejabberd action in workflows to compile ejabberd --- .github/actions/manage-ejabberd/action.yml | 27 +++++++++++++++++ .github/workflows/ci.yml | 14 ++++----- .github/workflows/runtime.yml | 35 +++++++++++----------- .github/workflows/weekly.yml | 16 ++++------ 4 files changed, 57 insertions(+), 35 deletions(-) diff --git a/.github/actions/manage-ejabberd/action.yml b/.github/actions/manage-ejabberd/action.yml index bd6ba9d2d..039600bf9 100644 --- a/.github/actions/manage-ejabberd/action.yml +++ b/.github/actions/manage-ejabberd/action.yml @@ -68,6 +68,33 @@ runs: ;; esac + ############################################################# Compile ##### + + - if: contains(inputs.do, 'compile') && + (inputs.tool == 'rebar' || + inputs.tool == 'rebar3') + shell: sh + run: | + ./autogen.sh + ./configure --with-rebar=./${{ inputs.tool }} \ + --prefix=/tmp/ejabberd \ + --enable-all \ + --disable-elixir + sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script + make + + - if: contains(inputs.do, 'compile') && + (inputs.tool == './rebar3' || + inputs.tool == 'mix') + shell: sh + run: | + ./autogen.sh + ./configure --with-rebar=${{ inputs.tool }} \ + --prefix=/tmp/ejabberd \ + --enable-all + sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script + make + ############################################################## Deploy ##### - if: contains(inputs.do, 'deploy') && diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ee37ed62..77015d65e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,14 +54,14 @@ jobs: key: ci-${{ matrix.otp }}-${{hashFiles('rebar.config')}} - name: Compile + uses: ./.github/actions/manage-ejabberd + with: + for: prod + do: compile + tool: rebar3 + + - name: Compress compiled.tar run: | - ./autogen.sh - ./configure --with-rebar=./rebar3 \ - --prefix=/tmp/ejabberd \ - --enable-all \ - --disable-elixir - sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script - make tar -cvf /tmp/compiled.tar . - uses: actions/upload-artifact@v6 diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index e5be55e18..45574636b 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -72,14 +72,11 @@ jobs: key: runtime-${{ matrix.otp }}-${{matrix.rebar}}-${{hashFiles('rebar.config')}} - name: Compile - run: | - ./autogen.sh - ./configure --with-rebar=./${{ matrix.rebar }} \ - --prefix=/tmp/ejabberd \ - --with-min-erlang=9.0.5 \ - --enable-all \ - --disable-elixir - make + uses: ./.github/actions/manage-ejabberd + with: + for: prod + do: compile + tool: ${{ matrix.rebar }} - run: make hooks - run: make options @@ -154,11 +151,14 @@ jobs: mix local.rebar --force - name: Compile + uses: ./.github/actions/manage-ejabberd + with: + for: prod + do: compile + tool: ./rebar3 + + - name: Test scripts, deps, eunit run: | - ./autogen.sh - ./configure --with-rebar=./rebar3 \ - --prefix=/tmp/ejabberd \ - --enable-all make scripts deps ./rebar3 eunit --verbose @@ -240,12 +240,11 @@ jobs: mix local.rebar --force - name: Compile - run: | - ./autogen.sh - ./configure --with-rebar=mix \ - --prefix=/tmp/ejabberd \ - --enable-all - make + uses: ./.github/actions/manage-ejabberd + with: + for: prod + do: compile + tool: mix - run: make hooks - run: make options diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index d8053d545..e909f4883 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -14,6 +14,7 @@ jobs: matrix: otp: ['25', '26', '27', '28'] + steps: - uses: actions/checkout@v6 @@ -31,16 +32,11 @@ jobs: libsqlite3-dev libwebp-dev libyaml-dev - name: Compile - run: | - ./autogen.sh - ./configure --with-rebar=./rebar3 \ - --prefix=/tmp/ejabberd \ - --enable-all \ - --disable-elixir \ - --disable-mssql \ - --disable-odbc - sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script - make + uses: ./.github/actions/manage-ejabberd + with: + for: prod + do: compile + tool: rebar3 ########################################################## Static Tests #####