-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for evaluating Basilisp code from Blender's Python console, file, and Text Editor. - Implemented functionality to start the nREPL server from Blender.
- Loading branch information
0 parents
commit f009fc4
Showing
27 changed files
with
3,422 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# adapted from https://github.com/anze3db/words-tui/blob/main/.github/workflows/publish.yml | ||
name: Publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: release | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
contents: write # github release upload | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: Build package | ||
run: poetry build | ||
- name: Upload release artifacts | ||
run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl} | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Run tests | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
push: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ${{matrix.os}} | ||
env: | ||
BB_BLENDER_TEST_HOME: "~/blender" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
version: ['3.11'] | ||
blender: ['4.2.0'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
|
||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
|
||
- name: Setup a local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ runner.os }}-${{ matrix.version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install the project dependencies | ||
run: poetry install | ||
|
||
- name: Run tests | ||
run: poetry run pytest -v | ||
|
||
- name: Restore Blender from cache | ||
id: cache-blender | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/blender | ||
key: ${{ runner.os }}-blender-${{ matrix.blender }} | ||
|
||
- name: Install Blender | ||
if: steps.cache-blender.outputs.cache-hit != 'true' | ||
run: | | ||
poetry run python scripts/blender_install.py ${{ matrix.blender }} | ||
- name: "Save Blender in cache" | ||
if: steps.cache-blender.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: ~/blender | ||
key: ${{ steps.cache-blender.outputs.cache-primary-key }} | ||
|
||
- name: Install EGL mesa | ||
if: "startsWith (matrix.os, 'ubuntu')" | ||
run: | | ||
sudo apt-get update -y -qq | ||
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev | ||
- name: Run integration tests | ||
run: | | ||
poetry build | ||
poetry run python scripts/bb_package_install.py | ||
poetry run pytest -m integration -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
.bb-tmp | ||
dist/ | ||
|
||
\#*# | ||
.#* | ||
*~ | ||
|
||
.nrepl-port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
## 0.1.0 | ||
|
||
- Added support for evaluating Basilisp code from Blender's Python console, file, and Text Editor. | ||
- Implemented functionality to start the nREPL server from Blender. | ||
|
||
|
Oops, something went wrong.