66 Commits

Author SHA1 Message Date
Sybren A. Stüvel
858089a1c3 Makefile: add release-package target
Add Makefile target for building release packages. There are individual
targets `release-package-{linux,darwin,windows}` for specific OSses. The
`release-package` targets just runs all of them.

The `release-package-darwin` builds only for AMD64/x64 CPUs, since there
are no static builds fo FFmpeg for that platform:
https://evermeet.cx/ffmpeg/apple-silicon-arm

Manifest Task: T99411
2022-07-25 16:53:25 +02:00
Sybren A. Stüvel
c1a728dc2f Version updates via Makefile
Flamenco now no longer uses the Git tags + hash for the application
version, but an explicit `VERSION` variable in the `Makefile`.

After changing the `VERSION` variable in the `Makefile`, run
`make update-version`.

Not every part of Flamenco looks at this variable, though. Most
importantly: the Blender add-on needs special handling, because that
doesn't just take a version string but a tuple of integers. Running
`make update-version` updates the add-on's `bl_info` dict with the new
version. If the version has any `-blabla` suffix (like `3.0-beta0`) it
will also set the `warning` field to explain that it's not a stable
release.
2022-07-25 16:08:07 +02:00
Sybren A. Stüvel
a0b4fc18e6 Makefile: quiet the generator for JS and Python code
The OpenAPI generator is very noisy, so it now logs to a file instead
of to stdout. The file is git-ignored. This was easier than redirecting
to `/dev/null`, as that's not available on Windows.
2022-07-25 16:08:07 +02:00
Sybren A. Stüvel
c7987a8500 Makefile: remove PKG_LIST variable
The `$PKG_LIST` variable was only used for running `go test`, and can be
replaced with `./...`.
2022-07-25 16:08:07 +02:00
Sybren A. Stüvel
bcbe35a7c7 Run Go tests in parallel
Earlier versions of the code didn't have proper separation of SQLite
databases for the unit tests. Tests nowadays use separate in-memory
databases, so they can run in parallel just fine.
2022-07-25 16:08:07 +02:00
Francesco Siddi
05e82ea5e4 Website: Update deployment script
The flamenco.io website moves to flamenco.blender.org!
This commit updates the Makefile as follows:

- Rename 'site' to 'project-website', so the new command to deploy is
  'make project-website'
- Move the website directory from 'flamenco-io-site' to
  'project-website'
- Update the rsync command do reflect the new deployment destination
2022-07-25 14:42:30 +02:00
Sybren A. Stüvel
59cb21e3b6 Makefile: add tools targets to download FFmpeg
Four Makefile targets have been added:
- `tools`, which evokes the other three
- `tools-linux`, `tools-darwin`, `tools-windows`, download FFmpeg and put
  the `ffmpeg` executables into `./tools/ffmpeg-{OS}-{ARCH}`.

Downloaded tarball/ZIP files are stored in `tools/download`, and won't be
re-downloaded if they already exist.
2022-07-22 16:37:14 +02:00
Sybren A. Stüvel
fee0717179 Makefile: on Windows, run unix2dos on generated files
The generators always produce UNIX line-ends. This creates false file
modifications with Git on Windows. Convert them to DOS line-ends to avoid
this.

This was already done for the Go code; this commit just copies the approach
to the Python and JavaScript generators.
2022-07-16 11:12:41 +02:00
Sybren A. Stüvel
be77403114 Makefile: add flamenco-manager-without-webapp target
This builds Flamenco Manager, without rebuilding the webapp, and without
the race condition checker.
2022-07-15 15:08:00 +02:00
Sybren A. Stüvel
20be78ea0f Stresser: add .PHONY to Makefile to make it always build 2022-07-15 15:08:00 +02:00
Sybren A. Stüvel
35fe0146d3 Add stress tester for task updates
Build with `make stresser`. Run with:

  ./stresser -worker UUID -secret ABCXYZ

The worker ID and secret can be obtained from
`flamenco-worker-credentials.yaml`. If left empty, the stresser will
register as a new worker, and log the credentials to be used on the next
invocation.
2022-07-15 15:08:00 +02:00
Sybren A. Stüvel
666d639efa Install Hugo as well, for building the flamenco.io website
`make with-deps` now installs Hugo as well, for building the Flamenco.io
static website.
2022-07-07 12:15:02 +02:00
Sybren A. Stüvel
9939e43b63 Add make site target to build & publish the website
This of course needs SSH access to the flamenco.io website.

