servicepoint-binding-c/.github/workflows/rust.yml
Vinzenz Schroeter c7d40b828b
All checks were successful
Rust / build-gnu-apt (pull_request) Successful in 5m13s
Rust / build-size-gnu-unstable (pull_request) Successful in 1m13s
per-config build output using VPATH
based on https://make.mad-scientist.net/papers/multi-architecture-builds/
2025-05-28 15:07:04 +02:00

58 lines
1.6 KiB
YAML

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"
jobs:
build-gnu-apt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update repos
run: sudo apt-get update -qq
- name: Install toolchain
run: sudo apt-get install -qy cargo rust-clippy liblzma-dev gcc make pkgconf
- name: Run Clippy
run: cargo clippy
- name: build
run: cargo build
- name: generate bindings
run: ./generate-binding.sh
- name: check that generated files did not change
run: output=$(git status --porcelain) && [ -z "$output" ]
- name: build example -- glibc release
run: cd example && make clean && make LIBC=gnu LINK=dynamic PROFILE=release
- name: build example -- glibc debug
run: cd example && make clean && make LIBC=gnu LINK=dynamic PROFILE=debug
build-size-gnu-unstable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update repos
run: sudo apt-get update -qq
- name: Install toolchain
run: sudo apt-get install -qy liblzma-dev gcc make pkgconf rustup
- name: install rust targets
run: rustup toolchain install nightly -t aarch64-unknown-linux-gnu -c rust-src --no-self-update
- name: build example -- glibc size-optimized
run: cd example && make clean
&& make LIBC=gnu LINK=dynamic PROFILE=size-optimized CARGO="rustup run nightly cargo" LTO=1