Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
173 changes: 173 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ references:
cache_key: &cache_key v2-jars-{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ .Branch }}-{{ checksum "~/gradle.lock" }}
orbs:
ruby: circleci/ruby@1.8.0
python: circleci/python@2.1.1
go: circleci/go@1.9.0
rust: circleci/rust@1.6.1
node: circleci/node@5.2.0

executors:
java-executor:
Expand All @@ -28,6 +32,12 @@ executors:
TERM: dumb
CONTAINER_BUILD: "true"
ORG_GRADLE_PROJECT_signing.secretKeyRingFile: /home/circleci/secring.gpg
polyglot-executor:
docker:
- image: cimg/openjdk:11.0
resource_class: large
environment:
TERM: dumb

jobs:
setup:
Expand Down Expand Up @@ -170,6 +180,145 @@ jobs:
sudo ./docs/init.sh
sudo ./docs/guide/mkdocs gh-deploy -m "Deploying updated documentation [ci skip]" --remote-name https://$MKDOCS_DEPLOY_GH_USER:$MKDOCS_DEPLOY_GH_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME --force

test_python_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- run:
name: Install Python 3 and dependencies
command: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip
cd ~/project/concourse-driver-python
pip3 install -e ".[dev]"
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run Python driver tests
command: |
cd ~/project/concourse-driver-python
python3 -m pytest tests/ -v

test_php_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- run:
name: Install PHP and dependencies
command: |
sudo apt-get update
sudo apt-get install -y php php-cli php-mbstring php-xml composer
cd ~/project/concourse-driver-php
composer install
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run PHP driver tests
command: |
cd ~/project/concourse-driver-php
vendor/bin/phpunit

test_ruby_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- ruby/install:
version: '3.1'
- run:
name: Install Ruby dependencies
command: |
cd ~/project/concourse-driver-ruby
bundle install
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run Ruby driver tests
command: |
cd ~/project/concourse-driver-ruby
bundle exec rake test

test_go_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- go/install:
version: '1.21'
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run Go driver tests
command: |
cd ~/project/concourse-driver-go
go test -v ./...

test_rust_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- rust/install
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run Rust driver tests
command: |
cd ~/project/concourse-driver-rust
cargo test --verbose

test_dotnet_driver:
executor: polyglot-executor
steps:
- attach_workspace:
at: ~/
- run:
name: Install .NET SDK
command: |
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 8.0
echo 'export PATH="$HOME/.dotnet:$PATH"' >> "$BASH_ENV"
- run:
name: Start Mockcourse
command: |
cd ~/project/mockcourse
groovy src/main/groovy/com/cinchapi/mockcourse/Mockcourse.groovy 1717 &
sleep 5
background: true
- run:
name: Run .NET driver tests
command: |
cd ~/project/concourse-driver-dotnet
dotnet test --verbosity normal

workflows:
version: 2
build_and_publish:
Expand All @@ -181,9 +330,33 @@ workflows:
- test:
requires:
- compile
- test_python_driver:
requires:
- compile
- test_php_driver:
requires:
- compile
- test_ruby_driver:
requires:
- compile
- test_go_driver:
requires:
- compile
- test_rust_driver:
requires:
- compile
- test_dotnet_driver:
requires:
- compile
- build:
requires:
- test
- test_python_driver
- test_php_driver
- test_ruby_driver
- test_go_driver
- test_rust_driver
- test_dotnet_driver
- collect_artifacts:
requires:
- build
Expand Down
47 changes: 47 additions & 0 deletions concourse-driver-c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.14)
project(concourse_driver_c VERSION 1.0.0 LANGUAGES C)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
pkg_check_modules(GOBJECT REQUIRED gobject-2.0)

# Find Thrift C (c_glib) library
find_library(THRIFT_C_LIB
NAMES thrift_c_glib
HINTS /usr/local/lib /usr/lib)
find_path(THRIFT_C_INCLUDE
NAMES thrift/c_glib/thrift.h
HINTS /usr/local/include /usr/include)

file(GLOB DRIVER_SOURCES "src/*.c")
file(GLOB GEN_SOURCES "gen/*.c")

add_library(concourse_driver_c
${DRIVER_SOURCES}
${GEN_SOURCES})

target_include_directories(concourse_driver_c
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/gen
${THRIFT_C_INCLUDE}
${GLIB2_INCLUDE_DIRS}
${GOBJECT_INCLUDE_DIRS})

target_link_libraries(concourse_driver_c
PRIVATE
${THRIFT_C_LIB}
${GLIB2_LIBRARIES}
${GOBJECT_LIBRARIES})

install(TARGETS concourse_driver_c
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)

install(DIRECTORY include/concourse
DESTINATION include)
Loading