Tarantool development patches archive
 help / color / mirror / Atom feed
From: Evgeniy Temirgaleev via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: "Sergey Kaplun" <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches]  [PATCH luajit v3 2/3] ci: enabled sanitizer tests for macOS
Date: Thu, 20 Aug 2026 10:53:59 +0300	[thread overview]
Message-ID: <1787212439.338401476@1.f.mail-release.rc.mrucl.ru> (raw)
In-Reply-To: <aoVbsdcKhAA2_8YI@root>

[-- Attachment #1: Type: text/plain, Size: 9290 bytes --]

Hi, Sergey!
Fixed your suggestions. The branch is force pushed.

> 
> From: Sergey Kaplun <skaplun@tarantool.org>
> To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> Cc: Sergey Bronnikov <sergeyb@tarantool.org>, tarantool-patches@dev.tarantool.org
> 
> Date: Wednesday, August 19, 2026 10:31 AM +03:00
> Hi, Evgeniy!
> Thanks for the answers!
> LGTM, with minor suggestion below.
> 
> On 18.08.26, Evgeniy Temirgaleev wrote:
> > Hi, Sergey! Thanks for review!
> >
> > >
> > > From: Sergey Kaplun <skaplun@tarantool.org>
> 
> <snipped>
> 
> > > b/.github/actions/setup-sanitizers-linux/action.yml
> > > > similarity index 76%
> > > > rename from .github/actions/setup-sanitizers/action.yml
> > > > rename to .github/actions/setup-sanitizers-linux/action.yml
> > > > index 8642d553..18f5a75d 100644
> > > > --- a/.github/actions/setup-sanitizers/action.yml
> > > > +++ b/.github/actions/setup-sanitizers-linux/action.yml
> > > > @@ -20,13 +20,17 @@ runs:
> > > > - name: Install build and test dependencies
> > > > run: |
> > > > apt -y update
> > > > + echo Available compilers:
> > > > + export CC_FAMILY=`echo ${CC_NAME} | sed 's/-.*$//'`
> > > > + apt list | grep -Pe "^${CC_FAMILY}-[0-9]+/"
> > > > + # Try to install
> > > > apt -y install ${CC_NAME} libstdc++-10-dev cmake ninja-build make
> perl
> > > > shell: bash
> > > > env:
> > > > CC_NAME: ${{ inputs.cc_name }}
> > > > - - name: Set specific C compiler as a default toolchain
> > > > + - name: Set specific C compiler as a default toolchain for cmake
> > > > run: |
> > > > - echo CC=${CC_NAME} | tee -a $GITHUB_ENV
> > > > + echo CMAKE_C_COMPILER=${CC_NAME} | tee -a $GITHUB_ENV
> > > > shell: bash
> > > > env:
> > > > CC_NAME: ${{ inputs.cc_name }}
> > >
> > > These changes look like debugging of the workflow. Are they necessary?
> 
> > >
> >
> > I think it’s a useful information: Which compiler we can select just now
> with the current runner? For example, it used to answer your question
> below.
> > I added it advisedly, as it done for macOS action.
> 
> Got it. Please add the comment and the note about it in the commit
> message to avoid confusion.
> 

Added the note to commit message and extended corresponding jobs title with ‘ List available compilers. ’.

> 
> 
> >
> > >
> > >
> > > > diff --git a/.github/actions/setup-sanitizers-macos/README.md
> > > b/.github/actions/setup-sanitizers-macos/README.md
> > > > new file mode 100644
> > > > index 00000000..9ac5eb38
> > > > --- /dev/null
> > > > +++ b/.github/actions/setup-sanitizers-macos/README.md
> > >
> > > <snipped>
> > >
> > > > diff --git a/.github/actions/setup-sanitizers-macos/action.yml
> > > b/.github/actions/setup-sanitizers-macos/action.yml
> > > > new file mode 100644
> > > > index 00000000..9836ea03
> > > > --- /dev/null
> > > > +++ b/.github/actions/setup-sanitizers-macos/action.yml
> > > > @@ -0,0 +1,73 @@
> > >
> > > <snipped>
> > >
> > > > + - name: Set CMAKE_BUILD_PARALLEL_LEVEL
> > > > + shell: bash
> > > > + run: |
> > > > + # Set CMAKE_BUILD_PARALLEL_LEVEL environment variable to
> > > > + # limit the number of parallel jobs for build/test step.
> > > > + NPROC=$(sysctl -n hw.logicalcpu 2>/dev/null)
> > > > + echo CMAKE_BUILD_PARALLEL_LEVEL=$(($NPROC + 1)) | tee -a
> $GITHUB_ENV
> > > > + - name: Set MACOSX_DEPLOYMENT_TARGERT
> > > > + shell: bash
> > > > + run: |
> > > > + # Set required MACOSX_DEPLOYMENT_TARGERT environment
> > > > + # variable for Makefile.original build.
> > > > + # See https://github.com/LuaJIT/LuaJIT/issues/484,
> > > > + # https://github.com/LuaJIT/LuaJIT/issues/653.
> > > > + echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) | tee -a
> > > $GITHUB_ENV
> > > > + - name: Install build and test dependencies
> > > > + shell: bash
> > > > + run: |
> > > > + # Install brew using the command from Homebrew repository
> > > > + # instructions: https://github.com/Homebrew/install.
> > > > + # XXX: 'echo' command below is required since brew
> > > > + # installation script obliges the one to enter a newline
> > > > + # for confirming the installation via Ruby script.
> > > > + brew update ||
> > > > + echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install
> 
> > > )"
> > > > + # Try to install the packages either upgrade it to avoid
> > > > + # of fails if the package already exists with the previous
> > > > + # version.
> > > > + brew install --force ${CC_FORMULA} cmake make ninja perl ||
> > > > + brew upgrade ${CC_FORMULA} cmake make ninja perl
> > >
> > > Can we reuse setup-macos action instead these 3 steps?
> > >
> >
> > Yes, we can do it on top of the «ci: unused gcc removed from macOS
> setup» patch.
> > So, we need to merge it first.
> 
> Do we? Don't understand why it is required. The gcc instalation and
> upgrade looks harmless, IINM.
> 

