Skip to content

Commit

Permalink
removed examples from the main repository
Browse files Browse the repository at this point in the history
  • Loading branch information
SpectraL519 committed May 15, 2024
1 parent de0fba4 commit 8b65f90
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 349 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ on:

jobs:
build:
name: Build examples
name: Build and run tests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
shell: bash
- name: Prepare env
run: |
sudo bash ./scripts/env/install_clang17_toolchain.sh
continue-on-error: false

- name: Build
shell: bash
- name: Prepare
env:
CC: clang-17
CXX: clang++-17
run: |
cd example
cmake -B build -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17
cd build
make
continue-on-error: false

- name: Build test executable
run: |
cd build && make
continue-on-error: false

- name: Run tests
run: |
.build/test/run_tests
continue-on-error: false
18 changes: 12 additions & 6 deletions .github/workflows/gpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@ on:

jobs:
build:
name: Build examples
name: Build and run tests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
shell: bash
- name: Prepare
env:
CC: gcc-11
CXX: g++-11
run: |
cd example
cmake -B build -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11
cd build
make
continue-on-error: false

- name: Build test executable
run: |
cd build && make
continue-on-error: false

- name: Run tests
run: |
.build/test/run_tests
continue-on-error: false
32 changes: 0 additions & 32 deletions .github/workflows/test.yaml

This file was deleted.

35 changes: 3 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Command-line argument parser for C++20

[![g++](https://github.com/SpectraL519/cpp-ap/actions/workflows/gpp.yaml/badge.svg)](https://github.com/SpectraL519/cpp-ap/actions/workflows/g++)
[![clang++](https://github.com/SpectraL519/cpp-ap/actions/workflows/clang.yaml/badge.svg)](https://github.com/SpectraL519/cpp-ap/actions/workflows/clang++)
[![test](https://github.com/SpectraL519/cpp-ap/actions/workflows/test.yaml/badge.svg)](https://github.com/SpectraL519/cpp-ap/actions/workflows/test)
[![format](https://github.com/SpectraL519/cpp-ap/actions/workflows/format.yaml/badge.svg)](https://github.com/SpectraL519/cpp-ap/actions/workflows/format)

<br />
Expand Down Expand Up @@ -467,35 +466,7 @@ int main(int argc, char* argv[]) {
## Examples
If you wish to test the parser functionality with some real examples then follow these steps:
Open your terminal in the project's example directory:
```shell
cd <project-root>/example
```
The examples' source files are in the `<project-root>/example/source` directory.
> [!NOTE]
> Each source file is a sepparate example.
Building the examples:
```shell
cmake -B build
cd build
make
```
or
```shell
mkdir build && cd build
cmake ..
make
```
The compiled binaries will appear in the `<project-root>/example/build/bin` directory.
The library usage examples / demo projects can be found in the [cpp-ap-demo](https://github.com/SpectraL519/cpp-ap-demo) repository.
<br />
<br />
Expand Down Expand Up @@ -538,8 +509,8 @@ Run the tests:
./run_tests -ts="<test-suite-name>"
```
> [!NOTE]
> Test suites in the project have the same names as the files they're in.
> [!NOTE]
> Test suites in the project have the same names as the files they're in.
<br />
Expand Down
49 changes: 0 additions & 49 deletions example/CMakeLists.txt

This file was deleted.

51 changes: 0 additions & 51 deletions example/source/convert_numbers.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions example/source/merge_files.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions example/source/power.cpp

This file was deleted.

Loading

0 comments on commit 8b65f90

Please sign in to comment.