Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org,
	Sergey Kaplun <skaplun@tarantool.org>,
	Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Subject: [Tarantool-patches] [PATCH luajit 1/3][v4] ci: execute LuaJIT tests with GCC 10 and ASAN
Date: Thu, 21 Mar 2024 17:01:58 +0300	[thread overview]
Message-ID: <ff6db782a89ee2898babc3880e55b71dbde5f71b.1711029149.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1711029149.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@tarantool.org>

The commit fa8e9e9a721e ("test: enable <catch_wrap.lua> LuaJIT test")
bring a workaround to CMake for running tests with LuaJIT built
by GCC with enabled AddressSanitizer. However, we have
no such configuration in CI, it means that sooner or
later it will be broken.

The patch adds a job to GH Actions that builds LuaJIT with GCC 10
with enabled AddressSanitizer and runs LuaJIT tests.
Linux builds built by runners on Ubuntu Focal, where GCC 10
is the latest version [1] available in packages.

Library libstdc++ is needed by the test `catch_wrap.lua`
for a workaround with AddressSanitizer.

1. https://packages.ubuntu.com/focal/gcc-10
---
 .github/actions/setup-sanitizers/action.yml | 15 ++++++++++++---
 .github/workflows/sanitizers-testing.yml    | 11 +++++++++++
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/.github/actions/setup-sanitizers/action.yml b/.github/actions/setup-sanitizers/action.yml
index 4b74f39d..bab40d2b 100644
--- a/.github/actions/setup-sanitizers/action.yml
+++ b/.github/actions/setup-sanitizers/action.yml
@@ -1,5 +1,10 @@
 name: Setup CI environment for testing with sanitizers on Linux
 description: Common part to tweak Linux CI runner environment for sanitizers
+inputs:
+  cc_name:
+    description: C compiler name (for example, gcc-12)
+    required: false
+    default: clang-11
 runs:
   using: composite
   steps:
@@ -15,9 +20,13 @@ runs:
     - name: Install build and test dependencies
       run: |
         apt -y update
-        apt -y install clang-11 cmake ninja-build make perl
+        apt -y install ${CC_NAME} libstdc++-10-dev cmake ninja-build make perl
       shell: bash
-    - name: Set Clang as a default toolchain
+      env:
+        CC_NAME: ${{ inputs.cc_name }}
+    - name: Set C compiler as a default toolchain
       run: |
-        echo CC=clang-11 | tee -a $GITHUB_ENV
+        echo CC=${CC_NAME} | tee -a $GITHUB_ENV
       shell: bash
+      env:
+        CC_NAME: ${{ inputs.cc_name }}
diff --git a/.github/workflows/sanitizers-testing.yml b/.github/workflows/sanitizers-testing.yml
index 4bccfcef..5a24d4ca 100644
--- a/.github/workflows/sanitizers-testing.yml
+++ b/.github/workflows/sanitizers-testing.yml
@@ -33,15 +33,24 @@ jobs:
       matrix:
         # XXX: Let's start with only Linux/x86_64
         BUILDTYPE: [Debug, Release]
+        CC: [gcc-10, clang-11]
         include:
           - BUILDTYPE: Debug
             CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON
+            CC: gcc-10
+          - BUILDTYPE: Debug
+            CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON
+            CC: clang-11
           - BUILDTYPE: Release
             CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo
+        exclude:
+          - BUILDTYPE: Release
+            CC: gcc-10
     runs-on: [self-hosted, regular, Linux, x86_64]
     name: >
       LuaJIT with ASan (Linux/x86_64)
       ${{ matrix.BUILDTYPE }}
+      CC:${{ matrix.CC }}
       GC64:ON SYSMALLOC:ON
     steps:
       - uses: actions/checkout@v3
@@ -50,6 +59,8 @@ jobs:
           submodules: recursive
       - name: setup Linux for sanitizers
         uses: ./.github/actions/setup-sanitizers
+        with:
+          cc_name: ${{ matrix.CC }}
       - name: configure
         # XXX: LuaJIT configuration requires a couple of tweaks:
         # LUAJIT_USE_SYSMALLOC=ON: Unfortunately, internal LuaJIT
-- 
2.34.1


  reply	other threads:[~2024-03-21 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 14:01 [Tarantool-patches] [PATCH luajit 0/3][v4] cmake: replace prove with CTest Sergey Bronnikov via Tarantool-patches
2024-03-21 14:01 ` Sergey Bronnikov via Tarantool-patches [this message]
2024-03-21 14:02 ` [Tarantool-patches] [PATCH luajit 2/3][v4] test: update CMake macro LibRealPath Sergey Bronnikov via Tarantool-patches
2024-03-21 15:00   ` Sergey Kaplun via Tarantool-patches
2024-03-22 12:34     ` Sergey Bronnikov via Tarantool-patches
2024-03-21 14:02 ` [Tarantool-patches] [PATCH luajit 3/3][v4] cmake: replace prove with CTest Sergey Bronnikov via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff6db782a89ee2898babc3880e55b71dbde5f71b.1711029149.git.sergeyb@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 1/3][v4] ci: execute LuaJIT tests with GCC 10 and ASAN' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox