25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Runtime: Try using elixir container for Rebar3+Elixir and Mix jobs (#4281)

This commit is contained in:
Badlop 2024-11-12 13:45:22 +01:00
parent d3baacd78e
commit c20ed8c7b3

View File

@ -158,51 +158,21 @@ jobs:
strategy:
fail-fast: false
matrix:
otp: ['23.0', '25', '26', '27']
elixir: ['1.13', '1.15', '1.16', '1.17']
exclude:
- otp: '23.0'
elixir: '1.15'
- otp: '23.0'
elixir: '1.16'
- otp: '23.0'
elixir: '1.17'
- otp: '26'
elixir: '1.13'
- otp: '27'
elixir: '1.13'
- otp: '27'
elixir: '1.15'
- otp: '27'
elixir: '1.16'
runs-on: ubuntu-20.04
elixir: ['1.13', '1.14', '1.15', '1.16', '1.17']
runs-on: ubuntu-24.04
container:
image: elixir:${{ matrix.elixir }}
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: Get compatible Rebar binaries
if: matrix.otp < 24
run: |
rm rebar
rm rebar3
wget https://github.com/processone/ejabberd/raw/21.12/rebar
wget https://github.com/processone/ejabberd/raw/21.12/rebar3
chmod +x rebar
chmod +x rebar3
- 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
apt-get -qq update
apt-get -y purge libgd3 nginx
apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Enable ModPresenceDemo and an Elixir dependency
run: |
@ -216,7 +186,13 @@ jobs:
with:
path: |
~/.cache/rebar3/
key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
key: ${{matrix.elixir}}-${{hashFiles('rebar.config')}}
- name: Install Hex and Rebar3 manually on older Elixir
if: matrix.elixir <= '1.14'
run: |
mix local.hex --force
mix local.rebar --force
- name: Compile
run: |
@ -305,41 +281,21 @@ jobs:
strategy:
fail-fast: false
matrix:
otp: ['23.0', '25', '26', '27']
elixir: ['1.13', '1.15', '1.16', '1.17']
exclude:
- otp: '23.0'
elixir: '1.15'
- otp: '23.0'
elixir: '1.16'
- otp: '23.0'
elixir: '1.17'
- otp: '26'
elixir: '1.13'
- otp: '27'
elixir: '1.13'
- otp: '27'
elixir: '1.15'
- otp: '27'
elixir: '1.16'
runs-on: ubuntu-20.04
elixir: ['1.13', '1.14', '1.15', '1.16', '1.17']
runs-on: ubuntu-24.04
container:
image: elixir:${{ matrix.elixir }}
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
apt-get -qq update
apt-get -y purge libgd3 nginx
apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Remove Elixir Matchers
run: |
@ -356,17 +312,18 @@ jobs:
sed -i 's|^{deps, \(.*\)|{deps, \1\n {decimal, ".*", {git, "https://github.com/ericmj/decimal", {branch, "main"}}}, |g' rebar.config
cat rebar.config
- name: Unlock Jose dependency on older Erlang
if: matrix.otp < 24
run: |
mix deps.unlock jose
- name: Cache Hex.pm
uses: actions/cache@v4
with:
path: |
~/.hex/
key: ${{matrix.otp}}-${{hashFiles('mix.exs')}}
key: ${{matrix.elixir}}-${{hashFiles('mix.exs')}}
- name: Install Hex and Rebar3 manually on older Elixir
if: matrix.elixir <= '1.14'
run: |
mix local.hex --force
mix local.rebar --force
- name: Compile
run: |