Skip to content

Commit b213515

Browse files
committed
Merge branch 'main' into feature/ci-improve-license-compliance
2 parents c707f55 + 0f9d919 commit b213515

126 files changed

Lines changed: 8465 additions & 3090 deletions

File tree

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-posix-compliance.yml

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

.github/workflows/ci.yml

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ name: CI
66

77
on:
88
push:
9-
paths-ignore:
10-
- "lib/**/*.md"
119
pull_request:
12-
paths-ignore:
13-
- "lib/**/*.md"
10+
workflow_dispatch:
1411

1512
env:
1613
ELIXIR_ASSERT_TIMEOUT: 2000
@@ -22,7 +19,7 @@ permissions:
2219

2320
jobs:
2421
test_linux:
25-
name: Ubuntu 24.04, Erlang/OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
22+
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
2623
runs-on: ubuntu-24.04
2724

2825
strategy:
@@ -33,10 +30,8 @@ jobs:
3330
deterministic: true
3431
- otp_version: "28.1"
3532
erlc_opts: "warnings_as_errors"
33+
docs: true
3634
coverage: true
37-
- otp_version: "28.1"
38-
otp_latest: true
39-
erlc_opts: "warnings_as_errors"
4035
- otp_version: "27.3"
4136
erlc_opts: "warnings_as_errors"
4237
- otp_version: "27.0"
@@ -53,36 +48,39 @@ jobs:
5348
env:
5449
ERLC_OPTS: ${{ matrix.erlc_opts || '' }}
5550
steps:
56-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
57-
with:
58-
fetch-depth: 50
51+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
52+
5953
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
6054
with:
6155
otp-version: ${{ matrix.otp_version }}
56+
6257
- name: Set ERL_COMPILER_OPTIONS
6358
if: ${{ matrix.deterministic }}
6459
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
60+
6561
- name: Compile Elixir
6662
run: |
6763
make compile
6864
echo "$PWD/bin" >> $GITHUB_PATH
65+
6966
- name: Build info
7067
run: bin/elixir --version
68+
7169
- name: Check format
7270
run: make test_formatted && echo "All Elixir source code files are properly formatted."
71+
7372
- name: Erlang test suite
7473
run: make test_erlang
75-
continue-on-error: ${{ matrix.development }}
74+
continue-on-error: ${{ matrix.development == true }}
75+
7676
- name: Elixir test suite
7777
run: make test_elixir
78-
continue-on-error: ${{ matrix.development }}
78+
continue-on-error: ${{ matrix.development == true }}
7979
env:
8080
COVER: "${{ matrix.coverage }}"
81-
- name: "Calculate Coverage"
82-
run: make cover | tee "$GITHUB_STEP_SUMMARY"
83-
if: "${{ matrix.coverage }}"
81+
8482
- name: Build docs (ExDoc main)
85-
if: ${{ matrix.otp_latest }}
83+
if: ${{ matrix.docs }}
8684
run: |
8785
cd ..
8886
git clone https://github.com/elixir-lang/ex_doc.git --depth 1
@@ -91,22 +89,31 @@ jobs:
9189
cd ../elixir/
9290
git fetch --tags
9391
DOCS_OPTIONS="--warnings-as-errors" make docs
94-
- name: Check reproducible builds
95-
if: ${{ matrix.deterministic }}
96-
run: |
97-
rm -rf .git
98-
# Recompile System without .git
99-
cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd -
100-
taskset 1 make check_reproducible
92+
93+
- name: "Calculate Coverage"
94+
if: ${{ matrix.coverage }}
95+
run: make cover | tee "$GITHUB_STEP_SUMMARY"
96+
10197
- name: "Upload Coverage Artifact"
102-
if: "${{ matrix.coverage }}"
103-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
98+
if: ${{ matrix.coverage }}
99+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
104100
with:
105101
name: TestCoverage
106102
path: cover/*
107103

104+
- name: Check reproducible builds
105+
if: ${{ matrix.deterministic }}
106+
run: taskset 1 make check_reproducible
107+
108+
- name: Check git is not required
109+
if: ${{ matrix.deterministic }}
110+
run: |
111+
rm -rf .git
112+
cd lib/elixir
113+
elixirc --ignore-module-conflict -o ebin "lib/**/*.ex"
114+
108115
test_windows:
109-
name: Windows Server 2022, Erlang/OTP ${{ matrix.otp_version }}
116+
name: Windows Server 2022, OTP ${{ matrix.otp_version }}
110117
runs-on: windows-2022
111118

112119
strategy:
@@ -119,22 +126,27 @@ jobs:
119126
steps:
120127
- name: Configure Git
121128
run: git config --global core.autocrlf input
122-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
123-
with:
124-
fetch-depth: 50
129+
130+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
131+
125132
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
126133
with:
127134
otp-version: ${{ matrix.otp_version }}
135+
128136
- name: Compile Elixir
129137
run: |
130138
Remove-Item -Recurse -Force '.git'
131139
make compile
140+
132141
- name: Build info
133142
run: bin/elixir --version
143+
134144
- name: Check format
135145
run: make test_formatted && echo "All Elixir source code files are properly formatted."
146+
136147
- name: Erlang test suite
137148
run: make test_erlang
149+
138150
- name: Elixir test suite
139151
run: |
140152
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'

.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
37+
38+
- name: Run markdownlint-cli2
39+
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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)