diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4030f6fe..b89b6ff4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,6 +2,6 @@ Fixes # ## Proposed Changes - - - - - - +- +- +- diff --git a/.github/workflows/bin.yml b/.github/workflows/bin.yml new file mode 100644 index 00000000..1909c421 --- /dev/null +++ b/.github/workflows/bin.yml @@ -0,0 +1,55 @@ +name: Publish binaries + +on: + release: + types: [published] + +jobs: + publish: + + runs-on: ${{ matrix.os }} + env: + MACOSX_DEPLOYMENT_TARGET: 10.11 + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + asset_name: csml-server-linux-amd64 + - os: macos-latest + asset_name: csml-server-macos-amd64 + + steps: + - uses: actions/checkout@v2 + + # for some reason cache does not work properly with macos builds + - name: Cache Cargo + if: matrix.os != 'macos-latest' + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-csml-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Build Server + uses: actions-rs/cargo@v1 + with: + command: build + args: --verbose --manifest-path=csml_server/Cargo.toml --features csml_engine/mongo,csml_engine/dynamo --release + + - name: Upload binary to release + uses: svenstaro/upload-release-action@2.2.0 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/csml_server + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }} + overwrite: true diff --git a/.github/workflows/cratesio.yml b/.github/workflows/cratesio.yml new file mode 100644 index 00000000..b2ae0308 --- /dev/null +++ b/.github/workflows/cratesio.yml @@ -0,0 +1,47 @@ +name: Publish crates.io + +on: + release: + types: [published] + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Cargo + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-csml-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Login + run: cargo login ${CRATES_IO_TOKEN} + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + + - name: Publish interpreter + run: cargo publish --manifest-path csml_interpreter/Cargo.toml --all-features + + # crates.io may say that the interpreter is not available + # if we don't wait before we build the engine + - name: Sleep + uses: jakejarvis/wait-action@master + with: + time: '60s' + + - name: Publish engine + run: cargo publish --manifest-path csml_engine/Cargo.toml --all-features + diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6738b0b2..8cb50908 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,11 +9,41 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + env: + MACOSX_DEPLOYMENT_TARGET: 10.11 + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v2 + + # for some reason cache does not work properly with macos builds + - name: Cache Cargo + if: matrix.os != 'macos-latest' + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-csml-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install Rust Stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + uses: actions-rs/cargo@v1 + with: + command: build + args: --verbose --manifest-path=csml_interpreter/Cargo.toml + + - name: Test + uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --manifest-path=csml_interpreter/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 676f3541..d26ea5de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -681,7 +681,7 @@ checksum = "697c714f50560202b1f4e2e09cd50a421881c83e9025db75d15f276616f04f40" [[package]] name = "csml_engine" -version = "1.2.1" +version = "1.3.0-beta1" dependencies = [ "base64 0.12.3", "bson", @@ -704,7 +704,7 @@ dependencies = [ [[package]] name = "csml_engine_node" -version = "1.2.1" +version = "1.3.0-beta1" dependencies = [ "csml_engine", "csml_interpreter", @@ -717,7 +717,7 @@ dependencies = [ [[package]] name = "csml_interpreter" -version = "1.2.1" +version = "1.3.0-beta1" dependencies = [ "lazy_static", "libc", @@ -732,7 +732,7 @@ dependencies = [ [[package]] name = "csml_server" -version = "1.2.1" +version = "1.3.0-beta1" dependencies = [ "actix-cors", "actix-files", diff --git a/README.md b/README.md index 3d2e04fb..1c542731 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,14 @@ DISABLE_SSL_VERIFY=false DEBUG=true ``` +### Using a ready-to-use binary (Linux and MacOS only) + +The easiest way to launch a CSML Engine on your own machine is to use one of our pre-built, optimized binaries (available for both MongoDB and Amazon DynamoDB). These binaries are available as executables on each of CSML's releases since v1.3.0. + +To download the latest CSML Server binaries, [head over to the latest release](https://github.com/CSML-by-Clevy/csml-engine/releases/download/v1.2.1/csml-server-linux-amd64) and make sure to download the right version for your architecture. + +**Mac users**: upon first execution of this binary, Mac will probably open a warning about the application not being signed ([more info from Apple](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution)). As this is not intended as a widely-distributed application, we decided to not go through the notarization process for now, but you can safely ignore that warning! However, if you prefer, you can always [build this package from source](#with-rust-from-source). + ### With Docker We provide a docker image for easy self-hosted usage. @@ -130,7 +138,7 @@ To get started with CSML Engine on Docker: https://github.com/CSML-by-Clevy/csml ### With Rust, from source -CSML is built in [Rust](https://www.rust-lang.org/). You don't need to know any Rust to run it though! Make sure you are running Rust v1.46, then run: +CSML is built in [Rust](https://www.rust-lang.org/). You don't need to know any Rust to run it though! Make sure you are running Rust v1.46+ and that you have openssl installed on your machine (or an equivalent for your linux distribution, such as libssl), then run: ``` cd csml_server diff --git a/bindings/node/native/Cargo.toml b/bindings/node/native/Cargo.toml index 22e0e589..1f50edaf 100644 --- a/bindings/node/native/Cargo.toml +++ b/bindings/node/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "csml_engine_node" -version = "1.2.1" +version = "1.3.0-beta1" authors = ["Alexis Merelo "] license = "MIT" build = "build.rs" diff --git a/csml_engine/Cargo.toml b/csml_engine/Cargo.toml index 076209eb..510b7072 100644 --- a/csml_engine/Cargo.toml +++ b/csml_engine/Cargo.toml @@ -1,10 +1,26 @@ [package] name = "csml_engine" -version = "1.2.1" -authors = ["Alexis Merelo "] +version = "1.3.0-beta1" +authors = [ + "Alexis Merelo ", + "François Falala-Sechet ", + "Bastien Botella ", + "Jefferson Le Quellec " +] +description = """ +The CSML Engine is a conversational engine designed to make it extremely easy to create rich and powerful chatbots. +""" +homepage = "https://www.csml.dev" +repository = "https://github.com/CSML-by-Clevy/csml-engine" +keywords = ["chatbot", "programming-language", "csml"] +categories = ["text-processing"] +readme = "../README.md" license = "Apache-2.0" edition = "2018" +[package.metadata.docs.rs] +features = ["--no-deps"] + [features] mongo = ["mongodb", "bson"] dynamo = ["rusoto_core", "rusoto_dynamodb", "serde_dynamodb"] @@ -37,7 +53,7 @@ features = ["rustls"] optional = true [dependencies] -csml_interpreter = { path = "../csml_interpreter" } +csml_interpreter = { version = "1.3.0-beta1", path = "../csml_interpreter" } multimap = "0.8.1" md-5 = "0.8.0" chrono = "0.4" diff --git a/csml_interpreter/Cargo.toml b/csml_interpreter/Cargo.toml index 3af8f39c..703bea84 100644 --- a/csml_interpreter/Cargo.toml +++ b/csml_interpreter/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "csml_interpreter" -version = "1.2.1" +version = "1.3.0-beta1" authors = [ "Alexis Merelo ", - "Jefferson Le Quellec ", "François Falala-Sechet ", - "Bastien Botella " + "Bastien Botella ", + "Jefferson Le Quellec " ] -license = "Apache-2.0" -readme = "README.md" -repository = "https://github.com/CSML-by-Clevy/csml-interpreter" -homepage = "https://www.csml.dev/" -documentation = "https://docs.csml.dev/language/" description = """ -The CSML (Conversational Standard Meta Language) is a Domain-Specific Language developed for creating conversational experiences easily. +The CSML Interpreter is the official interpreter for the CSML programming language, a DSL designed to make it extremely easy to create rich and powerful chatbots. """ -keywords = ["chatbot", "interpreter", "language", "csml"] +homepage = "https://www.csml.dev" +repository = "https://github.com/CSML-by-Clevy/csml-engine" +keywords = ["chatbot", "programming-language", "csml"] categories = ["text-processing"] +readme = "README.md" +license = "Apache-2.0" edition = "2018" +[package.metadata.docs.rs] +features = ["--no-deps"] + [lib] name = "csml_interpreter" crate-type = ["rlib"] diff --git a/csml_server/Cargo.toml b/csml_server/Cargo.toml index 5717cf8a..880bde57 100644 --- a/csml_server/Cargo.toml +++ b/csml_server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "csml_server" -version = "1.2.1" +version = "1.3.0-beta1" authors = ["François Falala-Sechet "] edition = "2018"