Skip to content

Add special values to process LPM tree #620

Add special values to process LPM tree

Add special values to process LPM tree #620

name: static build and upload
on:
pull_request:
push:
branches:
- main
jobs:
static-build:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@main
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Set up nix dev env
run: nix develop --command echo 0
- name: Set nix rustc env var
run: echo "NIX_RUSTC_VERSION=$(nix develop --ignore-environment --command rustc --version --verbose | tr -d '\n')" >> $GITHUB_ENV
- uses: Swatinem/rust-cache@v2
with:
key: ${{ env.NIX_RUSTC_VERSION }}
- name: Build `lightswitch` statically linked with glibc
run: nix develop --ignore-environment --command bash -c 'RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-unknown-linux-gnu'
- name: Show size
run: ls -lah target/x86_64-unknown-linux-gnu/release/lightswitch
- name: Run `ldd`
run: ldd target/x86_64-unknown-linux-gnu/release/lightswitch
- name: Upload binary
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-artifact@main
with:
name: lightswitch-x86_64
path: target/x86_64-unknown-linux-gnu/release/lightswitch