Skip to content

Commit 8f75b1b

Browse files
authored
Merge branch 'main' into add-gleam-compiler
2 parents 2f0efe4 + ac44e72 commit 8f75b1b

84 files changed

Lines changed: 2969 additions & 1595 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-markdown.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
# SPDX-FileCopyrightText: 2012 Plataformatec
34

45
name: CI
56

67
on:
78
push:
89
paths-ignore:
910
- "lib/**/*.md"
11+
1012
pull_request:
1113
paths-ignore:
1214
- "lib/**/*.md"
@@ -21,7 +23,9 @@ permissions:
2123

2224
jobs:
2325
test_linux:
24-
name: Ubuntu 24.04, Erlang/OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
26+
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
27+
runs-on: ubuntu-24.04
28+
2529
strategy:
2630
fail-fast: false
2731
matrix:
@@ -30,10 +34,8 @@ jobs:
3034
deterministic: true
3135
- otp_version: "28.1"
3236
erlc_opts: "warnings_as_errors"
37+
docs: true
3338
coverage: true
34-
- otp_version: "28.1"
35-
otp_latest: true
36-
erlc_opts: "warnings_as_errors"
3739
- otp_version: "27.3"
3840
erlc_opts: "warnings_as_errors"
3941
- otp_version: "27.0"
@@ -43,44 +45,46 @@ jobs:
4345
development: true
4446
- otp_version: maint
4547
development: true
46-
runs-on: ubuntu-24.04
48+
4749
# Earlier Erlang/OTP versions ignored compiler directives
4850
# when using warnings_as_errors. So we only set ERLC_OPTS
4951
# from Erlang/OTP 27+.
5052
env:
5153
ERLC_OPTS: ${{ matrix.erlc_opts || '' }}
5254
steps:
53-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
54-
with:
55-
fetch-depth: 50
55+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
56+
5657
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
5758
with:
5859
otp-version: ${{ matrix.otp_version }}
5960
gleam-version: "1.11.1"
6061
- name: Set ERL_COMPILER_OPTIONS
6162
if: ${{ matrix.deterministic }}
6263
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
64+
6365
- name: Compile Elixir
6466
run: |
6567
make compile
6668
echo "$PWD/bin" >> $GITHUB_PATH
69+
6770
- name: Build info
6871
run: bin/elixir --version
72+
6973
- name: Check format
7074
run: make test_formatted && echo "All Elixir source code files are properly formatted."
75+
7176
- name: Erlang test suite
7277
run: make test_erlang
73-
continue-on-error: ${{ matrix.development }}
78+
continue-on-error: ${{ matrix.development == true }}
79+
7480
- name: Elixir test suite
7581
run: make test_elixir
76-
continue-on-error: ${{ matrix.development }}
82+
continue-on-error: ${{ matrix.development == true }}
7783
env:
7884
COVER: "${{ matrix.coverage }}"
79-
- name: "Calculate Coverage"
80-
run: make cover | tee "$GITHUB_STEP_SUMMARY"
81-
if: "${{ matrix.coverage }}"
85+
8286
- name: Build docs (ExDoc main)
83-
if: ${{ matrix.otp_latest }}
87+
if: ${{ matrix.docs }}
8488
run: |
8589
cd ..
8690
git clone https://github.com/elixir-lang/ex_doc.git --depth 1
@@ -89,67 +93,66 @@ jobs:
8993
cd ../elixir/
9094
git fetch --tags
9195
DOCS_OPTIONS="--warnings-as-errors" make docs
96+
97+
- name: "Calculate Coverage"
98+
if: ${{ matrix.coverage }}
99+
run: make cover | tee "$GITHUB_STEP_SUMMARY"
100+
101+
- name: "Upload Coverage Artifact"
102+
if: ${{ matrix.coverage }}
103+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
104+
with:
105+
name: TestCoverage
106+
path: cover/*
107+
92108
- name: Check reproducible builds
93109
if: ${{ matrix.deterministic }}
94110
run: |
95111
rm -rf .git
96112
# Recompile System without .git
97113
cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd -
98114
taskset 1 make check_reproducible
99-
- name: "Upload Coverage Artifact"
100-
if: "${{ matrix.coverage }}"
101-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
102-
with:
103-
name: TestCoverage
104-
path: cover/*
105115
106116
test_windows:
107-
name: Windows Server 2019, Erlang/OTP ${{ matrix.otp_version }}
117+
name: Windows Server 2022, OTP ${{ matrix.otp_version }}
118+
runs-on: windows-2022
119+
108120
strategy:
109121
matrix:
110-
otp_version: ["26.2", "27.3", "28.1"]
111-
runs-on: windows-2022
122+
otp_version:
123+
- "28.1"
124+
- "27.3"
125+
- "26.2"
126+
112127
steps:
113128
- name: Configure Git
114129
run: git config --global core.autocrlf input
115-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
116-
with:
117-
fetch-depth: 50
130+
131+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
132+
118133
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
119134
with:
120135
otp-version: ${{ matrix.otp_version }}
136+
121137
- name: Compile Elixir
122138
run: |
123139
Remove-Item -Recurse -Force '.git'
124140
make compile
141+
125142
- name: Build info
126143
run: bin/elixir --version
144+
127145
- name: Check format
128146
run: make test_formatted && echo "All Elixir source code files are properly formatted."
147+
129148
- name: Erlang test suite
130149
run: make test_erlang
150+
131151
- name: Elixir test suite
132152
run: |
133153
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'
134154
make test_elixir
135155
136-
check_posix_compliant:
137-
name: Check POSIX-compliant
138-
runs-on: ubuntu-24.04
139-
steps:
140-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
141-
with:
142-
fetch-depth: 50
143-
- name: Install Shellcheck
144-
run: |
145-
sudo apt update
146-
sudo apt install -y shellcheck
147-
- name: Check POSIX-compliant
148-
run: |
149-
shellcheck -e SC2039,2086 bin/elixir && echo "bin/elixir is POSIX compliant"
150-
shellcheck bin/elixirc && echo "bin/elixirc is POSIX compliant"
151-
shellcheck bin/iex && echo "bin/iex is POSIX compliant"
152-
153156
license_compliance:
154157
name: Check Licence Compliance
155158

@@ -163,7 +166,7 @@ jobs:
163166

164167
- name: Checkout project
165168
id: checkout
166-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
169+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
167170

168171
- name: "Run OSS Review Toolkit"
169172
id: ort

.github/workflows/markdown.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
4+
name: Markdown Content
5+
6+
on:
7+
push:
8+
branches:
9+
- "main"
10+
11+
paths: &paths-filter
12+
- "**/*.md"
13+
- .github/workflows/markdown.yml
14+
- .markdownlint-cli2.jsonc
15+
16+
pull_request:
17+
paths: *paths-filter
18+
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
24+
env:
25+
LANG: C.UTF-8
26+
27+
jobs:
28+
lint:
29+
name: Lint Markdown content
30+
runs-on: ubuntu-latest
31+
32+
strategy:
33+
fail-fast: false
34+
35+
steps:
36+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
37+
38+
- name: Run markdownlint-cli2
39+
uses: DavidAnson/markdownlint-cli2-action@30a0e04f1870d58f8d717450cc6134995f993c63 # v21.0.0
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: 2021 The Elixir Team
3+
# SPDX-FileCopyrightText: 2012 Plataformatec
4+
5+
name: POSIX Compliance
6+
7+
on:
8+
push:
9+
paths: &paths-filter
10+
- .github/workflows/posix_compliance.yml
11+
- bin/elixir
12+
- bin/elixirc
13+
- bin/iex
14+
15+
pull_request:
16+
paths: *paths-filter
17+
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
env:
24+
LANG: C.UTF-8
25+
26+
jobs:
27+
check_posix_compliance:
28+
name: Check POSIX compliance
29+
runs-on: ubuntu-latest
30+
31+
strategy:
32+
fail-fast: false
33+
34+
steps:
35+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
36+
37+
- name: Install ShellCheck
38+
run: |
39+
sudo apt update
40+
sudo apt install -y shellcheck
41+
42+
- name: Run ShellCheck on bin/ dir
43+
run: |
44+
shellcheck -e SC2039,2086 bin/elixir && \
45+
echo "bin/elixir is POSIX compliant"
46+
47+
shellcheck bin/elixirc && \
48+
echo "bin/elixirc is POSIX compliant"
49+
50+
shellcheck bin/iex && \
51+
echo "bin/iex is POSIX compliant"

0 commit comments

Comments
 (0)