Skip to content

Commit 7607e11

Browse files
committed
Add CI pipeline to build application for linux 64.
Upgrade Blender to 4.5.3. Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
1 parent 12c3b4b commit 7607e11

4 files changed

Lines changed: 136 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This file is part of BOINC.
2+
# https://boinc.berkeley.edu
3+
# Copyright (C) 2025 University of California
4+
#
5+
# BOINC is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU Lesser General Public License
7+
# as published by the Free Software Foundation,
8+
# either version 3 of the License, or (at your option) any later version.
9+
#
10+
# BOINC is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
# See the GNU Lesser General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Lesser General Public License
16+
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
17+
18+
name: Build
19+
20+
on:
21+
push:
22+
branches: [ master ]
23+
pull_request:
24+
branches: [ master ]
25+
schedule:
26+
- cron: '0 0 * * *'
27+
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
30+
cancel-in-progress: true
31+
32+
jobs:
33+
build:
34+
name: ${{ matrix.arch }}-build
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
arch: [ x64 ]
39+
fail-fast: false
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v6
46+
with:
47+
check-latest: true
48+
49+
- name: Build
50+
run: |
51+
go version
52+
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" ./boincblender.go
53+
54+
- name: Upload artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: boincblender-linux-${{ matrix.arch }}
58+
path: |
59+
boincblender
60+
Dockerfile

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ boincblender
44
test_sample/
55
*.png
66
fraction_done
7+
*.exe
8+
*.swp

Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,23 @@ FROM debian
1919
WORKDIR /app
2020
ENV ARGS ""
2121

22-
RUN apt update && apt install -y \
23-
curl \
24-
xz-utils \
25-
unzip \
26-
zip \
27-
libx11-6 \
28-
libxrender1 \
29-
libxxf86vm-dev \
30-
libxfixes3 \
31-
libxi6 \
32-
libxkbcommon0 \
33-
libsm6 \
34-
libgl1 \
35-
libegl1
22+
RUN apt update && \
23+
apt install -y \
24+
curl \
25+
xz-utils \
26+
unzip \
27+
zip \
28+
libx11-6 \
29+
libxrender1 \
30+
libxxf86vm-dev \
31+
libxfixes3 \
32+
libxi6 \
33+
libxkbcommon0 \
34+
libsm6 \
35+
libgl1 \
36+
libegl1
3637

37-
RUN curl -L https://ftp.halifax.rwth-aachen.de/blender/release/Blender4.4/blender-4.4.3-linux-x64.tar.xz -o blender.tar.xz
38+
RUN curl -L https://ftp.halifax.rwth-aachen.de/blender/release/Blender4.5/blender-4.5.3-linux-x64.tar.xz -o blender.tar.xz
3839
RUN tar -xJvf blender.tar.xz --strip-components=1 -C /bin
3940
RUN rm blender.tar.xz
4041

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# BOINC Blender application for BOINC Central
2+
3+
An application to run Blender rendering tasks on [BOINC Central](https://boinc.berkeley.edu/central/).
4+
5+
## Command Line Usage
6+
7+
```
8+
./boincblender \
9+
-blender /bin/blender \
10+
-workdir /app \
11+
-input scene.blend \
12+
-output renders/frame_#### \
13+
-frame 1 \
14+
-engine CYCLES \
15+
-cyclesDevice CPU \
16+
-imageFormat PNG \
17+
-threads 4
18+
```
19+
20+
Key flags:
21+
- `-blender` Path to Blender executable (default `/bin/blender` inside the container)
22+
- `-workdir` Working directory (where input/output live)
23+
- `-input` (required) `.blend` file name relative to workdir
24+
- `-output` Output prefix (Blender will add frame numbering)
25+
- `-frame` Frame number to render
26+
- `-engine` `CYCLES` or `EEVEE`
27+
- `-cyclesDevice` Device when using Cycles: `CPU|CUDA|OPTIX|HIP|ONEAPI|METAL`
28+
- `-imageFormat` One of `TGA, RAWTGA, JPEG, IRIS, AVIRAW, AVIJPEG, PNG, BMP, HDR, TIFF`
29+
- `-threads` Thread count passed to Blender `-t`
30+
31+
A `fraction_done` file (0.000–1.000) is updated as progress lines are parsed and written from Blender output.
32+
33+
## Building Locally
34+
35+
Requires Go 1.22+.
36+
37+
```
38+
go build ./boincblender.go
39+
```
40+
41+
## Docker / Container Usage
42+
43+
The provided `Dockerfile` downloads Blender and sets up a minimal runtime.
44+
45+
Build the image:
46+
```
47+
docker build -t boinc-blender:latest .
48+
```
49+
50+
Run (expecting an `input.zip` containing the `.blend` and any assets):
51+
```
52+
docker run --rm -v "$PWD":/app -e ARGS="-input scene.blend -output frame_#### -frame 1 -engine CYCLES -threads 4" boinc-blender:latest
53+
```
54+
55+
The next parameters are mandatory:
56+
- `-input` (required) `.blend` file name relative to `/app`
57+
- `-output` Output prefix (Blender will add frame numbering)
58+
- `-frame` Frame number to render

0 commit comments

Comments
 (0)