Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Update InterOp builds to Ubuntu 24.04 #290

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 41 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,40 @@ jobs:
fail-fast: false
matrix:
include:
- name: ubu22-x86-gcc12-clang-repl-19
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-19
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '19'
cling: Off
cppyy: On
llvm_enable_projects: "clang;lld"
llvm_targets_to_build: "WebAssembly;host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-18
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-18
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '18'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-17
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-17
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc12-clang-repl-16
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-16
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '16'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu22-x86-gcc9-clang13-cling
os: ubuntu-22.04
- name: ubu24-x86-gcc9-clang13-cling
os: ubuntu-24.04
compiler: gcc-9
clang-runtime: '13'
cling: On
Expand Down Expand Up @@ -354,6 +354,7 @@ jobs:
if: ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
run: |
# Install deps
sudo apt remove needrestart
sudo apt-get update
sudo apt-get install valgrind
sudo apt-get autoremove
Expand Down Expand Up @@ -539,40 +540,40 @@ jobs:
fail-fast: false
matrix:
include:
- name: ubu22-x86-gcc12-clang-repl-19-docs
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-19-docs
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '19'
cling: Off
cppyy: Off
documentation: On
- name: ubu22-x86-gcc12-clang-repl-19-cppyy
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-19-cppyy
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '19'
cling: Off
cppyy: On
coverage: true
- name: ubu22-x86-gcc12-clang-repl-18-cppyy
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-18-cppyy
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '18'
cling: Off
cppyy: On
- name: ubu22-x86-gcc12-clang-repl-17-cppyy
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-17-cppyy
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '17'
cling: Off
cppyy: On
- name: ubu22-x86-gcc12-clang-repl-16
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-16
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '16'
cling: Off
cppyy: Off
- name: ubu22-x86-gcc9-clang13-cling-cppyy
os: ubuntu-22.04
- name: ubu24-x86-gcc9-clang13-cling-cppyy
os: ubuntu-24.04
compiler: gcc-9
clang-runtime: '13'
cling: On
Expand Down Expand Up @@ -836,6 +837,7 @@ jobs:
if: runner.os == 'Linux'
run: |
# Install deps
sudo apt remove needrestart
sudo apt-get update
sudo apt-get install git g++ debhelper devscripts gnupg python3 doxygen graphviz python3-sphinx
sudo apt-get install -y libc6-dbg
Expand Down Expand Up @@ -1030,7 +1032,7 @@ jobs:
# Create lcov report
# capture coverage info
vers="${CC#*-}"
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers} --rc geninfo_unexecuted_blocks=1 --ignore-errors mismatch,mismatch
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
# output coverage data for debugging (optional)
lcov --list coverage.info
Expand Down Expand Up @@ -1069,6 +1071,9 @@ jobs:
run: |
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install setuptools
pip install wheel
# Install CPyCppyy
git clone --depth=1 https://github.com/compiler-research/CPyCppyy.git
mkdir CPyCppyy/build
Expand All @@ -1088,7 +1093,7 @@ jobs:
# Install cppyy
git clone --depth=1 https://github.com/compiler-research/cppyy.git
cd cppyy
python -m pip install --upgrade . --no-deps
python -m pip install --upgrade . --no-deps --no-build-isolation
cd ..
- name: Run cppyy on Unix Systems
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
Expand All @@ -1107,7 +1112,6 @@ jobs:
cd cppyy/test
echo ::group::Prepare For Testing
make all
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest-xdist
python -m pip install numba
Expand Down Expand Up @@ -1179,9 +1183,9 @@ jobs:
fail-fast: false
matrix:
include:
- name: ubu22-x86-gcc12-clang-repl-19-emscripten_wasm
os: ubuntu-22.04
compiler: gcc-12
- name: ubu24-x86-gcc13-clang-repl-19-emscripten_wasm
os: ubuntu-24.04
compiler: gcc-13
clang-runtime: '19'
cling: Off
micromamba_shell_init: bash
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ endif()

# Add appropriate flags for GCC
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
endif ()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
endif ()
endif ()

# Fixes "C++ exception handler used, but unwind semantics are not enabled" warning Windows
Expand Down
7 changes: 6 additions & 1 deletion lib/Interpreter/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2737,7 +2737,12 @@ namespace Cpp {
#define DEBUG_TYPE "exec"

std::array<char, 256> buffer;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
struct pclose_deleter {
void operator()(struct FILE* d) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: typedef 'FILE' cannot be referenced with a struct specifier [clang-diagnostic-error]

      void operator()(struct FILE* d) const {
                             ^
Additional context

/usr/include/x86_64-linux-gnu/bits/types/FILE.h:6: declared here

typedef struct _IO_FILE FILE;
                        ^

pclose(d);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no matching function for call to 'pclose' [clang-diagnostic-error]

        pclose(d);
        ^
Additional context

/usr/include/stdio.h:896: candidate function not viable: cannot convert argument of incomplete type 'struct DIR *' to 'FILE *' (aka '_IO_FILE *') for 1st argument

extern int pclose (FILE *__stream) __nonnull ((1));
           ^

}
};
std::unique_ptr<FILE, pclose_deleter > pipe(popen(cmd, "r"), pclose);
mcbarton marked this conversation as resolved.
Show resolved Hide resolved
mcbarton marked this conversation as resolved.
Show resolved Hide resolved
mcbarton marked this conversation as resolved.
Show resolved Hide resolved
LLVM_DEBUG(dbgs() << "Executing command '" << cmd << "'\n");

if (!pipe) {
Expand Down
Loading