Run `hugo --serve` from the `web/flamenco-io-site` directory to simply
run an in-memory copy of the site, and browse it locally at
http://localhost:1313/
2022-07-05 16:17:25 +02:00
Sybren A. Stüvel
feaf9545a6 Revert "Move the webapp from /app/… to /app/v3/…"
This reverts commit fcb261f5d336c4362339e6da5b35a340ec5aa6e1. The
`/app/v3` URL didn't look nice enough.
2022-07-05 11:51:05 +02:00
Sybren A. Stüvel
fcb261f5d3 Move the webapp from /app/… to /app/v3/…
This will help in the future to host multiple (major) versions of Flamenco
on the same system, redirecting based on their URL prefix.
2022-07-04 12:22:41 +02:00
Sybren A. Stüvel
75723daba2 Improve the static webapp building & embedding
Some smaller changes to make the webapp building smoother, and also to
make sure there are no errors on a clean Git checkout.
2022-06-30 17:41:36 +02:00
Sybren A. Stüvel
c3345131c7 Rename flamenco-addon.zip to flamenco3-addon.zip
Just to be explicit this is for the new Flamenco version.
2022-06-28 12:17:57 +02:00
Sybren A. Stüvel
08dc210616 Makefile: add commented-out command useful when debugging
Add the command that's needed to disable JavaScript minification, useful
for debugging JS errors.

No functional changes.
2022-06-28 10:49:48 +02:00
Sybren A. Stüvel
b021782ca0 Get the make package command to work
To create a single ZIP file that contains the Manager, Worker, and add-on,
just run `make package`.
2022-06-27 16:03:02 +02:00
Sybren A. Stüvel
1b40038e3d Add Go program that can create the addon ZIP file
Use Go to create the addon ZIP file, to be independent of any ZIP
executable being installed on the system.
2022-06-27 15:58:14 +02:00
Sybren A. Stüvel
7b028df8ac Manager: serve static files of the webapp at /app/
Vue Router generates URLs for which there are no static files on the
filesystem (like `/jobs/{job ID}`). To make this work, the webapp's
`index.html` has to be served for such requests. The client-side JavaScript
then figures out how things fit together, and can even render a nice 404
page if necessary.

