From a0518a4ee171598dddfc6ae9202074cfe13945d5 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 20 Jan 2024 22:35:08 -0500 Subject: Add a build and test pipeline for elixir 1.15 with a new naming convention --- .gitlab-ci.yml | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb31a8086..1b581d50f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ check-changelog: tags: - amd64 -build: +build-1.12.3: extends: - .build_changes_policy - .using-ci-base @@ -79,6 +79,16 @@ build: script: - mix compile --force +build-1.15.7-otp-25: + extends: + - .build_changes_policy + - .using-ci-base + stage: build + image: elixir:1.15.7-otp-25 + allow_failure: true + script: + - mix compile --force + spec-build: extends: - .using-ci-base @@ -110,20 +120,17 @@ benchmark: - mix ecto.migrate - mix pleroma.load_testing -unit-testing: +unit-testing-1.12.3: extends: - .build_changes_policy - .using-ci-base stage: test cache: &testing_cache_policy - <<: *global_cache_policy - policy: pull - - services: + services: &testing_services - name: postgres:13-alpine alias: postgres command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - script: + script: &testing_script - mix ecto.create - mix ecto.migrate - mix test --cover --preload-modules @@ -134,6 +141,17 @@ unit-testing: coverage_format: cobertura path: coverage.xml +unit-testing-1.15.7-otp-25: + extends: + - .build_changes_policy + - .using-ci-base + stage: test + image: elixir:1.15.7-otp-25 + allow_failure: true + cache: *testing_cache_policy + services: *testing_services + script: *testing_script + unit-testing-erratic: extends: - .build_changes_policy @@ -141,14 +159,8 @@ unit-testing-erratic: stage: test retry: 2 allow_failure: true - cache: &testing_cache_policy - <<: *global_cache_policy - policy: pull - - services: - - name: postgres:13-alpine - alias: postgres - command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + cache: *testing_cache_policy + services: *testing_services script: - mix ecto.create - mix ecto.migrate -- cgit v1.2.3 From df31ec0d52e74ed04021c2b6f0166083117cc7b0 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 20 Jan 2024 22:43:41 -0500 Subject: Linting as a separate stage --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b581d50f..4bf29b5a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,7 @@ cache: &global_cache_policy stages: - check-changelog - build + - lint - test - benchmark - deploy @@ -185,10 +186,10 @@ unit-testing-rum: - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" - mix test --preload-modules -lint: +formatting: extends: .build_changes_policy image: ¤t_elixir elixir:1.13-alpine - stage: test + stage: lint cache: *testing_cache_policy before_script: ¤t_bfr_script - apk update @@ -203,7 +204,7 @@ analysis: extends: - .build_changes_policy - .using-ci-base - stage: test + stage: lint cache: *testing_cache_policy script: - mix credo --strict --only=warnings,todo,fixme,consistency,readability @@ -211,7 +212,7 @@ analysis: cycles: extends: .build_changes_policy image: *current_elixir - stage: test + stage: lint cache: {} before_script: *current_bfr_script script: -- cgit v1.2.3 From 06ac829eb4cc5cc9b9c34ec711be134be93e97cc Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 20 Jan 2024 22:45:29 -0500 Subject: Spec building should be in build stage --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4bf29b5a5..635d6a6a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ build-1.15.7-otp-25: spec-build: extends: - .using-ci-base - stage: test + stage: build rules: - changes: - ".gitlab-ci.yml" -- cgit v1.2.3 From 17904003139f72780fcb151491e706f3cdd2374d Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 20 Jan 2024 22:49:37 -0500 Subject: Add Dialyxir with manual job execution --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 635d6a6a8..fde220020 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -209,6 +209,19 @@ analysis: script: - mix credo --strict --only=warnings,todo,fixme,consistency,readability +dialyzer: + extends: + - .build_changes_policy + - .using-ci-base + stage: lint + allow_failure: true + when: manual + cache: *testing_cache_policy + tags: + - feld + script: + - mix dialyzer + cycles: extends: .build_changes_policy image: *current_elixir -- cgit v1.2.3 From 68f421c203b8b5b178abf0f6dd0e10ee09063d5a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 20 Jan 2024 22:53:07 -0500 Subject: Use our own 1.15 ci-base image --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fde220020..094e45cf5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ build-1.15.7-otp-25: - .build_changes_policy - .using-ci-base stage: build - image: elixir:1.15.7-otp-25 + image: git.pleroma.social:5050/pleroma/pleroma/ci-base-1.15 allow_failure: true script: - mix compile --force @@ -147,7 +147,7 @@ unit-testing-1.15.7-otp-25: - .build_changes_policy - .using-ci-base stage: test - image: elixir:1.15.7-otp-25 + image: git.pleroma.social:5050/pleroma/pleroma/ci-base-1.15 allow_failure: true cache: *testing_cache_policy services: *testing_services -- cgit v1.2.3 From 058fa5471a0d0bfe9eb774e9aa34504ab4d9d90a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 21 Jan 2024 04:06:17 +0000 Subject: Fix the image name --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 094e45cf5..ca17be7c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ build-1.15.7-otp-25: - .build_changes_policy - .using-ci-base stage: build - image: git.pleroma.social:5050/pleroma/pleroma/ci-base-1.15 + image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15 allow_failure: true script: - mix compile --force @@ -147,7 +147,7 @@ unit-testing-1.15.7-otp-25: - .build_changes_policy - .using-ci-base stage: test - image: git.pleroma.social:5050/pleroma/pleroma/ci-base-1.15 + image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15 allow_failure: true cache: *testing_cache_policy services: *testing_services -- cgit v1.2.3 From 8f0051d73929ad515cc1582f727d21e49af40d6a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 21 Jan 2024 04:10:20 +0000 Subject: Rename 1.15 image to include otp25, clarify test names --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca17be7c1..41132864b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,13 +147,13 @@ unit-testing-1.15.7-otp-25: - .build_changes_policy - .using-ci-base stage: test - image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15 + image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15-otp25 allow_failure: true cache: *testing_cache_policy services: *testing_services script: *testing_script -unit-testing-erratic: +unit-testing-1.12-erratic: extends: - .build_changes_policy - .using-ci-base @@ -167,7 +167,7 @@ unit-testing-erratic: - mix ecto.migrate - mix test --only=erratic -unit-testing-rum: +unit-testing-1.12-rum: extends: - .build_changes_policy - .using-ci-base -- cgit v1.2.3 From 518ddd458c1c111decf55d3ed7d00e4d3d6f65cd Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 21 Jan 2024 04:14:41 +0000 Subject: Clarify formatting and cycles versions --- .gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41132864b..b6880a34c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -186,9 +186,9 @@ unit-testing-1.12-rum: - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" - mix test --preload-modules -formatting: +formatting-1.13: extends: .build_changes_policy - image: ¤t_elixir elixir:1.13-alpine + image: &formatting_elixir elixir:1.13-alpine stage: lint cache: *testing_cache_policy before_script: ¤t_bfr_script @@ -200,6 +200,16 @@ formatting: script: - mix format --check-formatted +cycles-1.13: + extends: .build_changes_policy + image: *formatting_elixir + stage: lint + cache: {} + before_script: *current_bfr_script + script: + - mix compile + - mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}' + analysis: extends: - .build_changes_policy @@ -222,16 +232,6 @@ dialyzer: script: - mix dialyzer -cycles: - extends: .build_changes_policy - image: *current_elixir - stage: lint - cache: {} - before_script: *current_bfr_script - script: - - mix compile - - mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}' - docs-deploy: stage: deploy cache: *testing_cache_policy -- cgit v1.2.3 From badd7654fdbd7003631e8f1b17635076d0f9e069 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 21 Jan 2024 04:29:13 +0000 Subject: Fix testing cache policy --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6880a34c..d5cbc037d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -150,6 +150,8 @@ unit-testing-1.15.7-otp-25: image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15-otp25 allow_failure: true cache: *testing_cache_policy + <<: *global_cache_policy + policy: pull services: *testing_services script: *testing_script -- cgit v1.2.3 From 951a82f2d72dcb0c4e1024f1e006dd1a17d1ab82 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 21 Jan 2024 04:35:31 +0000 Subject: Fix testing cache policy --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5cbc037d..8f1839c42 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,6 +127,8 @@ unit-testing-1.12.3: - .using-ci-base stage: test cache: &testing_cache_policy + <<: *global_cache_policy + policy: pull services: &testing_services - name: postgres:13-alpine alias: postgres @@ -150,8 +152,6 @@ unit-testing-1.15.7-otp-25: image: git.pleroma.social:5050/pleroma/pleroma/ci-base:elixir-1.15-otp25 allow_failure: true cache: *testing_cache_policy - <<: *global_cache_policy - policy: pull services: *testing_services script: *testing_script -- cgit v1.2.3 From f0cca36e07fd3e0b4677e4a5daf626f3ef74dfec Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Sun, 17 Mar 2024 15:39:24 +0400 Subject: CI: Remove RUM tests. --- .gitlab-ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f1839c42..09ce2efd9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -169,25 +169,6 @@ unit-testing-1.12-erratic: - mix ecto.migrate - mix test --only=erratic -unit-testing-1.12-rum: - extends: - - .build_changes_policy - - .using-ci-base - stage: test - cache: *testing_cache_policy - services: - - name: git.pleroma.social:5050/pleroma/pleroma/postgres-with-rum-13 - alias: postgres - command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - variables: - <<: *global_variables - RUM_ENABLED: "true" - script: - - mix ecto.create - - mix ecto.migrate - - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" - - mix test --preload-modules - formatting-1.13: extends: .build_changes_policy image: &formatting_elixir elixir:1.13-alpine -- cgit v1.2.3 From 7f97fbc1ae8d38c88d32739e968b4f2572c755a8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 18 Mar 2024 15:36:26 -0400 Subject: Update minimum Postgres version to 11.0; disable JIT This release is where JIT was introduced and it should be disabled. Pleroma's queries do not benefit from JIT, but it can increase latency of queries. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09ce2efd9..79bb2fd7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -113,7 +113,7 @@ benchmark: variables: MIX_ENV: benchmark services: - - name: postgres:9.6-alpine + - name: postgres:11.22-alpine alias: postgres command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] script: -- cgit v1.2.3 From afae3a94a4d91627ec204f9e1909d0400ec6497f Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Tue, 19 Mar 2024 13:54:35 +0400 Subject: CI: Move changelog check to later in the pipeline No reason to not run tests. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79bb2fd7e..dab52e4c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,10 +26,10 @@ cache: &global_cache_policy - _build stages: - - check-changelog - build - lint - test + - check-changelog - benchmark - deploy - release -- cgit v1.2.3