Skip to content

Commit

Permalink
Add github action for portability tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LRGH committed Mar 2, 2024
1 parent c590566 commit 0627f15
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/portability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Testing portability (OS and python version)

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "ubuntu-latest", "macos-latest"]
python-version: ["3.10", "pypy2.7", "pypy3.9", "graalpy-22.3"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python 2 does not have lzma by default
if: ${{ matrix.python-version == "pypy2.7" }}
run: |
python -m pip install lzma
- name: Analyze /bin/sh
run: |
python ./cpu_rec.py /bin/sh
- name: Analyze /bin/sh with LRGH's elfesteem
run: |
git clone https://github.com/LRGH/elfesteem
export PYTHONPATH=./elfesteem
python ./cpu_rec.py /bin/sh
rm -rf elfesteem
- name: Analyze /bin/sh with airbus-seclab's elfesteem
run: |
git clone https://github.com/airbus-seclab/elfesteem
export PYTHONPATH=./elfesteem
python ./cpu_rec.py /bin/sh
rm -rf elfesteem
python24:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python 2.4
run: |
cd ..
curl -O https://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz
tar xzf Python-2.4.6.tgz
cd Python-2.4.6
./configure
make
export PATH=$(pwd):$PATH
cd ../cpu_rec
python -c 'import sys;print(sys.version)'
- name: Analyze /bin/sh
run: |
python ./cpu_rec.py /bin/sh
- name: Analyze /bin/sh with LRGH's elfesteem
run: |
git clone https://github.com/LRGH/elfesteem
export PYTHONPATH=./elfesteem
python ./cpu_rec.py /bin/sh
rm -rf elfesteem
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,5 @@ and was distributed for the Atredis BlackHat 2018 challenge, under an unknown li

## Development status

[![Portability](https://github.com/airbus-seclab/cpu_rec/actions/workflows/portability.yml/badge.svg)](https://github.com/airbus-seclab/cpu_rec/actions/workflows/portability.yml)
[![Code Quality](https://img.shields.io/lgtm/grade/python/g/airbus-seclab/cpu_rec.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/airbus-seclab/cpu_rec/context:python)

0 comments on commit 0627f15

Please sign in to comment.