Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts update #77

Merged
merged 4 commits into from
May 22, 2024
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
53 changes: 19 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,28 @@
[![Build and Test](https://github.com/P4-ACMMMRW/dpli/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/P4-ACMMMRW/dpli/actions/workflows/build_and_test.yml)
[![Build and Test](https://github.com/P4-ACMMMRW/dpli/actions/workflows/build_and_test.yml/badge.svg?branch=main)](https://github.com/P4-ACMMMRW/dpli/actions/workflows/build_and_test.yml)
[![Linting](https://github.com/P4-ACMMMRW/dpli/actions/workflows/linting.yml/badge.svg?branch=main)](https://github.com/P4-ACMMMRW/dpli/actions/workflows/linting.yml)

# DPL
## Build
### Ubuntu
Run the ```compile.sh``` script with:
```bash
./compile.sh
```
this will create an executable which can be run with:
```bash
cd build
./dpli <file>
```
# DPLI
The official interpreter for Data Preprocessing Language (DPL).

#### Clean Build
To make a clean build run the ```compile.sh``` script with the argument "clean":
## How to Compile
On Ubuntu simply run:
```bash
./compile.sh clean
./scripts/compile.sh
```

#### Run Tests
After compiling the interpreter tests can be run using the ```run_tests.sh``` script:
On other linux distrobutions:
```bash
./run_tests.sh
mkdir build
cd build
cmake ..; make
```

## Linting
Linting can be done with
```bash
./linter.sh
```
or
```bash
./linter format-only
```
to skip clang-tidy checks.
### Dependencies
- `Java JDK 11+`
- `cmake`
- `make`
- `c++17 compatible compiler`

## Benchmarking
Benchmarking can be done with
```bash
./bench.sh
```
## Future Plans

## Documentation
16 changes: 0 additions & 16 deletions run_tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion bench.sh → scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ run_perf() {
# Check if dpli exists otherwise compile
if [ ! -f ./build/dpli ]; then
echo "dpli could not be found. Compiling dpli..."
./compile.sh
.scripts/compile.sh
fi

# Check if wsl2
Expand Down
2 changes: 1 addition & 1 deletion compile.sh → scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ "$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' '{pr
exit 1
fi

# If ./build clean
# If ./compile.sh clean
if [ "$1" == "clean" ]; then
rm -rf build
fi
Expand Down
2 changes: 1 addition & 1 deletion generate_coverage.sh → scripts/generate_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

./compile.sh
./scripts/compile.sh

if ! command -v lcov &> /dev/null; then
echo "lcov could not be found. Installing lcov..."
Expand Down
2 changes: 1 addition & 1 deletion linter.sh → scripts/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi
# If build/compile_commands.json does not exist, then run ./compile.sh to generate it
if [ ! -f "build/compile_commands.json" ]; then
echo "compile_commands.json not found. Running: ./compile.sh to generate it..."
./compile.sh
./scripts/compile.sh
fi

# Run clang-format and clang-tidy on all cpp and hpp files in the project except in lib and build directories
Expand Down
File renamed without changes.