This shouldn't happen for non-webapp URLs, though. Because of this, the
entire webapp (including the "serve `index.html` if file not found logic)
is moved to a `/app/` base URL.

`make flamenco-manager` now also builds the webapp and embeds the static
files into the binary.

`make flamenco-manager_race` does NOT rebuild the static web files, to
help speed up of debug cycles. Run `make webapp-static` to rebuild the
webapp itself, if necessary, or run a separate web development server with
`yarn --cwd web/app run dev --host`.
2022-06-27 14:53:42 +02:00
Sybren A. Stüvel
744fabea78 OAPI: rename pkg/api/flamenco-manager.yaml to flamenco-openapi.yaml
Rename `pkg/api/flamenco-manager.yaml` to `flamenco-openapi.yaml`, to
distinguish the OpenAPI definition file from the Flamenco Manager
configuration file of the same name (but in a different directory).

No functional changes.
2022-05-19 15:22:37 +02:00
Sybren A. Stüvel
e72ea6b310 make clean: no longer regenerate source
Regenerating code with `make clean` was somewhat useful when only Go code
was generated, because that didn't include the version number / git hash.
The Python and JS code do have that version/hash, so `make clean` became
a source-altering operation, which wasn't nice.
2022-05-16 10:10:48 +02:00
Sybren A. Stüvel
88929db582 make clean: also remove race files
Also remove `flamenco-manager_race` and `flamenco-worker_race` when running
`make clean`.
2022-05-16 10:08:37 +02:00
Sybren A. Stüvel
782c60a6e7 OAPI: remove '-dirty' suffix from the version number in generated code
The version number used in the OpenAPI-generated code shouldn't contain
the `-dirty` suffix. In the common development workflow, those files
will always be dirty; because they're only committed after things are
locally working, the implementation has already been written.
2022-05-03 11:09:47 +02:00
Sybren A. Stüvel
03d6f99c3d Makefile: include getting webapp dependencies with yarn install
Running `make` will now also run `yarn install` for the webapp.
2022-04-29 12:30:02 +02:00
Sybren A. Stüvel
1331d29b10 Makefile: mark new race-checker-enabled targets as 'phony' 2022-04-21 19:06:18 +02:00
Sybren A. Stüvel
5a5a9aec8b Makefile: add rules for builds with race condition checker enabled
New rules `flamenco-manager_race` and `flamenco-worker_race` will build
with the race condition checker enabled.
2022-04-21 19:06:18 +02:00
Sybren A. Stüvel
555c935790 Web: Replace Vue 2 with Vue 3 webapp
Replace the Vue v2 webapp with a Vue v3 one, and embed the OpenAPI
client in the webapp itself (instead of being its own npm project).

- Vue v2.x -> v3.x
- Tabulator v4.x -> v5.1
- Moment JS -> replaced with Luxon JS
- Vue CLI/UI -> replaced with Vite
2022-04-12 12:34:49 +02:00
Sybren A. Stüvel
7f5978a0f2 Use go install instead of go get to install code generators 2022-04-09 11:50:24 +02:00
Sybren A. Stüvel
5e5fa57fa4 OAPI: tweak the JS generator to do more what we want 2022-04-04 19:33:46 +02:00
Sybren A. Stüvel
0f2477370f Remove SocketIO PoC
Remove SocketIO proof of concept, as its code has been integrated into
Flamenco Manager.
2022-04-04 16:27:15 +02:00
Sybren A. Stüvel
e990603311 OAPI: Add generated JavaScript API client
This adds a JS client for the OAPI interface, and introduces the SocketIO
stuff into Flamenco Manager itself.

To build & run:
- in `web/manager-api` run `npm install`
- in `web/manager-api` run `npm link`
- in `web/app` run `npm install`
- in `web/app` run `npm link flamenco-manager`
- in `web/app` run `yarn serve`

This may not be a complete list, but at least some of those steps are
necessary.
2022-04-01 16:40:54 +02:00
Sybren A. Stüvel
c69e0909ae Shaman submission is working! 2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
d87cba6d7c Makefile: add make package target
Add a simple way to create a download bundle. Not yet complete, but useful
for demo at the weekly.
2022-03-17 16:54:37 +01:00
Sybren A. Stüvel
51b23a38b3 OAPI: integrate Python code generator in Makefile
Instead of having the Python code generator as a separate shell script,
include it in the Makefile. There are now three make targets:

- generate-go: only generate Go code, for the Worker & Manager
- generate-py: only generate Python code, for the Blender add-on
- generate: run both
2022-03-10 15:48:20 +01:00
Sybren A. Stüvel
2610836861 Makefile: don't generate code when running make
Generated code is to be committed to Git anyway, so there is no need to
regenerate it on every build.

The code can be regenerated explicitly by running `make generate`.
2022-03-03 11:51:15 +01:00
Sybren A. Stüvel
efbbb8c7d8 Makefile: remove some unused parts
Some parts were still leftovers from other projects this Makefile was
copied from.
2022-03-03 11:50:03 +01:00
Sybren A. Stüvel
42daa87839 Makefile: convert generated files to native line-ends on Windows
Git wants to see native line-ends in source files, but the code generators
we use always write UNIX line-ends. `make generate` on Windows now passes
generated files through `unix2dos`. This allows regenerating files without
Git listing them as modified.
2022-03-03 11:49:26 +01:00
Sybren A. Stüvel
47e36c927c Change package URL to the blender.org repository 2022-03-01 20:45:09 +01:00
Sybren A. Stüvel
6067a0ffb0 Remove 'make static' target
Having `CGO_ENABLED=0` already produces a static binary.
2022-02-28 13:02:43 +01:00
Sybren A. Stüvel
194422d9fa Remove -poc suffix from Manager and Worker
The code is mature enough to no longer be a proof-of-concept.
2022-02-28 13:01:13 +01:00
Sybren A. Stüvel
4627169106 Remove unused Makefile targets
The Makefile started as a standard file I use for multiple Go projects,
but it was aimed at having only one executable to build. I've removed
everything that assumes a single executable, and kept the parts that are
actually used now.
2022-02-28 12:59:30 +01:00
Sybren A. Stüvel
17e622ebc3 Some build & filename tweaks to allow building from scratch again
The build chain got a bit confused when doing things from scratch, as
`test_support.go` was used in the non-test builds. Renaming it to
`support_test.go` was the easiest way to avoid that.
2022-02-25 16:17:49 +01:00
Sybren A. Stüvel
4cd10e57b2 Run all Go commands with CGO_ENABLED=0
This ensures that nothing will require a C compiler.
2022-02-24 11:37:02 +01:00
Sybren A. Stüvel
f0aea6646f Run go generate in the right order
The `pkg/api` code needs to be generated before the interface mocks that
use it.
2022-02-24 11:35:54 +01:00
Sybren A. Stüvel
d50efa87ed Don't run go generate with make test
`go generate` is taking quite some time now, so just run when necessary.
2022-02-19 14:39:43 +01:00
Sybren A. Stüvel
bb53cc1e4a Task log storage service 2022-02-18 18:19:35 +01:00
Sybren A. Stüvel
8424e690ee Bump Go version to 1.18 for generics support 2022-02-18 11:41:31 +01:00
Sybren A. Stüvel
f1ad0a66a8 Makefile: separate build rule for each app
These do not run `go generate`, so they're faster but take a bit more care.
2022-02-17 13:58:10 +01:00