Skip to content

Commit

Permalink
[Github Actions] Python 3.11 build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
buffer committed Jan 9, 2024
1 parent 18979d6 commit f27bdac
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build-linux-python311.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build

on: [push, pull_request]

jobs:
build:
name: Build and test Thug on ${{ matrix.os }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
os: [ubuntu-22.04]

steps:
- name: STEP 1. Checkout repository
uses: actions/checkout@v3

- name: STEP 2. Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: STEP 3. Install dependencies
run: |
sudo apt-get install python3 python3-dev python-is-python3
sudo apt-get install build-essential clang
sudo apt-get install libboost-dev libboost-system-dev libboost-iostreams-dev libboost-python-dev systemtap-sdt-dev
sudo apt-get install libfuzzy-dev graphviz libgraphviz-dev tesseract-ocr unrar xfonts-base xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
- name: STEP 4. Install libemu
run: |
git clone https://github.com/buffer/libemu.git
cd libemu
autoreconf -v -i
./configure
sudo make install
cd -
sudo ldconfig
- name: STEP 5. Install Tox
run: |
pip3 install --upgrade pip
pip3 install tox tox-gh-actions
pip3 install appdirs
- name: STEP 6. Install Thug configuration
run: |
sudo mkdir -p /etc/thug/
sudo cp -R thug/conf/* /etc/thug/
- name: STEP 7. Setup environment
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: STEP 8. Setup ElasticSearch
uses: getong/[email protected]
with:
elasticsearch version: '8.8.0'

- name: STEP 9. Test Thug
run: |
tox
- name: STEP 10. Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ envlist = py39, py310
python =
3.9: py39
3.10: py310
3.11: py311

[stpyv8]
version =
Expand Down Expand Up @@ -46,3 +47,7 @@ setenv =
[testenv:py310]
setenv =
STPYV8_WHEEL = stpyv8-{[stpyv8]version}-cp310-cp310-manylinux_2_31_x86_64.whl

[testenv:py311]
setenv =
STPYV8_WHEEL = stpyv8-{[stpyv8]version}-cp311-cp311-manylinux_2_31_x86_64.whl

0 comments on commit f27bdac

Please sign in to comment.