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

[WIP]Use Github Actions for CI in addition to Travis #207

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0acdb5c
New flag --cling-branch to specify particular cling branch
reikdas Oct 15, 2020
ac1625a
Use Github Actions for CI.
reikdas Dec 17, 2019
ce1f6d5
Setup Github Actions CI for Windows
reikdas Oct 16, 2020
17b92e7
Fix Windows build
reikdas Oct 21, 2020
87b8b3a
Try to fix Windows Ninja build
reikdas Oct 21, 2020
47df9ef
Fix tests for Windows
reikdas Oct 21, 2020
7825221
Change arch
reikdas Oct 21, 2020
4f4d262
Revert "Change arch"
reikdas Oct 21, 2020
2ce63f3
Try to fix Windows Ninja build
reikdas Oct 21, 2020
729daa5
Try to fix tests
reikdas Oct 21, 2020
a2f45a3
Do not explicitly export symbols
reikdas Oct 21, 2020
fcae5bb
Revert "Do not explicitly export symbols"
reikdas Oct 22, 2020
9c58611
Revert "Try to fix Windows Ninja build"
reikdas Oct 22, 2020
2ae36e2
Try and fix Windows tests
reikdas Oct 22, 2020
bb462a0
try to fix tests on Windows
reikdas Oct 22, 2020
9af2faf
Trying use cmd /c type to fix tests
reikdas Oct 22, 2020
04af02c
Go back to using type for Windows tests
reikdas Oct 22, 2020
41884dd
Use Powershell instead of cmd
reikdas Oct 22, 2020
d785e2b
Fix remaining cat in test file
reikdas Oct 22, 2020
f6a0a54
Try to fix powershell
reikdas Oct 22, 2020
5058aa6
Try to fix powershell
reikdas Oct 22, 2020
52bd5e1
Try to fix Powershell
reikdas Oct 22, 2020
d289539
Try to fix Powershell
reikdas Oct 22, 2020
d222556
Try to fix Powershell - Env variable
reikdas Oct 22, 2020
225f743
Update Appveyor build with new Cling flags
reikdas Oct 22, 2020
493e6ee
Debug Appveyor
reikdas Oct 22, 2020
e6dcc49
Revert "Debug Appveyor"
reikdas Oct 23, 2020
9bbc9f8
Do not use cat for tests
reikdas Oct 23, 2020
7e37b85
Go back to using bash for Windows builds
reikdas Oct 23, 2020
b08f2d2
Check if Windows SSH debug works
reikdas Oct 26, 2020
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
179 changes: 179 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
name: Cling CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:

include:
- name: ubuntu-16.04-gcc-4.8-compile
os: ubuntu-16.04
compiler: gcc
version: "4.8"

- name: ubuntu-16.04-gcc-5
os: ubuntu-16.04
compiler: gcc
version: "5"

- name: ubuntu-16.04-gcc-6
os: ubuntu-16.04
compiler: gcc
version: "6"

- name: ubuntu-16.04-gcc-7
os: ubuntu-16.04
compiler: gcc
version: "7"

- name: ubuntu-16.04-gcc-7-compile
os: ubuntu-16.04
compiler: gcc
version: "7"

- name: ubuntu-16.04-gcc-7-notar
os: ubuntu-16.04
compiler: gcc
version: "7"

- name: ubuntu-16.04-clang-3.9
os: ubuntu-16.04
compiler: clang
version: "3.9"

- name: ubuntu-16.04-clang-6
os: ubuntu-16.04
compiler: clang
version: "6.0"

- name: ubuntu-16.04-clang-6-compile
os: ubuntu-16.04
compiler: clang
version: "6.0"

- name: ubuntu-18.04-gcc-7-notar
os: ubuntu-18.04
compiler: gcc
version: "7"

- name: ubuntu-18.04-gcc-7-compile
os: ubuntu-18.04
compiler: gcc
version: "7"

- name: ubuntu-18.04-clang-7-notar
os: ubuntu-18.04
compiler: clang
version: "7"

- name: macos-xcode-11.2.1
os: macOS-latest
compiler: clang
xcode-version: "11.2.1"

- name: macos-xcode-11.2.1-compile
os: macOS-latest
compiler: clang
xcode-version: "11.2.1"

# - name: macos-xcode-11.2.1-notar
# os: macOS-latest
# compiler: clang
# xcode-version: "11.2.1"

- name: macos-gcc-9-compile
os: macOS-latest
compiler: gcc
version: "9"

- name: ubuntu-20.04-clang-7-compile
os: ubuntu-20.04
compiler: clang
version: "7"

- name: ubuntu-20.04-gcc-7-compile
os: ubuntu-20.04
compiler: gcc
version: "7"

- name: windows-2019-ninja
os: windows-2019
generator: Ninja

- name: windows-2019-visual-studio
os: windows-2019
generator: Visual Studio 16 2019

