restructure into "server" and "ui" subdirs

Besides being more clear about what belongs to which, this helps with
docker caching. The server and ui parts are only rebuilt when their
respective subdirectories change.

Extend this a bit further by making the webpack build not depend on
the target architecture. And adding cache dirs so parts of the server
and ui build process can be reused when layer-wide caching fails.
This commit is contained in:
Scott Lamb
2021-01-22 14:43:41 -08:00
parent adcfc5e5f0
commit dd66c7b0dd
100 changed files with 127 additions and 105 deletions

View File

@@ -27,7 +27,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
target
server/target
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libncurses-dev libsqlite3-dev pkgconf
@@ -38,7 +38,7 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Test
run: cargo test ${{ matrix.extra_args }} --all
run: cd server && cargo test ${{ matrix.extra_args }} --all
js:
name: Build and lint Javascript frontend
runs-on: ubuntu-20.04
@@ -57,6 +57,6 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn build
- run: yarn lint
- run: cd ui && yarn install
- run: cd ui && yarn build
- run: cd ui && yarn lint