Merge pull request #772 from Super-Lzzx/develop #1
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: Filesystem Subsystem | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/Filesystem_Subsystem/**' | |
- '.github/workflows/system_filesystem.yml' | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/Filesystem_Subsystem/**' | |
- '.github/workflows/system_filesystem.yml' | |
jobs: | |
Filesystem_Subsystem-project-build-and-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache BCC build directory | |
id: cache-bcc | |
uses: actions/cache@v3 | |
with: | |
path: bcc | |
key: ${{ runner.os }}-bcc | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
sudo python -m pip install pyod | |
sudo python -m pip install psutil | |
sudo apt-get install -y linux-headers-$(uname -r) | |
sudo apt-get install -y python-is-python3 | |
sudo apt-get install -y bison build-essential cmake flex git libedit-dev libllvm11 llvm-11-dev libclang-11-dev zlib1g-dev libelf-dev libfl-dev python3-distutils | |
sudo ln -s /usr/lib/llvm-11 /usr/local/llvm | |
- name: Build BCC | |
if: steps.cache-bcc.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/iovisor/bcc/releases/download/v0.25.0/bcc-src-with-submodule.tar.gz | |
tar xf bcc-src-with-submodule.tar.gz | |
cd bcc/ | |
mkdir build | |
cd build/ | |
cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON_CMD=python3 .. | |
make | |
- name: Run Main | |
run: | | |
cd eBPF_Supermarket/Filesystem_Subsystem | |
sudo python3 fs.py -h | |
- name: Run Test | |
run: | | |
cd eBPF_Supermarket/Filesystem_Subsystem | |
sudo python3 fs.py -w |