-
Notifications
You must be signed in to change notification settings - Fork 3.5k
151 lines (122 loc) · 4.1 KB
/
ci.yml
File metadata and controls
151 lines (122 loc) · 4.1 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2021 The Elixir Team
# SPDX-FileCopyrightText: 2012 Plataformatec
name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
ELIXIR_ASSERT_TIMEOUT: 2000
ELIXIRC_OPTS: "--warnings-as-errors"
LANG: C.UTF-8
permissions:
contents: read
jobs:
test_linux:
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- otp_version: "29.0-rc1"
- otp_version: "28.1"
deterministic: true
- otp_version: "28.1"
docs: true
coverage: true
- otp_version: "27.3"
- otp_version: "27.0"
- otp_version: master
development: true
- otp_version: maint
development: true
env:
ERLC_OPTS: "warnings_as_errors"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: ${{ matrix.otp_version }}
- name: Set ERL_COMPILER_OPTIONS
if: ${{ matrix.deterministic }}
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
- name: Compile Elixir
run: |
make compile
echo "$PWD/bin" >> $GITHUB_PATH
- name: Build info
run: bin/elixir --version
- name: Check format
run: make test_formatted && echo "All Elixir source code files are properly formatted."
- name: Erlang test suite
run: make test_erlang
continue-on-error: ${{ matrix.development == true }}
- name: Elixir test suite
run: make test_elixir
continue-on-error: ${{ matrix.development == true }}
env:
COVER: "${{ matrix.coverage }}"
- name: Build docs (ExDoc main)
if: ${{ matrix.docs }}
run: |
cd ..
git clone https://github.com/elixir-lang/ex_doc.git --depth 1
cd ex_doc
../elixir/bin/mix do local.rebar --force + local.hex --force + deps.get + compile
cd ../elixir/
git fetch --tags
DOCS_OPTIONS="--warnings-as-errors" make docs
- name: "Calculate Coverage"
if: ${{ matrix.coverage }}
run: make cover | tee "$GITHUB_STEP_SUMMARY"
- name: "Upload Coverage Artifact"
if: ${{ matrix.coverage }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: TestCoverage
path: cover/*
- name: Check reproducible builds
if: ${{ matrix.deterministic }}
run: taskset 1 make check_reproducible
- name: Check git is not required
if: ${{ matrix.deterministic }}
run: |
rm -rf .git
cd lib/elixir
elixirc --ignore-module-conflict -o ebin "lib/**/*.ex"
test_windows:
name: Windows Server 2022, OTP ${{ matrix.otp_version }}
runs-on: windows-2022
strategy:
matrix:
otp_version:
- "29.0-rc1"
- "28.1"
- "27.3"
steps:
- name: Configure Git
run: git config --global core.autocrlf input
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: ${{ matrix.otp_version }}
- name: Compile Elixir
run: |
Remove-Item -Recurse -Force '.git'
make compile
- name: Build info
run: bin/elixir --version
- name: Check format
run: make test_formatted && echo "All Elixir source code files are properly formatted."
- name: Erlang test suite
run: make test_erlang
- name: Elixir test suite
run: |
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'
make test_elixir