Skip to content

chore: add missing ssl dependency to aarch64 bindings generation #103

chore: add missing ssl dependency to aarch64 bindings generation

chore: add missing ssl dependency to aarch64 bindings generation #103

Workflow file for this run

name: bindings
on:
push:
paths:
- .github/workflows/bindings.yaml
- yara-sys/yara
- yara-sys/Cargo.toml
- yara-sys/build.rs
- yara-sys/wrapper.h
pull_request:
paths:
- .github/workflows/bindings.yaml
- yara-sys/yara
- yara-sys/Cargo.toml
- yara-sys/build.rs
- yara-sys/wrapper.h
jobs:
x86_64_bindings:
strategy:
matrix:
include:
- os: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
- os: "ubuntu-latest"
target: "x86_64-unknown-linux-musl"
- os: "windows-latest"
target: "x86_64-pc-windows-msvc"
- os: "windows-latest"
target: "x86_64-pc-windows-gnu"
- os: "macos-latest"
target: "x86_64-apple-darwin"
runs-on: ${{ matrix.os }}
steps:
# required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
if: matrix.os == 'windows-latest'
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
if: matrix.os == 'windows-latest'
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- uses: actions/checkout@v3
with:
submodules: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Generate bindings
shell: bash
run: |
cargo build --verbose --no-default-features --features vendored,bindgen
mkdir out
find . -name 'bindings.rs'
cp "$(find . -name 'bindings.rs')" "./out/yara-${{ matrix.target }}.rs"
ls out
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
path: ./out/yara-${{ matrix.target }}.rs
aarch64_bindings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Generate bindings
shell: bash
run: |
mkdir out
- uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu_latest
githubToken: ${{ github.token }}
install: |
# Install systemd dependecies
apt update -q -y
apt install -y --no-install-recommends curl ca-certificates llvm-dev libclang-dev clang libssl-dev
# Install rustup
curl --fail --proto '=https' -o /tmp/rustup-init --tlsv1.2 -sSf https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init
chmod +x /tmp/rustup-init
/tmp/rustup-init -y --target aarch64-unknown-linux-gnu --profile minimal
dockerRunArgs: |
--volume "${PWD}:/usr/src/yara/"
run: |
export PATH="$HOME/.cargo/bin:$PATH"
cd /usr/src/yara/
cargo build --verbose --no-default-features --features vendored,bindgen
find . -name 'bindings.rs'
cp "$(find . -name bindings.rs)" "./out/yara-aarch64-unknown-linux-gnu.rs"
ls ./out
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
path: ./out/yara-aarch64-unknown-linux-gnu.rs