Update deps and bump version #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
branches: [ "main" ] | |
push: | |
branches: [ "main" ] | |
jobs: | |
frontend: | |
name: Build frontend assets | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal | |
- run: rustup target add wasm32-unknown-unknown | |
- uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
frontend/target/ | |
key: frontend-${{ hashFiles('frontend/Cargo.toml') }} | |
restore-keys: frontend- | |
- name: Build frontend | |
run: trunk build | |
working-directory: frontend | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: frontend-build-${{ github.sha }} | |
path: frontend/dist | |
build: | |
name: Binaries for ${{ matrix.name }} | |
needs: frontend | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
name: | |
- linux-x86-64-gnu | |
- linux-armv7-gnu | |
- linux-arm64-gnu | |
- linux-x86-64-musl | |
- linux-arm64-musl | |
include: | |
- name: linux-x86-64-gnu | |
target: x86_64-unknown-linux-gnu | |
platform: ~ | |
- name: linux-armv7-gnu | |
target: armv7-unknown-linux-gnueabihf | |
platform: ~ | |
- name: linux-arm64-gnu | |
target: aarch64-unknown-linux-gnu | |
platform: ~ | |
- name: linux-x86-64-musl | |
target: x86_64-unknown-linux-musl | |
platform: amd64 | |
- name: linux-arm64-musl | |
target: aarch64-unknown-linux-musl | |
platform: arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal | |
- uses: actions/download-artifact@v4 | |
with: | |
name: frontend-build-${{ github.sha }} | |
path: frontend/dist | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
backend/target/ | |
key: backend-${{ matrix.name }}-${{ hashFiles('backend/Cargo.toml') }} | |
restore-keys: backend-${{ matrix.name }}- | |
- run: cargo install cross --git https://github.com/cross-rs/cross || true | |
- name: Cross build | |
run: cross build --release --locked --target ${{ matrix.target }} --manifest-path backend/Cargo.toml |