-
Notifications
You must be signed in to change notification settings - Fork 10
112 lines (108 loc) · 3.21 KB
/
Copy pathci.yml
File metadata and controls
112 lines (108 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
name: build (Elixir ${{ matrix.elixir }} | OTP ${{ matrix.otp }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Elixir 1.15 supports OTP 24-26 (minimum version)
- elixir: '1.15'
otp: '24'
- elixir: '1.15'
otp: '25'
- elixir: '1.15'
otp: '26'
# Elixir 1.16 supports OTP 24-26
- elixir: '1.16'
otp: '25'
- elixir: '1.16'
otp: '26'
# Elixir 1.17 supports OTP 25-27
- elixir: '1.17'
otp: '25'
- elixir: '1.17'
otp: '26'
- elixir: '1.17'
otp: '27'
# Elixir 1.18 supports OTP 26-27 (and likely 28)
- elixir: '1.18'
otp: '26'
- elixir: '1.18'
otp: '27'
- elixir: '1.18'
otp: '28'
# Elixir 1.19 supports OTP 26-28
- elixir: '1.19'
otp: '26'
- elixir: '1.19'
otp: '27'
- elixir: '1.19'
otp: '28'
# Elixir 1.20 supports OTP 27-29
- elixir: '1.20'
otp: '28'
- elixir: '1.20'
otp: '29'
steps:
- uses: actions/checkout@v5
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v5
with:
path: deps
key: deps-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v5
with:
path: _build
key: build-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
- name: Reset Hex archive (avoid OTP mismatch)
run: |
mix archive.uninstall --force hex.ez || true
rm -rf ~/.mix/archives/hex-* || true
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix format --check-formatted
- run: mix compile --warnings-as-errors
- run: mix test
env:
ELIXIR_ASSERT_TIMEOUT: '2000'
dialyzer:
name: dialyzer (latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.20'
otp-version: '29'
- name: Restore deps cache
uses: actions/cache@v5
with:
path: deps
key: deps-${{ runner.os }}-latest-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v5
with:
path: _build
key: build-${{ runner.os }}-latest-${{ hashFiles('**/mix.lock') }}
- name: Reset Hex archive (avoid OTP mismatch)
run: |
mix archive.uninstall --force hex.ez || true
rm -rf ~/.mix/archives/hex-* || true
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix compile
- run: mix dialyzer