-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from ostis-ai/feature/component_manager
Add sc-component manager
- Loading branch information
Showing
22 changed files
with
330 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ develop, main, release/** ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Install with component manager on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04, macos-latest] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update | ||
if: startswith(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get update | ||
- name: Restore build caches | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
key: ${{ github.job }} | ||
|
||
- name: Installing platform | ||
env: | ||
TERM: linux | ||
run: | | ||
cd scripts | ||
./set_vars.sh | ||
./install_platform_with_component_manager.sh | ||
./run_sc_component_manager.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
[submodule "docs/scn"] | ||
path = docs/scn | ||
url = https://github.com/ostis-ai/scn-latex-plugin | ||
[submodule "ims.ostis.kb"] | ||
path = ims.ostis.kb | ||
url = https://github.com/ostis-ai/ims.ostis.kb | ||
branch = main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ims.ostis.kb
deleted from
b4fd1e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
ostis_web_platform_repository | ||
<- concept_repository; | ||
-> rrel_components_specifications: ..components_addresses;; | ||
|
||
..components_addresses | ||
<- sc_node_tuple; | ||
-> knowledge_base_ims_specification | ||
(* | ||
<- concept_reusable_component_specification;; | ||
=> nrel_alternative_addresses: | ||
... | ||
(* | ||
<- sc_node_tuple;; | ||
<- singletone;; | ||
-> rrel_1: | ||
... | ||
(* | ||
-> [https://github.com/ostis-ai/ims.ostis.kb] | ||
(* | ||
<- concept_github_url;; | ||
*);; | ||
*);; | ||
*);; | ||
*); | ||
-> sc_web_specification | ||
(* | ||
<- concept_reusable_component_specification;; | ||
=> nrel_alternative_addresses: | ||
... | ||
(* | ||
<- sc_node_tuple;; | ||
<- singletone;; | ||
-> rrel_1: | ||
... | ||
(* | ||
-> [https://github.com/ostis-ai/sc-web] | ||
(* | ||
<- concept_github_url;; | ||
*);; | ||
*);; | ||
*);; | ||
*);; | ||
|
||
concept_need_to_install_components | ||
-> knowledge_base_ims; | ||
-> sc_web;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# common | ||
ims.ostis.kb | ||
# ostis-web-platform | ||
kb | ||
|
||
# component manager | ||
sc-component-manager/kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
if [ -z "${SC_COMPONENT_MANAGER_PATH}" ]; | ||
then | ||
source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"/../sc-component-manager/scripts/set_vars.sh | ||
fi | ||
|
||
# Need to define this variables to execute build_sc_component_manager.sh | ||
export ROOT_CMAKE_PATH="${SC_COMPONENT_MANAGER_PATH}" | ||
export BUILD_PATH="${SC_COMPONENT_MANAGER_PATH}/build" | ||
"${SC_COMPONENT_MANAGER_PATH}/scripts/build_sc_component_manager.sh" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
clone_update_submodule() | ||
{ | ||
UPDATE=false | ||
while [[ $# -gt 0 ]]; do | ||
case "$1" in | ||
--repo) | ||
shift 1 | ||
REPO="$1" | ||
;; | ||
--path) | ||
shift 1 | ||
SUBMODULE_PATH="$1" | ||
;; | ||
--branch) | ||
shift 1 | ||
BRANCH="$1" | ||
;; | ||
--update) | ||
shift 1 | ||
UPDATE=true | ||
;; | ||
--commit) | ||
shift 1 | ||
COMMIT="$1" | ||
;; | ||
esac | ||
shift 1 | ||
done | ||
|
||
if [ -z "$SUBMODULE_PATH" ]; | ||
then | ||
printf "Empty paths are dangerous in use. Use another path instead for submodules installation or update.\n" | ||
exit 1 | ||
fi | ||
if [[ ! -d "$SUBMODULE_PATH" || "$UPDATE" ]]; then | ||
if "$UPDATE"; | ||
then | ||
printf "Remove submodule %s (%s) %s \n" "$REPO" "$BRANCH" "$SUBMODULE_PATH" | ||
rm -rf "$SUBMODULE_PATH" | ||
git pull | ||
fi | ||
|
||
printf "Clone submodule %s (%s) into %s\n" "$REPO" "$BRANCH" "$SUBMODULE_PATH" | ||
git clone "$REPO" --branch "$BRANCH" --single-branch "$SUBMODULE_PATH" --recursive | ||
if [ -n "$COMMIT" ]; | ||
then | ||
cd "$SUBMODULE_PATH" && git checkout "$COMMIT" | ||
fi | ||
else | ||
printf "You can update %s manually. Use this script with \"update\" parameter.\n" "$SUBMODULE_PATH" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
source "${CURRENT_DIR}/clone_update_submodule.sh" | ||
|
||
if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_BRANCH}" ]]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
cd "${PLATFORM_PATH}" | ||
|
||
clone_update_submodule --repo "${IMS_KB_REPO}" --path "${IMS_KB_PATH}" --branch "${IMS_KB_BRANCH}" --commit "${IMS_KB_COMMIT}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
|
||
if [ -z "${SC_MACHINE_PATH}" ]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
stage "Install ostis-web-platform" | ||
|
||
"${PLATFORM_PATH}/scripts/install_sc_machine_submodule.sh" | ||
"${PLATFORM_PATH}/scripts/install_sc_machine_dependencies.sh" --dev | ||
"${PLATFORM_PATH}/scripts/install_sc_component_manager_submodule.sh" | ||
"${PLATFORM_PATH}/scripts/build_sc_machine.sh" | ||
"${PLATFORM_PATH}/scripts/build_sc_component_manager.sh" | ||
"${PLATFORM_PATH}/scripts/build_kb.sh" | ||
|
||
stage "OSTIS-web-platform installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
source "${CURRENT_DIR}/clone_update_submodule.sh" | ||
|
||
if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_BRANCH}" ]]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
cd "${PLATFORM_PATH}" | ||
|
||
clone_update_submodule --repo "${SC_COMPONENT_MANAGER_REPO}" --path "${SC_COMPONENT_MANAGER_PATH}" --branch "${SC_COMPONENT_MANAGER_BRANCH}" --commit "${SC_COMPONENT_MANAGER_COMMIT}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
|
||
if [ -z "${SC_MACHINE_PATH}" ]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
stage "Install sc-machine dependencies" | ||
|
||
"${SC_MACHINE_PATH}/scripts/install_dependencies.sh" "$@" | ||
|
||
stage "Dependencies of sc-machine installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
source "${CURRENT_DIR}/clone_update_submodule.sh" | ||
|
||
if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_BRANCH}" ]]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
cd "${PLATFORM_PATH}" | ||
|
||
clone_update_submodule --repo "${SC_MACHINE_REPO}" --path "${SC_MACHINE_PATH}" --branch "${SC_MACHINE_BRANCH}" --commit "${SC_MACHINE_COMMIT}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
|
||
if [ -z "${SC_WEB_PATH}" ]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
stage "Install sc-web dependencies" | ||
|
||
"${SC_WEB_PATH}/scripts/install_dependencies.sh" "$@" | ||
|
||
stage "Dependencies of sc-web installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||
source "${CURRENT_DIR}/formats.sh" | ||
source "${CURRENT_DIR}/clone_update_submodule.sh" | ||
|
||
if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_BRANCH}" ]]; | ||
then | ||
source "${CURRENT_DIR}/set_vars.sh" | ||
fi | ||
|
||
cd "${PLATFORM_PATH}" | ||
|
||
clone_update_submodule --repo "${SC_WEB_REPO}" --path "${SC_WEB_PATH}" --branch "${SC_WEB_BRANCH}" --commit "${SC_WEB_COMMIT}" "$@" |
Oops, something went wrong.