I meant what we can’t get the same behavior: just install the expected version of the compiler. But you is right, it’s not important, we can reinstall gcc or ignore it also.

Rewrited with «setup macos» action.

Thanks! The code was very reduced.

> 
> 
> >  And then I shall update this patch.
> > Thanks for the notice.
> >
> > >
> > >
> 

<snipped>

> 
> --
> Best regards,
> Sergey Kaplun
> 

P.S. There is clang-22 is available with brew on macOS. But it fails with three tests on x86_64 (ARM64 tests were passed all). So, I set clang-21 for use as it good with all tests on both architectures.
---

Full commit message and diff are below:
---
ci: enabled sanitizer tests for macOS

The arm64 and x86_64 architectures with clang/gcc compiler were added
to the matrix.

Also, the 'setup-sanitizers-macos' action supplied with
the 'list available compilers' commands in one of it's job.
It helps to get the answer to the question:
'Which compiler we can select just now with our current environment?'

The 'setup-sanitizers-linux' build job extended with such commands also.

diff --git a/.github/actions/setup-sanitizers-linux/action.yml b/.github/actions/setup-sanitizers-linux/action.yml
index 18f5a75d..9744e5dd 100644
--- a/.github/actions/setup-sanitizers-linux/action.yml
+++ b/.github/actions/setup-sanitizers-linux/action.yml
@@ -17,7 +17,7 @@ runs:
NPROC=$(nproc)
echo CMAKE_BUILD_PARALLEL_LEVEL=$(($NPROC + 1)) | tee -a $GITHUB_ENV
shell: bash
-    - name: Install build and test dependencies
+    - name: Install build and test dependencies. List available compilers.
run: |
apt -y update
echo Available compilers:
diff --git a/.github/actions/setup-sanitizers-macos/action.yml b/.github/actions/setup-sanitizers-macos/action.yml
index 9836ea03..d2160faa 100644
--- a/.github/actions/setup-sanitizers-macos/action.yml
+++ b/.github/actions/setup-sanitizers-macos/action.yml
@@ -8,13 +8,15 @@ inputs:
runs:
using: composite
steps:
+    - name: Setup CI environment on macOS
+      uses: ./.github/actions/setup-macos
- name: Get compiler version from cc_name
shell: bash
env:
CC_NAME: ${{ inputs.cc_name }}
run: |
echo CC_VERSION=`echo ${CC_NAME} | sed 's/.*-//'` | tee -a $GITHUB_ENV
-    - name: Get brew formula from cc_name
+    - name: Get brew formula from cc_name. List available compilers.
shell: bash
env:
CC_FORMULA_NAME: |-
@@ -26,38 +28,13 @@ runs:
run: |
echo CC_FORMULA=${CC_FORMULA_NAME}@${CC_VERSION} | tee -a $GITHUB_ENV
echo Available formulas: `brew search ${CC_FORMULA_NAME}`
-    - name: Setup CI environment
-      uses: ./.github/actions/setup
-    - name: Set CMAKE_BUILD_PARALLEL_LEVEL
+    - name: Install specified compiler
shell: bash
run: |
-        # Set CMAKE_BUILD_PARALLEL_LEVEL environment variable to
-        # limit the number of parallel jobs for build/test step.
-        NPROC=$(sysctl -n hw.logicalcpu 2>/dev/null)
-        echo CMAKE_BUILD_PARALLEL_LEVEL=$(($NPROC + 1)) | tee -a $GITHUB_ENV
-    - name: Set MACOSX_DEPLOYMENT_TARGERT
-      shell: bash
-      run: |
-        # Set required MACOSX_DEPLOYMENT_TARGERT environment
-        # variable for Makefile.original build.
-        # See https://github.com/LuaJIT/LuaJIT/issues/484,
-        # https://github.com/LuaJIT/LuaJIT/issues/653.
-        echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) | tee -a $GITHUB_ENV
-    - name: Install build and test dependencies
-      shell: bash
-      run: |
-        # Install brew using the command from Homebrew repository
-        # instructions: https://github.com/Homebrew/install.
-        # XXX: 'echo' command below is required since brew
-        # installation script obliges the one to enter a newline
-        # for confirming the installation via Ruby script.
-        brew update ||
-          echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install
)"
# Try to install the packages either upgrade it to avoid
# of fails if the package already exists with the previous
# version.
-        brew install --force ${CC_FORMULA} cmake make ninja perl ||
-          brew upgrade ${CC_FORMULA} cmake make ninja perl
+        brew install --force ${CC_FORMULA} || brew upgrade ${CC_FORMULA}
- name: Set specific C compiler as a default toolchain for cmake
shell: bash
env:

Best regards,
Evgeniy Temirgaleev

[-- Attachment #2: Type: text/html, Size: 14700 bytes --]

  reply	other threads:[~2026-08-20  7:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 12:47 [Tarantool-patches] [PATCH luajit v3 0/3] build: fixed making tests with ASAN on OSX Evgeniy Temirgaleev via Tarantool-patches
2026-08-06 12:47 ` [Tarantool-patches] [PATCH luajit v3 1/3] test: " Evgeniy Temirgaleev via Tarantool-patches
2026-08-18 10:24   ` Sergey Kaplun via Tarantool-patches
2026-08-18 19:23     ` Evgeniy Temirgaleev via Tarantool-patches
2026-08-06 12:47 ` [Tarantool-patches] [PATCH luajit v3 2/3] ci: enabled sanitizer tests for macOS Evgeniy Temirgaleev via Tarantool-patches
2026-08-18 10:47   ` Sergey Kaplun via Tarantool-patches
2026-08-18 20:35     ` Evgeniy Temirgaleev via Tarantool-patches
2026-08-19  7:30       ` Sergey Kaplun via Tarantool-patches
2026-08-20  7:53         ` Evgeniy Temirgaleev via Tarantool-patches [this message]
2026-08-06 12:47 ` [Tarantool-patches] [PATCH luajit v3 3/3] ci: added a common way to disable perf workflow Evgeniy Temirgaleev via Tarantool-patches
2026-08-18 10:25   ` 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=1787212439.338401476@1.f.mail-release.rc.mrucl.ru \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=e.temirgaleev@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches]  [PATCH luajit v3 2/3] ci: enabled sanitizer tests for macOS' \
    /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