Commit 6a3cc4d4 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Merge branch 'master' into tnguyen/mlir-test

parents ecf03977 12b1d060
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -49,3 +49,7 @@ __pycache__/
# IDE files
.vscode/*
.theia/*

# LLVM files
*.ll 
*.bc
 No newline at end of file
+9 −23
Original line number Diff line number Diff line
@@ -15,26 +15,6 @@ docker build_master:
  - git config remote.aideqcqcor.url >&- || git remote add -t master aideqcqcor https://amccaskey:$AIDEQC_ACCESS_TOKEN@github.com/aide-qc/qcor
  - git push -f aideqcqcor HEAD:master
  - git remote remove aideqcqcor
  - git clone https://github.com/aide-qc/homebrew-deploy && cd homebrew-deploy 
  - wget https://github.com/ornl-qci/qcor/tarball/master && mv master qcor.tar.gz 
  - export src_sha=$(sha256sum qcor.tar.gz | cut -d " " -f 1)
  - sed -i "0,/sha256 \".*\"/s//sha256 \"$src_sha\" /" Formula/qcor.rb
  - git add Formula/qcor.rb
  - git commit -m "updating sha256 for qcor homebrew formula"
  - git config remote.aideqchbdeploy.url >&- || git remote add -t master aideqchbdeploy https://amccaskey:$AIDEQC_ACCESS_TOKEN@github.com/aide-qc/homebrew-deploy
  - git push -f aideqchbdeploy HEAD:master
  - git remote remove aideqchbdeploy

docker run_docker_deploy:
  stage: deploy
  only:
   - schedules
  script:
  - cd docker/deploy/dev && docker build -t qcor/qcor . --no-cache
  - echo "$REGISTRY_PASSWORD" | docker login -u qcor --password-stdin
  - docker push qcor/qcor
  - docker system prune -f
  - docker rmi -f qcor/qcor 

# builds xacc and qcor bottles nightly
docker run_brew_linux_bottles:
@@ -55,13 +35,19 @@ docker run_macosx_catalina_bottles:
  tags: 
    - osx
  script:
  - ssh catalina-ci "PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin bash run_bottle_build.sh $AIDEQC_ACCESS_TOKEN $JFROG_API_KEY"
  - docker run -d -it --name tmp_catalina_ci --device /dev/kvm -p 50922:10022 -v "${HOME}/catalina/mac_hdd_ng.img:/image" sickcodes/docker-osx:naked
  - sleep 240
  - ssh catalina-ci "PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin bash run_bottle_build.sh $AIDEQC_ACCESS_TOKEN"
  - docker stop tmp_catalina_ci && docker rm -v tmp_catalina_ci
  
docker run_macosx_mojave_bottles:
  stage: deploy
  only:
    - schedules
  tags: 
    - osx
    - mojave
  script:
  - ssh mojave-ci "PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin bash run_bottle_build.sh $AIDEQC_ACCESS_TOKEN $JFROG_API_KEY"
  - docker run -d -it --name tmp_mojave_ci --device /dev/kvm -p 50922:10022 -v "${HOME}/mojave/mac_hdd_ng.img:/image" sickcodes/docker-osx:naked
  - sleep 240
  - ssh mojave-ci "PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin bash run_bottle_build.sh $AIDEQC_ACCESS_TOKEN"
  - docker stop tmp_mojave_ci && docker rm -v tmp_mojave_ci  
 No newline at end of file
+12 −6
Original line number Diff line number Diff line
@@ -42,11 +42,11 @@ project(qcor LANGUAGES CXX C)
option(QCOR_BUILD_TESTS "Build qcor tests" OFF)

find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD WORKING_DIRECTORY "${local_dir}"
if(GIT_FOUND)
  execute_process(COMMAND /bin/bash ${CMAKE_SOURCE_DIR}/scripts/get_git_version.sh
                            OUTPUT_VARIABLE QCOR_BUILD_VERSION ERROR_QUIET
                            OUTPUT_STRIP_TRAILING_WHITESPACE)
  message( STATUS "QCOR GIT hash: ${QCOR_BUILD_VERSION}")
  message( STATUS "QCOR Version / HEAD commit hash: ${QCOR_BUILD_VERSION}")
endif()

find_package(XACC REQUIRED)
@@ -60,7 +60,13 @@ add_subdirectory(handlers)
add_subdirectory(runtime)
add_subdirectory(tools)
add_subdirectory(lib)

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  if (NOT MLIR_DIR) 
    set(MLIR_DIR ${LLVM_ROOT}/lib/cmake/mlir)
  endif()
  add_subdirectory(mlir)
endif()

if (QCOR_BUILD_TESTS)
  add_subdirectory(examples)
@@ -102,9 +108,9 @@ set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/posti

#dependencies for this service menu
if (${QCOR_CPACK_DEB_PLATFORM} STREQUAL "bionic")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "xacc, clang-syntax-handler")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "xacc, aideqc-llvm")
elseif(${QCOR_CPACK_DEB_PLATFORM} STREQUAL "focal")
 set(CPACK_DEBIAN_PACKAGE_DEPENDS "xacc, clang-syntax-handler")
 set(CPACK_DEBIAN_PACKAGE_DEPENDS "xacc, aideqc-llvm")
endif()
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SECTION "base")
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ To install `qcor` run the following command from your terminal
```bash
/bin/bash -c "$(curl -fsSL https://aide-qc.github.io/deploy/install.sh)"
```
To use the Python API, be sure to set your `PYTHONPATH`. 
For more details, see [here](https://aide-qc.github.io/deploy/getting_started/).

Nightly docker images are also available that serve up a [Theia IDE](https://theia-ide.org/) on port 3000. To use this image, run 
+1 −1
Original line number Diff line number Diff line
#pragma once

#define QCOR_LIB_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}"
#define QCOR_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
#define XACC_ROOT "${XACC_ROOT}"
Loading