bundle UI files into the binary

This is optional but now enabled for release builds.

Why?

* It shrinks the release docker images a bit, as the binary
  includes only the gzipped version of files and uncompressed into RAM
  at startup (which should be fast).

* It's a step toward #160.
This commit is contained in:
Scott Lamb
2023-08-04 12:52:05 -05:00
parent 02ac1a5570
commit faba358925
13 changed files with 534 additions and 61 deletions

View File

@@ -36,6 +36,9 @@ jobs:
# The retry here is to work around "Unable to connect to azure.archive.ubuntu.com" errors.
# https://github.com/actions/runner-images/issues/6894
run: sudo apt-get --option=APT::Acquire::Retries=3 update && sudo apt-get --option=APT::Acquire::Retries=3 install libncurses-dev libsqlite3-dev pkgconf
- uses: actions/setup-node@v2
with:
node-version: 18
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
@@ -43,8 +46,13 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
components: ${{ matrix.extra_components }}
- run: cd ui && npm ci
- run: cd ui && npm run build
- name: Test
run: cd server && cargo test ${{ matrix.extra_args }} --all
run: |
cd server
cargo test ${{ matrix.extra_args }} --all
cargo test --features=bundled-ui ${{ matrix.extra_args }} --all
continue-on-error: ${{ matrix.rust == 'nightly' }}
- name: Check formatting
if: matrix.rust == 'stable'