Skip to content

Commit

Permalink
Merge pull request #604 from dictu-lang/develop
Browse files Browse the repository at this point in the history
Release 0.27.0
  • Loading branch information
Jason2605 authored Feb 18, 2023
2 parents 8d73dcb + 5c575db commit b1d9c25
Show file tree
Hide file tree
Showing 116 changed files with 5,523 additions and 2,627 deletions.
158 changes: 80 additions & 78 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,84 +7,86 @@ on:
- master

jobs:
check-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Make dictu and run checkTests
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu scripts/checkTests.du ci
test-ubuntu-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04]
check-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make dictu and run checkTests
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev uuid-dev
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu ops/checkTests.du ci
test-ubuntu-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04]

steps:
- uses: actions/checkout@v2
- name: Make dictu and run tests (No HTTP)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
- name: Remove build directory
run: |
rm -rf build
- name: Make dictu and run tests (HTTP)
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
test-mac-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, macOS-11]
steps:
- uses: actions/checkout@v3
- name: Make dictu and run tests (No HTTP)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
- name: Remove build directory
run: |
rm -rf build
- name: Make dictu and run tests (HTTP)
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev uuid-dev
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
test-mac-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, macOS-11]

steps:
- uses: actions/checkout@v2
- name: Make dictu and run tests (No HTTP)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
- name: Remove build directory
run: |
rm -rf build
- name: Make dictu and run tests
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
test-windows-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019]
steps:
- uses: actions/checkout@v3
- name: Make dictu and run tests (No HTTP)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
- name: Remove build directory
run: |
rm -rf build
- name: Make dictu and run tests
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu tests/runTests.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
test-windows-cmake:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019]

steps:
- uses: actions/checkout@v2
- name: Make dictu and run tests (No HTTP No Linenoise)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_SYSTEM_VERSION="10.0.18362.0" -DCICD=1 -DDISABLE_HTTP=1 -DDISABLE_LINENOISE=1 -B build
cmake --build build
Debug\dictu.exe tests/runTests.du ci
run-examples:
name: Test Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Make dictu and run examples
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu examples/runExamples.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
steps:
- uses: actions/checkout@v3
- name: Make dictu and run tests (No HTTP)
run: |
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_SYSTEM_VERSION="10.0.18362.0" -DCICD=1 -DDISABLE_HTTP=1 -B build
cmake --build build
Debug\dictu.exe tests/runTests.du ci
run-examples:
name: Test Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make dictu and run examples
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev uuid-dev
cmake -DCMAKE_BUILD_TYPE=Debug -B ./build
cmake --build ./build
./dictu examples/runExamples.du ci | tee /dev/stderr | grep -q 'Total bytes lost: 0'
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
tags:
- '*'

name: Upload Release Asset

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev uuid-dev
cmake -DCMAKE_BUILD_TYPE=Release -B ./build
cmake --build ./build
- name: Package
run: |
./dictu ops/pkgBuild.du
mv dictu dictu-linux-x86_64
- name: Release
uses: SierraSoftworks/gh-releases@v1.0.7
with:
token: ${{ secrets.TOKEN }}
overwrite: 'true'
files: |
dictu-linux-x86_64
dictu_${{ github.ref_name }}_amd64.deb
dictu_${{ github.ref_name }}_x86_64.apk
dictu_${{ github.ref_name }}.x86_64.rpm
- name: Docker Hub Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: dictulang/dictu:${{ github.ref_name }}
file: ./Docker/DictuUbuntuDockerfile
context: .
2 changes: 1 addition & 1 deletion Docker/DictuAlpineDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine

WORKDIR Dictu

RUN apk add git make curl-dev gcc libc-dev cmake --no-cache
RUN apk add git make curl-dev gcc libc-dev cmake libuuid --no-cache

RUN git clone https://github.com/dictu-lang/Dictu.git

Expand Down
2 changes: 1 addition & 1 deletion Docker/DictuUbuntuDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& apt-get update \
&& apt-get install -y --reinstall ca-certificates \
&& apt-get install -y --no-install-recommends git cmake libcurl4-gnutls-dev \
&& apt-get install -y --no-install-recommends git cmake libcurl4-gnutls-dev uuid-dev \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/dictu-lang/Dictu.git
Expand Down
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Documentation for Dictu can be found [here](https://dictu-lang.com/)
[![CI](https://github.com/Jason2605/Dictu/workflows/CI/badge.svg)](https://github.com/Jason2605/Dictu/actions)

## Example programs
```js
```cs
import System;

const guess = 10;
Expand All @@ -36,7 +36,7 @@ while {
}
```

```js
```cs
def fibonacci(num) {
if (num < 2) {
return num;
Expand Down Expand Up @@ -75,25 +75,13 @@ $ cmake --build ./build
$ ./dictu
```

#### Compiling without linenoise
[Linenoise](https://github.com/antirez/linenoise) is used within Dictu to enhance the REPL, however it does not build on windows
systems so a simpler REPL solution is used.

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_LINENOISE=1 -B ./build
$ cmake --build ./build
$ ./build/Dictu
```

### Docker Installation

Refer to [Dictu Docker](https://github.com/dictu-lang/Dictu/blob/develop/Docker/README.md)

### FreeBSD Installation

For a full installation, make sure `curl` and `linenoise` are installed. They can be installed from the commands below:
For a full installation, make sure `curl` is installed. It can be installed from the commands below:

```bash
$ pkg install -y curl linenoise-ng
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
color_scheme: "dictu" # Custom theme
logo: "/assets/images/dictu-logo/dictu-wordmark.svg"

version: "0.26.0"
version: "0.27.0"
github_username: dictu-lang
search_enabled: true

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/built-ins.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ printError("test"); // "test"
printError(10, "test", nil, true); // 10, "test", nil, true
```

### input(string: prompt -> optional)
### input(String: prompt -> Optional) -> String

Gathers user input from stdin and returns the value as a string. `input()` has an optional prompt which will be shown to
the user before they enter their string.
Expand All @@ -55,7 +55,7 @@ input();
input("Input: ");
```

### type(value)
### type(value) -> String

Returns the type of a given value as a string.

Expand All @@ -65,7 +65,7 @@ type(true); // "bool"
type([]); // "list"
```

### assert(boolean)
### assert(Boolean)

Raise a runtime error if the given boolean is not true.

Expand All @@ -74,7 +74,7 @@ assert(10 > 9);
assert(9 > 10); // assert() was false!
```

### isDefined(string)
### isDefined(String) -> Boolean

Returns a boolean depending on whether a variable has been defined in the global scope.

Expand Down
Loading

0 comments on commit b1d9c25

Please sign in to comment.