steps:
- uses: actions/checkout@v2
- name: Setup compiler on Linux
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
if: runner.os == 'Linux'
shell: bash
- name: Setup compiler on OS X
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
if: runner.os == 'macOS'
- name: Setup ninja for Windows
uses: seanmiddleditch/gha-setup-ninja@master
if: runner.os == 'Windows' && matrix.generator == 'Ninja'
- name: Execute cpt on Linux/OS X
run: |
if [[ "${{ matrix.compiler }}" = "gcc" && "${{ matrix.version }}" = "7" ]]; then
export CLING_BUILD_FLAGS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON"
if [ "${{ matrix.os }}" != "macOS-latest" ]; then
export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCXX_EXTENSIONS=OFF"
fi
fi
export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCLANG_ENABLE_ARCMT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_ENABLE_WARNINGS=OFF -DCLING_ENABLE_WARNINGS=ON"
if [[ ${{ matrix.name }} == *"compile"* ]]; then
./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }}
elif [[ ${{ matrix.name }} == *"notar"* ]]; then
./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm
else
./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm --with-llvm-tar
fi
working-directory: tools/packaging/
if: runner.os != 'Windows'
- name: Start SSH session
uses: luchihoratiu/debug-via-ssh@main
with:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
SSH_PASS: ${{ secrets.SSH_PASS }}
- name: Execute cpt on Windows
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup
working-directory: tools\packaging\
shell: cmd
if: runner.os == 'Windows'
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ build_script:
- tools\packaging\cpt.py ^
--current-dev=tar ^
--with-cling-url=https://github.com/%APPVEYOR_REPO_NAME% ^
--with-clang-url=http://root.cern.ch/git/clang.git ^
--with-llvm-url=http://root.cern.ch/git/llvm.git ^
--cling-branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% ^
--with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -G\"%CMAKE_GEN%\"" ^
--skip-cleanup

Expand Down
2 changes: 1 addition & 1 deletion test/Autoloading/AutoForwarding.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -I%S -Xclang -verify
// RUN: %cling -I%S -Xclang -verify < %s
// XFAIL: vanilla-cling
// Test FwdPrinterTest

Expand Down
2 changes: 1 addition & 1 deletion test/CodeGeneration/Statics.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions test/CodeUnloading/AtExit.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// FIXME: cat %s | %cling -fsyntax-only -Xclang -verify 2>&1
// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s
// FIXME: %cling -fsyntax-only -Xclang -verify 2>&1 < %s

// Test to check functions registered via atexit are intercepted, and __dso_handle
// is properly overridden in for child interpreters.
Expand Down
2 changes: 1 addition & 1 deletion test/Interfaces/evaluate.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify | FileCheck %s
// RUN: %cling -Xclang -verify < %s | FileCheck %s

#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/Value.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Interfaces/transactionReuse.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s
// RUN: %built_cling -fno-rtti < %s | FileCheck %s

// This test makes sure the interpreter doesn't create many useless empty
// transactions.
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/data.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test lookupData

.rawInput 1
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/named.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test Lookup::Named and Namespace, used in quick simple lookups.

#include "cling/Interpreter/Interpreter.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/scope.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test findScope, which is essentially is a DeclContext.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/LookupHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/tag.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test Lookup::Named and Namespace, used in quick simple lookups.

#include "cling/Interpreter/Interpreter.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/template.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test findClassTemplate, which is esentially is a DeclContext.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/LookupHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/BinOp.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/Cast.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p = 0;;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/ExecutionTermination.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks that the execution ends after a null prt dereference.

Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/InvalidMemoryAddress.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a dereference of an invalid memory address pointer..
int *p = (int*)0x1;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/Load.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/MethodCalls.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
// This test verifies that we get nice warning if a method on null ptr object is
// called.
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/NonNullArg.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify | FileCheck %s
// RUN: %cling -Xclang -verify < %s | FileCheck %s
// XFAIL: powerpc64
//This file checks a call instruction. The called function has arguments with nonnull attribute.
extern "C" int printf(const char* fmt, ...);
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/NonNullArgCustom.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64

// We must be able to handle cases where, there is a custom function that has
Expand Down
2 changes: 1 addition & 1 deletion test/Plugins/Simple.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s
// RUN: %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext < %s | FileCheck %s

// CHECK:Action::ParseArgs
// CHECK-NEXT:Action::CreateASTConsumer
Expand Down
2 changes: 1 addition & 1 deletion test/Prompt/ValuePrinter/Regression.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %cling 2>&1 | FileCheck %s
// RUN: %cling 2>&1 < %s | FileCheck %s

// This file should be used as regression test for the value printing subsystem
// Reproducers of fixed bugs should be put here
Expand Down
2 changes: 1 addition & 1 deletion test/Prompt/ValuePrinter/Strings.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//------------------------------------------------------------------------------

// Windows wants -Wno-deprecated-declarations
//RUN: cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s
//RUN: %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 < %s | FileCheck %s

#include <stdlib.h>
#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion test/Utils/Transform.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s
// RUN: %built_cling -fno-rtti < %s | FileCheck %s

// The test verifies the expected behavior in cling::utils::Transform class,
// which is supposed to provide different transformation of AST nodes and types.
Expand Down
4 changes: 3 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../lib/UserInterface/textinput
add_subdirectory(demo)
endif()

add_subdirectory(plugins)
if (LLVM_ENABLE_PLUGINS)
add_subdirectory(plugins)
endif()
Loading