Skip to content

Commit 0a4c834

Browse files
authored
Add Ubuntu 24.04 arm runners to ci (#463)
1 parent 207ae3a commit 0a4c834

File tree

3 files changed

+94
-14
lines changed

3 files changed

+94
-14
lines changed

.github/workflows/Ubuntu.yml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,42 @@ jobs:
9494
cling-version: '1.0'
9595
llvm_enable_projects: "clang"
9696
llvm_targets_to_build: "host;NVPTX"
97+
- name: ubu24-arm-gcc12-clang-repl-19
98+
os: ubuntu-24.04-arm
99+
compiler: gcc-12
100+
clang-runtime: '19'
101+
cling: Off
102+
llvm_enable_projects: "clang"
103+
llvm_targets_to_build: "host;NVPTX"
104+
- name: ubu24-arm-gcc12-clang-repl-18
105+
os: ubuntu-24.04-arm
106+
compiler: gcc-12
107+
clang-runtime: '18'
108+
cling: Off
109+
llvm_enable_projects: "clang"
110+
llvm_targets_to_build: "host;NVPTX"
111+
- name: ubu24-arm-gcc12-clang-repl-17
112+
os: ubuntu-24.04-arm
113+
compiler: gcc-12
114+
clang-runtime: '17'
115+
cling: Off
116+
llvm_enable_projects: "clang"
117+
llvm_targets_to_build: "host;NVPTX"
118+
- name: ubu24-arm-gcc12-clang-repl-16
119+
os: ubuntu-24.04-arm
120+
compiler: gcc-12
121+
clang-runtime: '16'
122+
cling: Off
123+
llvm_enable_projects: "clang"
124+
llvm_targets_to_build: "host;NVPTX"
125+
- name: ubu24-arm-gcc9-clang13-cling
126+
os: ubuntu-24.04-arm
127+
compiler: gcc-9
128+
clang-runtime: '13'
129+
cling: On
130+
cling-version: '1.0'
131+
llvm_enable_projects: "clang"
132+
llvm_targets_to_build: "host;NVPTX"
97133

98134
steps:
99135
- uses: actions/checkout@v4
@@ -337,6 +373,33 @@ jobs:
337373
clang-runtime: '13'
338374
cling: On
339375
cling-version: '1.0'
376+
- name: ubu24-arm-gcc12-clang-repl-19
377+
os: ubuntu-24.04-arm
378+
compiler: gcc-12
379+
clang-runtime: '19'
380+
cling: Off
381+
- name: ubu24-arm-gcc12-clang-repl-18
382+
os: ubuntu-24.04-arm
383+
compiler: gcc-12
384+
clang-runtime: '18'
385+
cling: Off
386+
- name: ubu24-arm-gcc12-clang-repl-17
387+
os: ubuntu-24.04-arm
388+
compiler: gcc-12
389+
clang-runtime: '17'
390+
cling: Off
391+
- name: ubu24-arm-gcc12-clang-repl-16
392+
os: ubuntu-24.04-arm
393+
compiler: gcc-12
394+
clang-runtime: '16'
395+
cling: Off
396+
cppyy: Off
397+
- name: ubu24-arm-gcc9-clang13-cling
398+
os: ubuntu-24.04-arm
399+
compiler: gcc-9
400+
clang-runtime: '13'
401+
cling: On
402+
cling-version: '1.0'
340403

341404
steps:
342405
- uses: actions/checkout@v4
@@ -403,7 +466,12 @@ jobs:
403466
sudo apt-get update
404467
sudo apt-get install git g++ debhelper devscripts gnupg python3 doxygen graphviz python3-sphinx
405468
sudo apt-get install -y libc6-dbg
406-
sudo snap install valgrind --classic
469+
export ARCHITECHURE=$(uname -m)
470+
if [[ "$ARCHITECHURE" != "x86_64" ]]; then
471+
sudo apt-get install valgrind
472+
else
473+
sudo snap install valgrind --classic
474+
fi
407475
sudo apt autoremove
408476
sudo apt clean
409477
# Install libraries used by the cppyy test suite

.github/workflows/emscripten.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ jobs:
3737
llvm_enable_projects: "clang;lld"
3838
llvm_targets_to_build: "WebAssembly"
3939
emsdk_ver: "3.1.45"
40+
- name: ubu24-arm-gcc12-clang-repl-19-emscripten
41+
os: ubuntu-24.04-arm
42+
compiler: gcc-12
43+
clang-runtime: '19'
44+
cling: Off
45+
llvm_enable_projects: "clang;lld"
46+
llvm_targets_to_build: "WebAssembly"
47+
emsdk_ver: "3.1.45"
4048
- name: osx15-arm-clang-clang-repl-19-emscripten
4149
os: macos-15
4250
compiler: clang

lib/Interpreter/CppInterOp.cpp

100644100755
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,10 @@ namespace Cpp {
28282828
#define DEBUG_TYPE "exec"
28292829

28302830
std::array<char, 256> buffer;
2831-
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
2831+
struct file_deleter {
2832+
void operator()(FILE* fp) { pclose(fp); }
2833+
};
2834+
std::unique_ptr<FILE, file_deleter> pipe{popen(cmd, "r")};
28322835
LLVM_DEBUG(dbgs() << "Executing command '" << cmd << "'\n");
28332836

28342837
if (!pipe) {
@@ -3437,26 +3440,27 @@ namespace Cpp {
34373440
}
34383441

34393442
class StreamCaptureInfo {
3440-
std::unique_ptr<FILE, decltype(std::fclose)*> m_TempFile;
3443+
struct file_deleter {
3444+
void operator()(FILE* fp) { pclose(fp); }
3445+
};
3446+
std::unique_ptr<FILE, file_deleter> m_TempFile;
34413447
int m_FD = -1;
34423448
int m_DupFD = -1;
34433449

34443450
public:
34453451
#ifdef _MSC_VER
34463452
StreamCaptureInfo(int FD)
3447-
: m_TempFile(
3448-
[]() {
3449-
FILE* stream = nullptr;
3450-
errno_t err;
3451-
err = tmpfile_s(&stream);
3452-
if (err)
3453-
printf("Cannot create temporary file!\n");
3454-
return stream;
3455-
}(),
3456-
std::fclose),
3453+
: m_TempFile{[]() {
3454+
FILE* stream = nullptr;
3455+
errno_t err;
3456+
err = tmpfile_s(&stream);
3457+
if (err)
3458+
printf("Cannot create temporary file!\n");
3459+
return stream;
3460+
}()},
34573461
m_FD(FD) {
34583462
#else
3459-
StreamCaptureInfo(int FD) : m_TempFile(tmpfile(), std::fclose), m_FD(FD) {
3463+
StreamCaptureInfo(int FD) : m_TempFile{tmpfile()}, m_FD(FD) {
34603464
#endif
34613465
if (!m_TempFile) {
34623466
perror("StreamCaptureInfo: Unable to create temp file");

0 commit comments

Comments
 (0)