Skip to content

Rust based glibc detector #7

Rust based glibc detector

Rust based glibc detector #7

on:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/glibc-detectors.yml
- linux-glibc-detectors/**
name: Glibc Detectors
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_LOG: info
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
CARGO_TERM_COLOR: always
jobs:
build:
name: ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { name: x86_64, target: x86_64-unknown-linux-gnu }
- { name: i686, target: i686-unknown-linux-gnu }
- { name: aarch64, target: aarch64-unknown-linux-gnu }
- { name: armv7l, target: arm-unknown-linux-gnueabi }
- { name: ppc64, target: powerpc64-unknown-linux-gnu }
- { name: ppcle64, target: powerpc64le-unknown-linux-gnu }
# - { name: s390x, target: s390x-unknown-linux-gnu }
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-07-14
targets: ${{ matrix.target }}
components: rust-src
- uses: taiki-e/install-action@v2
name: Install cargo-zigbuild
with:
tool: cargo-zigbuild@0.19.1
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.12.0
- name: Run build
run: cargo +nightly-2024-07-14 zigbuild --manifest-path linux-glibc-detectors/Cargo.toml -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.target }} --release
- name: Move binary
run: mv linux-glibc-detectors/target/${{ matrix.target }}/release/linux-glibc-detector linux-glibc-detector-${{ matrix.name }}
- uses: actions/upload-artifact@v4
with:
name: linux-glibc-detector-${{ matrix.name }}
path: linux-glibc-detector-${{ matrix.name }}