diff --git a/.github/workflows/jule.yml b/.github/workflows/jule.yml index 56746e8..b3153ba 100644 --- a/.github/workflows/jule.yml +++ b/.github/workflows/jule.yml @@ -30,22 +30,14 @@ jobs: echo "$(pwd)/bin" >> $GITHUB_PATH cd .. - - name: Test + - name: Run checks run: | - julec test cliq - - name: Format - run: | - julefmt -w cliq - cd examples - make format - - name: Build examples - run: | - cd examples - make all + make .PHONY - name: Clean up run: | rm -rf .julec .julefmt **/.*out **/bin + make clean - name: Check formatting run: | diff --git a/examples/Makefile b/Makefile similarity index 51% rename from examples/Makefile rename to Makefile index abd3c8c..9c0c94a 100644 --- a/examples/Makefile +++ b/Makefile @@ -7,22 +7,29 @@ JULEC = julec JULEFMT = julefmt -EXAMPLES = simple +NAME = cliq +EXAMPLES = simpleGET -all: - mkdir -p bin +examples: + mkdir -p examples/bin @for example in $(EXAMPLES); do \ - cd $$example; \ + cd examples/$$example; \ $(JULEC) . -o ../bin/$$example; \ - cd ..; \ + cd ../..; \ done format: + $(JULEFMT) -w $(NAME) @for example in $(EXAMPLES); do \ - $(JULEFMT) -w $$example; \ + $(JULEFMT) -w examples/$$example; \ done +test: + mkdir -p bin + $(JULEC) test $(NAME) -o bin/$(NAME)_test + ./$(NAME)_test + clean: - rm -rf bin + rm -rf examples/bin -.PHONY: all format clean +.PHONY: examples format test clean diff --git a/examples/README.md b/examples/README.md index d720107..81a3d86 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,9 +4,9 @@ This directory contains examples of how to use the cliq library. You can compile all the examples using: ```bash -$ make all +$ make examples ``` -Executables will be placed in the `bin` directory. +Executables will be placed in the `examples/bin` directory. ## Simple Demonstrates how to create a simple CLI application with custom commands.