-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Github Actions] Python 3.11 build workflow
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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