From be8b637a3febd881f00da1215a07b14845a99889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 2 Dec 2025 11:07:30 +0100 Subject: [PATCH 1/2] Clean up CI and unify coverage and docs build --- .github/workflows/ci.yml | 49 +++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 816ba87aaf..b83c7fc413 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: push: paths-ignore: - "lib/**/*.md" + pull_request: paths-ignore: - "lib/**/*.md" @@ -22,7 +23,7 @@ permissions: jobs: test_linux: - name: Ubuntu 24.04, Erlang/OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }} + name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }} runs-on: ubuntu-24.04 strategy: @@ -33,10 +34,8 @@ jobs: deterministic: true - otp_version: "28.1" erlc_opts: "warnings_as_errors" + docs: true coverage: true - - otp_version: "28.1" - otp_latest: true - erlc_opts: "warnings_as_errors" - otp_version: "27.3" erlc_opts: "warnings_as_errors" - otp_version: "27.0" @@ -54,35 +53,38 @@ jobs: ERLC_OPTS: ${{ matrix.erlc_opts || '' }} steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 50 + - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 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 }} + - name: Elixir test suite run: make test_elixir continue-on-error: ${{ matrix.development }} env: COVER: "${{ matrix.coverage }}" - - name: "Calculate Coverage" - run: make cover | tee "$GITHUB_STEP_SUMMARY" - if: "${{ matrix.coverage }}" + - name: Build docs (ExDoc main) - if: ${{ matrix.otp_latest }} + if: ${{ matrix.docs }} run: | cd .. git clone https://github.com/elixir-lang/ex_doc.git --depth 1 @@ -91,6 +93,18 @@ jobs: 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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: TestCoverage + path: cover/* + - name: Check reproducible builds if: ${{ matrix.deterministic }} run: | @@ -98,12 +112,6 @@ jobs: # Recompile System without .git cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd - taskset 1 make check_reproducible - - name: "Upload Coverage Artifact" - if: "${{ matrix.coverage }}" - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: TestCoverage - path: cover/* test_windows: name: Windows Server 2022, Erlang/OTP ${{ matrix.otp_version }} @@ -119,22 +127,27 @@ jobs: steps: - name: Configure Git run: git config --global core.autocrlf input + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 50 + - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 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' From d7ada49fd72f1b2e6cd7ab2a467dbae530c4c687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 2 Dec 2025 11:08:13 +0100 Subject: [PATCH 2/2] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b83c7fc413..ed414da233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: taskset 1 make check_reproducible test_windows: - name: Windows Server 2022, Erlang/OTP ${{ matrix.otp_version }} + name: Windows Server 2022, OTP ${{ matrix.otp_version }} runs-on: windows-2022 strategy: