Skip to content

Commit

Permalink
Merge pull request #194 from beautiful-atoms/installer-fix
Browse files Browse the repository at this point in the history
Update blender version and various in CI
  • Loading branch information
alchem0x2A committed Oct 8, 2023
2 parents d4c1142 + ca6ce22 commit 74726ed
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/batoms_plugin_test.yaml
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
# Manually change these to match the blender image versions
blender-version: ["3.4"]
blender-version: ["3.6"]
container:
# env is not
image: ghcr.io/beautiful-atoms/blender-env:blender${{ matrix.blender-version }}
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
blender-version: ["3.4"]
blender-version: ["3.6"]
container:
image: ghcr.io/beautiful-atoms/beautiful-atoms:blender${{ matrix.blender-version }}
options: --user root
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build_blender_env_image.yml
Expand Up @@ -4,7 +4,7 @@ env:
DOCKERHUB_USERNAME: luciusm
IMAGE_NAME: blender-env
TEST_TAG: blender-env:tests
LATEST_VERSION: "3.4"
LATEST_VERSION: "3.6"

on:
push:
Expand All @@ -22,7 +22,8 @@ jobs:
strategy:
matrix:
# Manually change these to match the blender image versions
blender-version: ["3.0", "3.1", "3.2", "3.4"]
# Blender 3.3 seems to break
blender-version: ["3.0", "3.1", "3.2", "3.4", "3.5", "3.6"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_main_image.yml
Expand Up @@ -5,7 +5,7 @@ env:
BASE_IMAGE_NAME: blender-env
IMAGE_NAME: beautiful-atoms
TEST_TAG: beautiful-atoms:tests
LATEST_VERSION: "3.4"
LATEST_VERSION: "3.6"

on:
push:
Expand All @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
# Manually change these to match the blender image versions
blender-version: ["3.0", "3.1", "3.2", "3.4"]
blender-version: ["3.0", "3.1", "3.2", "3.4", "3.5", "3.6"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/test_install_script.yaml
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

env:
BLENDER_DOWN_URL: "https://mirror.clarkson.edu/blender/release"
BLENDER_DOWN_URL: "https://mirrors.ocf.berkeley.edu/blender/release"

jobs:
unittest-linux:
Expand All @@ -24,14 +24,15 @@ jobs:
strategy:
matrix:
# For future tests we will only over 3 of the latest versions
blender_ver: ["3.4.1"]
blender_ver: ["3.6.4"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: batoms
python-version: "3.10"
mamba-version: "*"
#mamba-version: "*"
miniforge-variant: Mambaforge # Fix according to https://github.com/nextstrain/cli/commit/4a764976519ca5c540c745463548a9d883eae079
channels: conda-forge,defaults
- name: Update libstdc++ and
run: |
Expand Down Expand Up @@ -61,14 +62,15 @@ jobs:
strategy:
matrix:
# For future tests we will only over 3 of the latest versions
blender_ver: ["3.4.1"]
blender_ver: ["3.6.4"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: batoms
python-version: "3.10"
mamba-version: "*"
#mamba-version: "*"
miniforge-variant: Mambaforge # Fix according to https://github.com/nextstrain/cli/commit/4a764976519ca5c540c745463548a9d883eae079
channels: conda-forge,defaults
- name: Update libstdc++ and
run: |
Expand Down Expand Up @@ -131,14 +133,17 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
# Somehow the macos installers are throwing segfault, could we check?
blender_ver: ["3.4.1"]

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: batoms
python-version: "3.10"
mamba-version: "*"
#mamba-version: "*"
miniforge-variant: Mambaforge # Fix according to https://github.com/nextstrain/cli/commit/4a764976519ca5c540c745463548a9d883eae079
channels: conda-forge,defaults
- name: Download portable blender
run: |
Expand All @@ -154,6 +159,13 @@ jobs:
echo "BLENDER_ROOT=$HOME/Applications/Blender.app/Contents/Resources/${MAJ_VER}" >> $GITHUB_ENV
chmod -R u+x $HOME/Applications/Blender.app
# ls "$HOME/Library/Application Support/Blender/${MAJ_VER}/config/"
# Just debugger session
- name: try call macos blender
run: |
/Users/runner/Applications/Blender.app/Contents/MacOS/Blender -b || true
find /var/folders -name blender.crash.txt -exec cat {} \; || true
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Run installation and uninstallation script
run: |
echo Currently install in $(pwd)
Expand Down Expand Up @@ -194,7 +206,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
blender_ver: ["3.4.1"]
blender_ver: ["3.6.4"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.env
Expand Up @@ -2,7 +2,7 @@
# Dockerfile adapted from https://github.com/nytimes/rd-blender-docker
# To build the Docker image, create the build from root directory:
# docker build --build-arg BLENDER_VERSION=3.0 . -f Dockerfiles/Dockerfile.base_3.0 -t <image_name>:blender3.0
FROM nvidia/cudagl:10.1-base-ubuntu18.04
FROM nvidia/cudagl:11.4.1-runtime-ubuntu20.04

ARG BLENDER_VERSION=3.4

Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/bl_release_parser.py
Expand Up @@ -53,7 +53,7 @@ def get_default_bl_py_version(blender_root):
def extract_python_source(blender_root, python_version):
short_version = ".".join(python_version.split(".")[:2])
url = f"https://www.python.org/ftp/python/{python_version}/Python-{python_version}.tgz"
commands = f"wget {url} && tar -xzf Python-*.tgz && cp -r Python-*/Include/* {blender_root}/python/include/python{short_version}/ && rm -rf Python-*"
commands = f"wget {url} && tar -xzf Python-*.tgz && mkdir -p {blender_root}/python/include/python{short_version} && cp -r Python-*/Include/* {blender_root}/python/include/python{short_version}/ && rm -rf Python-*"
proc = run(commands, shell=True)
if proc.returncode != 0:
raise RuntimeError("Error extracting python source")
Expand Down
7 changes: 5 additions & 2 deletions install.py
Expand Up @@ -62,7 +62,7 @@
"zstandard",
]

ALLOWED_BLENDER_VERSIONS = ["3.4", "3.5"]
ALLOWED_BLENDER_VERSIONS = ["3.4", "3.5", "3.6"]
DEPRECATED_BLENDER_VERSIONS = ["3.0", "3.1", "3.2"]

PY_PATH = "python"
Expand Down Expand Up @@ -424,11 +424,13 @@ def _get_default_locations(os_name):
)
)
matches = []
true_search_locations = []
for l in default_locations[os_name]:
for version in ALLOWED_BLENDER_VERSIONS:
true_location = Path(
expandvars(expanduser(l.format(version=version)))
).absolute()
true_search_locations.append(true_location)
if true_location.is_dir():
matches.append(true_location)
# Multiple blender installation may occur on macos
Expand All @@ -445,7 +447,8 @@ def _get_default_locations(os_name):
if match is None:
raise FileNotFoundError(
(
f"Cannot find Blender>=3.4 in default installation locations. "
f"Cannot find Blender>=3.4 in default installation locations: \n"
f"{true_search_locations} \n"
"Please specify the full path to the blender installation location."
)
)
Expand Down

0 comments on commit 74726ed

Please sign in to comment.