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/6] ci: execute LuaJIT tests with GCC 10 and ASAN
Date: Tue, 26 Mar 2024 11:33:27 +0300	[thread overview]
Message-ID: <e9ec0f2f5aad000c999df938a4f1ee3cc4e93108.1711441864.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1711441864.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@tarantool.org>

The commit fa8e9e9a721e ("test: enable <catch_wrap.lua> LuaJIT test")
brings a workaround to CMake for running tests with LuaJIT built by GCC
with enabled AddressSanitizer. However, we have no such configuration in
CI, which 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 are 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

Follows up tarantool/tarantool#9398
Relates to tarantool/tarantool#9656
---
 .github/actions/setup-sanitizers/action.yml | 15 ++++++++++++---
 .github/workflows/sanitizers-testing.yml    |  4 ++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/.github/actions/setup-sanitizers/action.yml b/.github/actions/setup-sanitizers/action.yml
index 4b74f39d..8642d553 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 specific 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..a06398ea 100644
--- a/.github/workflows/sanitizers-testing.yml
+++ b/.github/workflows/sanitizers-testing.yml
@@ -33,6 +33,7 @@ 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
@@ -42,6 +43,7 @@ jobs:
     name: >
       LuaJIT with ASan (Linux/x86_64)
       ${{ matrix.BUILDTYPE }}
+      CC:${{ matrix.CC }}
       GC64:ON SYSMALLOC:ON
     steps:
       - uses: actions/checkout@v3
@@ -50,6 +52,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-26  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  8:33 [Tarantool-patches] [PATCH luajit 0/6][v5] cmake: replace prove with CTest Sergey Bronnikov via Tarantool-patches
2024-03-26  8:33 ` Sergey Bronnikov via Tarantool-patches [this message]
2024-03-26  9:51   ` [Tarantool-patches] [PATCH luajit 1/6] ci: execute LuaJIT tests with GCC 10 and ASAN Sergey Kaplun via Tarantool-patches
2024-03-26  8:33 ` [Tarantool-patches] [PATCH luajit 2/6] test: refactor CMake macro LibRealPath Sergey Bronnikov via Tarantool-patches
2024-03-26  9:57   ` Sergey Kaplun via Tarantool-patches
2024-03-26  8:33 ` [Tarantool-patches] [PATCH luajit 3/6] test: move LibRealPath to the separate module Sergey Bronnikov via Tarantool-patches
2024-03-26 10:01   ` Sergey Kaplun via Tarantool-patches
2024-03-26  8:33 ` [Tarantool-patches] [PATCH luajit 4/6] test: more cautious usage of LD_PRELOAD for ASan Sergey Bronnikov via Tarantool-patches
2024-03-26 10:04   ` Sergey Kaplun via Tarantool-patches
2024-03-26  8:33 ` [Tarantool-patches] [PATCH luajit 5/6] test: fix lj-802-panic-at-mcode-protfail GCC+ASan Sergey Bronnikov via Tarantool-patches
2024-03-26 10:08   ` Sergey Kaplun via Tarantool-patches
2024-03-26 15:22     ` Sergey Bronnikov via Tarantool-patches
2024-03-26  8:33 ` [Tarantool-patches] [PATCH luajit 6/6] cmake: replace prove with CTest Sergey Bronnikov via Tarantool-patches
2024-03-26 11:03   ` Sergey Kaplun via Tarantool-patches
2024-04-01 14:28     ` Sergey Bronnikov via Tarantool-patches
2024-04-01 18:46       ` Sergey Kaplun via Tarantool-patches
2024-04-11 16:47 ` [Tarantool-patches] [PATCH luajit 0/6][v5] " Sergey Kaplun 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=e9ec0f2f5aad000c999df938a4f1ee3cc4e93108.1711441864.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/6] 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