添加开源之夏服务器集群部署项目 (#898) #127
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: cpu_watcher | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/CPU_Subsystem/cpu_watcher/**' | |
- '.github/workflows/cpu_watcher.yml' | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/CPU_Subsystem/cpu_watcher/**' | |
- '.github/workflows/cpu_watcher.yml' | |
jobs: | |
cpu_watcher-project-build-and-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libbpf-dev clang llvm libelf-dev libpcap-dev gcc-multilib build-essential | |
git submodule update --init --recursive | |
- name: Build cpu_watcher | |
run: | | |
cd eBPF_Supermarket/CPU_Subsystem/cpu_watcher/ | |
make | |
- name: Run cpu_watcher | |
run: | | |
sudo ./eBPF_Supermarket/CPU_Subsystem/cpu_watcher/cpu_watcher | |
- name: Build test_cpuwatcher | |
run: | | |
cd eBPF_Supermarket/CPU_Subsystem/cpu_watcher/test | |
make | |
- name: Run test_cpuwatcher | |
run: | | |
./eBPF_Supermarket/CPU_Subsystem/cpu_watcher/test/test_cpuwatcher |