diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..d8d8aa9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,25 @@ +name: Bug Report + +about: Report something that is not working as expected. + +--- + +**Describe the bug** +A clear description of what went wrong. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Run '...' +3. See error + +**Expected behavior** +What you expected to happen. + +**Environment:** +- OS: [e.g. Debian 12, macOS 14] +- SBCL version: [e.g. 2.4.0] +- OpenCortex version: [e.g. v0.1.0] + +**Additional context** +Any other relevant information (logs, stack traces, etc.) \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..26ca9d8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,22 @@ +name: Feature Request + +about: Suggest a new feature or enhancement. + +--- + +**Describe the problem** +What problem does this feature solve? + +**Describe the ideal solution** +A clear description of what you want to happen. + +**Describe alternatives considered** +Any alternative solutions you've considered. + +**Additional context** +Any other relevant context (mockups, related issues, etc.) + +**Implementation suggestion** +(Optional) If you have thoughts on how to implement this in pure Common Lisp + Org-mode: +- Which skill should own this? +- Should it be a =def-cognitive-tool=, a new skill, or an enhancement to an existing one? \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..1db023e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,45 @@ +name: Lint + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + container: + image: ubuntu:latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update && apt-get install -y --no-install-recommends \ + git emacs-nox + + - name: Check for forbidden patterns + run: | + grep -r "json\." --include="*.lisp" . && \ + echo "ERROR: Found JSON usage in Lisp files" && exit 1 || \ + echo "OK: No JSON in Lisp files" + + - name: Check literate granularity + run: | + find . -name "*.org" -path "./skills/*" -exec grep -L "#+begin_src lisp" {} \; | \ + grep -v "CLA\|CONTRIBUTING\|CHANGELOG" && \ + echo "WARNING: Some skills lack lisp blocks" || \ + echo "OK: All skills have lisp blocks" + + - name: Verify .lisp files are generated + run: | + for f in library/gen/*.lisp; do + org="${f%.lisp}.org" + if [ -f "$org" ]; then + : # generated, OK + else + echo "WARNING: $f has no corresponding .org source" + fi + done \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c02cbd0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Create tarball + run: | + git archive --format=tar.gz --prefix=opencortex-$(git describe --tags) HEAD -o opencortex.tar.gz + + - name: Create zipball + run: | + git archive --format=zip --prefix=opencortex-$(git describe --tags) HEAD -o opencortex.zip + + - name: Upload to GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + opencortex.tar.gz + opencortex.zip + generate_release_notes: true \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9a4b1d0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + container: + image: statusoftech/sbcl:2.4.0 + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update && apt-get install -y --no-install-recommends \ + git curl openssl make automake autoconf gcc clisp python3 python3-pip + + - name: Install Quicklisp + run: | + curl -L https://beta.quicklisp.org/quicklisp.lisp -o /tmp/quicklisp.lisp + sbcl --non-interactive \ + --load /tmp/quicklisp.lisp \ + --eval '(quicklisp-quickstart:install :path "~/quicklisp/")' \ + --eval '(ql:add-to-init-file)' + + - name: Install ASDF systems + run: | + sbcl --non-interactive \ + --eval '(ql:quickload :opencortex)' + env: + HOME: /root + + - name: Run tests + run: | + sbcl --non-interactive \ + --eval '(ql:quickload :opencortex/tests)' \ + --eval '(uiop:quit 0)' + env: + HOME: /root \ No newline at end of file