Skip to content

feat: use rust and add cli options #22

feat: use rust and add cli options

feat: use rust and add cli options #22

Workflow file for this run

name: Build
on:
pull_request:
workflow_call:
jobs:
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Print env
run: |
corepack enable
echo "node version:" $(node -v)
echo "npm version:" $(npm -v)
echo "pnpm version:" $(pnpm -v)
- name: Bootstrap
run: |
make bootstrap-web
- name: Build frontend assets
run: |
make build-web
- name: Upload
uses: actions/upload-artifact@v4
with:
name: web
path: build/static
build-binary:
name: build-${{ matrix.platform.file }}
runs-on: ${{ matrix.platform.runner }}
needs: build-web
strategy:
fail-fast: false
matrix:
# os:
# - { name: ubuntu-latest, task: linux }
# - { name: macos-latest, task: darwin }
# - { name: windows-latest, task: windows }
platform:
- runner: macos-latest
target: aarch64-apple-darwin
file: darwin-arm64
- runner: macos-latest
target: x86_64-apple-darwin
file: darwin-amd64
- runner: windows-latest
target: x86_64-pc-windows-msvc
file: windows-amd64.exe
- runner: windows-latest
target: i686-pc-windows-msvc
file: windows-386.exe
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
file: linux-amd64
- runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
file: linux-arm64
tool: gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- runner: ubuntu-latest
target: i686-unknown-linux-gnu
file: linux-386
tool: gcc-multilib
steps:
- uses: actions/checkout@v4
- name: Print env
run: |
echo "rustc version:" $(rustc --version)
echo "cargo version:" $(cargo --version)
- name: Download Static files
uses: actions/download-artifact@v4
with:
name: web
path: build/static
- name: Install tool
if: matrix.platform.tool
run: sudo apt-get install ${{ matrix.platform.tool }}
- name: Bootstrap
run: |
make bootstrap-server
- name: Build
run: make build-arch TARGET=${{ matrix.platform.target }} FILE=${{ matrix.platform.file }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: homebox-${{ matrix.platform.file }}
path: build/arch