Skip to content

Commit

Permalink
Add example DDS project
Browse files Browse the repository at this point in the history
  • Loading branch information
Quincunx271 committed May 24, 2021
1 parent f87634a commit 7ab4ac2
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,31 @@ jobs:
cd src
sed -Ei "s/(warning_flags:.*)'/\1 -Werror'/g" tools/${{ matrix.toolchain }}
${{ runner.workspace }}/bin/dds build -t tools/${{ matrix.toolchain }}
build-dds-example:
runs-on: ubuntu-20.04

strategy:
matrix:
toolchain: [gcc-10.tc.json5]

steps:
- name: Install Dependencies
run: |
mkdir -p ${{ runner.workspace }}/bin && cd ${{ runner.workspace }}/bin
wget -nv https://github.com/vector-of-bool/dds/releases/download/0.1.0-alpha.6/dds-linux-x64
chmod +x dds-linux-x64
ln -s $PWD/dds-linux-x64 dds
- name: Print Configuration
run: |
echo ${{ matrix.toolchain }}
${{ runner.workspace }}/bin/dds --help
- uses: actions/checkout@v2
with:
path: src

- name: Build
run: |
cd src
sed -Ei "s/(warning_flags:.*)'/\1 -Werror'/g" tools/${{ matrix.toolchain }}
${{ runner.workspace }}/bin/dds build -t tools/${{ matrix.toolchain }} -p examples/dds --add-repo="https://quincunx271.github.io/dds-repos/public"
5 changes: 3 additions & 2 deletions docs/package-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
# DDS

TerseLambda can be used by [DDS](https://github.com/vector-of-bool/dds).
A pre-made DDS repo for TerseLambda can be found at https://github.com/Quincunx271/dds-repos;
these steps assume you wish to use that repo:
A pre-made DDS repo for TerseLambda can be found at https://github.com/Quincunx271/dds-repos.
See [this example](/examples/dds) for a complete example.
These steps assume you wish to use that repo:

* Add the repo to DDS:

Expand Down
4 changes: 4 additions & 0 deletions examples/dds/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Consuming TerseLambda via DDS

This example project shows how to use TerseLambda via the [DDS build system](https://github.com/vector-of-bool/dds).
See [the package management documentation](/docs/package-management.md).
3 changes: 3 additions & 0 deletions examples/dds/library.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
uses: ['quincunx271/terse-lambda']
}
6 changes: 6 additions & 0 deletions examples/dds/package.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
name: 'ExampleProject',
version: '0.0.0',
namespace: 'Example',
depends: ['[email protected]']
}
6 changes: 6 additions & 0 deletions examples/dds/src/example.main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <tl/tl.hpp>

int main()
{
return [] TL(_1)(0);
}

0 comments on commit 7ab4ac2

Please sign in to comment.