Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 🐳 Docker Build

on:
push:
branches: [main, dev, testCI]

jobs:

docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build Docker image
run: docker build -t puml2xml .

- name: Run Docker container - Smoke Test
run: |
docker run --rm -d --name test-container puml2xml
docker run --rm puml2xml ls -l /data/puml2xml
docker run --rm puml2xml /data/puml2xml -h
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14

WORKDIR /data

COPY . .

RUN sudo apt-get update && sudo apt-get install -y make

RUN opam init -y

RUN opam install -y dune

USER root

RUN eval $(opam env) && make
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
<img src="https://github.com/khalidbelk/puml2xml/actions/workflows/build-ubuntu.yml/badge.svg?branch=main" alt="ubuntu-latest"></a>
&nbsp;&nbsp;&nbsp;&nbsp; <!-- Spaces -->
<a href="https://github.com/khalidbelk/puml2xml/actions/workflows/build-macos.yml">
<img src="https://github.com/khalidbelk/puml2xml/actions/workflows/build-macos.yml/badge.svg?branch=main" alt="macOS-latest">
<img src="https://github.com/khalidbelk/puml2xml/actions/workflows/build-macos.yml/badge.svg?branch=main" alt="macOS-latest"></a>
&nbsp;&nbsp;&nbsp;&nbsp; <!-- Spaces -->
<a href="https://github.com/khalidbelk/puml2xml/actions/workflows/docker-build.yml">
<img src="https://github.com/khalidbelk/puml2xml/actions/workflows/docker-build.yml/badge.svg?branch=main" alt="Docker Build">
</a>
</div>

Expand All @@ -15,25 +18,46 @@ A **PlantUML** (.puml) to **XML** (.xmi) converter.

### Prerequisites

Before starting, ensure you have the following dependencies installed locally:
Before starting, If you want to run it locally, ensure you have the following dependencies installed, otherwise **you'll just need Docker**, and can ignore this :

- **dune** (v**3.16** or higher)
- **OCaml** (v**4.08.0** or higher)
- **make**

### Usage
## Installation

**Steps**

1. Clone this repository and open it

### Local install

2. Compile the program with the command

```
make
```

3. Then you can use it as specified here :
### Docker 🐳

2. Build the image with the command

```
docker build -t puml2xml .
```

3. Run the container

```
docker run --rm -v $(pwd):/data/input puml2xml ./puml2xml /data/input/<yourfile.puml>
```

> Note: for this last command, you'll just have to replace <yourfile.puml> by the .puml file you want to convert (located in your current directory).


## Usage

You can use it as specified here :

```
USAGE: ./puml2xml <file> [OPTIONS]
Expand Down