Skip to content

Commit

Permalink
update build documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
scholarsmate committed Oct 4, 2023
1 parent 86488c3 commit a2dfaa6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 50 deletions.
84 changes: 34 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,93 +68,77 @@ pip install conan

### Configure a debug build:

Depending on your linking needs, Ωedit™ can be built as either as a static (e.g., libomega_edit.a) or shared (e.g., libomega_edit.so) library.

- #### Static:
Depending on your linking needs, Ωedit™ can be built _either_ as a static (e.g., libomega_edit.a) or shared
(e.g., libomega_edit.so) library. Example programs and documentation can also be built if desired. The Scala server
_requires_ a shared library, so here is how to build a shared library, with no documentation or example programs.

```bash
cmake -S core -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=NO -DBUILD_EXAMPLES=NO -DBUILD_SHARED_LIBS=YES
```

- #### Shared:
### Build the configured build:

```bash
cmake -S core -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=YES
cmake --build cmake-build-debug --config Debug
```

### Build the configured build:
### Run the test suite:

```bash
cmake --build cmake-build-debug
ctest -C Debug --test-dir cmake-build-debug/core --output-on-failure
```

### Run the test suite:
### Install the core library:

```bash
cmake -S core/src/tests -B cmake-build-tests -DCMAKE_BUILD_TYPE=Debug
pushd cmake-build-tests && ctest -C Debug --output-on-failure && popd
cmake --install cmake-build-debug --config Debug --prefix _install-debug
```

## Packaging Ωedit™

### Scala API and Native
### Scala API, Native, and Server

This publishes for Scala version 2.13 to GitHub packages.
:exclamation: These commands should be executed at the root level of the repository after building/installing the core library :exclamation:

- Requires the `GITHUB_TOKEN` environment variable to be set
### Scala Server

```bash
sbt publishAll
```

### Scala Reference Server

This packages the reference Scala server to a local zip folder
This builds, tests, and packages the Scala server to a local folder

```bash
cd server/scala
sbt universal:packageBin
export OE_LIB_DIR="${PWD}/_install-debug/lib"
pushd server/scala
sbt test
sbt serv/test
popd
```

Zip file will be located at
The server will be packages as a zip file located at:

```bash
server/scala/target/universal/omega-edit-grpc-server-${VERSION}.zip
```
server/scala/serv/target/universal/omega-edit-grpc-server-${VERSION}.zip
```

### TypeScript Client

This package is normally uploaded to npmjs.com

:exclamation: Node needs to be installed but shouldn't matter what version you use. :exclamation:

- Create local `.tgz` file

```bash
cd packages/client
yarn install # if not ran before
yarn package
```

- File will be at

```bash
packages/client/omega-edit-node-client-v${VERSION}.tgz
```

- Publish `.tgz` file to npmjs -- requires auth
- Create local `.tgz` files for the server and client

```bash
yarn publish omega-edit-v${VERSION}.tgz
```

## Development
```bash
yarn install
yarn workspace @omega-edit/server package
yarn workspace @omega-edit/client test
```
Packages will be in tgz files located at:

Currently, the repo holds bindings for both Scala and node.
```
/packages/server/omega-edit-node-server-${VERSION}.tgz
/packages/client/omega-edit-node-client-${VERSION}.tgz
```

## Release Binaries

[Binary releases](https://github.com/ctc-oss/omega-edit/releases) for macOS (ARM and x86), Windows (x86), and Linux (ARM, and x86; glibc 2.31 or greater required) are built and published via GitHub CI workflows.
[Binary releases](https://github.com/ctc-oss/omega-edit/releases) for macOS (Apple Silicon and x86), Windows (x86), and Linux (ARM, and x86; glibc 2.31 or greater required) are built and published via GitHub CI workflows.

## Versioning

Expand Down
18 changes: 18 additions & 0 deletions packages/server/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Ignore artifacts

out/

0 comments on commit a2dfaa6

Please sign in to comment.