chore: better script & ci #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: YARA Installation and Testing | |
on: [ push, pull_request ] | |
jobs: | |
test_yara: | |
runs-on: ${{ matrix.os }} | |
name: Test YARA on ${{ matrix.os }} ${{ matrix.arch }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest ] | |
arch: [ x64, arm64 ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: ${{ steps.qemu.outputs.platforms }} | |
- name: Run Installation Script | |
run: | | |
docker run --rm \ | |
-v ${{ github.workspace }}:/workspace \ | |
-w /workspace \ | |
${{ matrix.os }} \ | |
/bin/bash -c "sudo bash ./scripts/install.sh" | |
- name: Verify YARA Installation | |
run: | | |
docker run --rm \ | |
-v ${{ github.workspace }}:/workspace \ | |
-w /workspace \ | |
${{ matrix.os }} \ | |
/bin/bash -c "yara -v" |