Skip to content

Commit

Permalink
chore: better script & ci
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Aug 15, 2024
1 parent 4d4c598 commit 155a82e
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
name: YARA Installation and Testing

on: [push, pull_request]
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]
os: [ ubuntu-latest, macos-latest ]
arch: [ x64, arm64 ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run installation script on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo bash ./scripts/install.sh
- 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 on macOS
if: matrix.os == 'macos-latest'
- name: Run Installation Script
run: |
bash ./scripts/install.sh
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
${{ matrix.os }} \
/bin/bash -c "sudo bash ./scripts/install.sh"
- name: Verify YARA installation
- name: Verify YARA Installation
run: |
yara -v
yarac -v
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
${{ matrix.os }} \
/bin/bash -c "yara -v"

0 comments on commit 155a82e

Please sign in to comment.