Skip to content

updated build ins

updated build ins #156

Workflow file for this run

name: build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
bin: vsd
target: x86_64-unknown-linux-gnu
- os: windows-latest
bin: vsd.exe
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set SHORT_SHA
shell: bash
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
version: "33.4"
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build vsd
run: cargo build -p vsd --release --no-default-features --features "capture,license,native-tls"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: vsd-${{ env.SHORT_SHA }}-${{ matrix.target }}
path: target/release/${{ matrix.bin }}