From f7a375d509ff73b1e55a4199e19fa3facf5bcecc Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Mon, 1 Dec 2025 08:51:11 -0500 Subject: [PATCH 1/5] CI: Minor improvements to ci.yml --- .github/workflows/ci.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b99d2ee667c..e4459d79d23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2021 The Elixir Team # SPDX-FileCopyrightText: 2012 Plataformatec -name: CI +name: Elixir Building and Testing on: push: @@ -32,17 +32,23 @@ jobs: include: - otp_version: "28.1" deterministic: true + - otp_version: "28.1" erlc_opts: "warnings_as_errors" docs: true coverage: true + - otp_version: "27.3" erlc_opts: "warnings_as_errors" + - otp_version: "27.0" erlc_opts: "warnings_as_errors" + - otp_version: "26.0" + - otp_version: master development: true + - otp_version: maint development: true @@ -50,7 +56,8 @@ jobs: # when using warnings_as_errors. So we only set ERLC_OPTS # from Erlang/OTP 27+. env: - ERLC_OPTS: ${{ matrix.erlc_opts || '' }} + ERLC_OPTS: ${{ matrix.erlc_opts }} + steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -71,7 +78,9 @@ jobs: run: bin/elixir --version - name: Check format - run: make test_formatted && echo "All Elixir source code files are properly formatted." + run: | + make test_formatted && \ + echo "All Elixir source code files are properly formatted." - name: Erlang test suite run: make test_erlang @@ -81,7 +90,7 @@ jobs: run: make test_elixir continue-on-error: ${{ matrix.development == true }} env: - COVER: "${{ matrix.coverage }}" + COVER: ${{ matrix.coverage }} - name: Build docs (ExDoc main) if: ${{ matrix.docs }} @@ -94,11 +103,11 @@ jobs: git fetch --tags DOCS_OPTIONS="--warnings-as-errors" make docs - - name: "Calculate Coverage" + - name: Calculate Coverage if: ${{ matrix.coverage }} run: make cover | tee "$GITHUB_STEP_SUMMARY" - - name: "Upload Coverage Artifact" + - name: Upload Coverage Artifact if: ${{ matrix.coverage }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: @@ -109,6 +118,7 @@ jobs: if: ${{ matrix.deterministic }} run: | rm -rf .git + # Recompile System without .git cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd - taskset 1 make check_reproducible @@ -143,7 +153,10 @@ jobs: run: bin/elixir --version - name: Check format - run: make test_formatted && echo "All Elixir source code files are properly formatted." + shell: bash + run: | + make test_formatted && \ + echo "All Elixir source code files are properly formatted." - name: Erlang test suite run: make test_erlang From bba5f35fb1dc605c9b2f39ddf9349d78acc5cad1 Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Thu, 4 Dec 2025 10:28:11 -0500 Subject: [PATCH 2/5] CI: Improve paths in ci.yml --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4459d79d23..d5ad3424e11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,7 @@ name: Elixir Building and Testing on: push: - paths-ignore: - - "lib/**/*.md" - pull_request: - paths-ignore: - - "lib/**/*.md" env: ELIXIR_ASSERT_TIMEOUT: 2000 From a38c40ef6692f554f116fd6576a78e11e0a581e5 Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Sat, 29 Nov 2025 23:01:51 -0500 Subject: [PATCH 3/5] CI: Optimize tests in ci.yml Avoid unnecessary checks for certain jobs. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ad3424e11..266343a5d35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ name: Elixir Building and Testing on: push: pull_request: + workflow_dispatch: env: ELIXIR_ASSERT_TIMEOUT: 2000 @@ -23,10 +24,13 @@ jobs: strategy: fail-fast: false + matrix: include: - otp_version: "28.1" + erlc_opts: "warnings_as_errors" deterministic: true + skip_format_and_tests: true - otp_version: "28.1" erlc_opts: "warnings_as_errors" @@ -73,15 +77,18 @@ jobs: run: bin/elixir --version - name: Check format + if: ${{ !matrix.skip_format_and_tests }} run: | make test_formatted && \ echo "All Elixir source code files are properly formatted." - name: Erlang test suite + if: ${{ !matrix.skip_format_and_tests }} run: make test_erlang continue-on-error: ${{ matrix.development == true }} - name: Elixir test suite + if: ${{ !matrix.skip_format_and_tests || matrix.coverage }} run: make test_elixir continue-on-error: ${{ matrix.development == true }} env: From 69f17850ca3e21cfacd6177f1d4085b018a5cccf Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Thu, 4 Dec 2025 10:54:04 -0500 Subject: [PATCH 4/5] CI: Simplify warnings_as_errors logic --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 266343a5d35..426330924c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,20 +28,16 @@ jobs: matrix: include: - otp_version: "28.1" - erlc_opts: "warnings_as_errors" deterministic: true skip_format_and_tests: true - otp_version: "28.1" - erlc_opts: "warnings_as_errors" docs: true coverage: true - otp_version: "27.3" - erlc_opts: "warnings_as_errors" - otp_version: "27.0" - erlc_opts: "warnings_as_errors" - otp_version: "26.0" @@ -54,8 +50,9 @@ jobs: # Earlier Erlang/OTP versions ignored compiler directives # when using warnings_as_errors. So we only set ERLC_OPTS # from Erlang/OTP 27+. + # Additionally, we do not set warnings_as_errors for development branches. env: - ERLC_OPTS: ${{ matrix.erlc_opts }} + ERLC_OPTS: ${{ !(startsWith(matrix.otp_version, '26') || matrix.development) && 'warnings_as_errors' || '' }} steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 From 9b5673c88937adae3601d49f46506a941d33b288 Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Thu, 4 Dec 2025 12:31:36 -0500 Subject: [PATCH 5/5] CI: Add ERLC_OPTS for Windows --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 426330924c3..dd58602145e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,12 +127,20 @@ jobs: runs-on: windows-2022 strategy: + fail-fast: false + matrix: otp_version: - "28.1" - "27.3" - "26.2" + # Earlier Erlang/OTP versions ignored compiler directives + # when using warnings_as_errors. So we only set ERLC_OPTS + # from Erlang/OTP 27+. + env: + ERLC_OPTS: ${{ !startsWith(matrix.otp_version, '26') && 'warnings_as_errors' || '' }} + steps: - name: Configure Git run: git config --global core.autocrlf input