-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (78 loc) · 3.22 KB
/
analyze-3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This is a basic workflow to help you get started with Actions
name: Analyze - 3
# Controls when the workflow will run
on:
workflow_run:
workflows: ["Benchmark - 3"]
branches: [main]
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
# Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed
# Required, if artifact is from a different repo
# Required, if repo is private a Personal Access Token with `repo` scope is needed
github_token: ${{secrets.GITHUB_TOKEN}}
# Required, workflow file name or ID
workflow: evaluation-3.yml
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion:
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
workflow_conclusion: success
# Optional, will use the branch
branch: main
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them in respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
name: bundle
# Optional, directory where to extract artifact. Defaults to the artifact name (see `name` input)
path: evaluation/data
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.0'
- name: Install conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: python3
- name: Install dependencies
working-directory: evaluation
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -I -r requirements.txt; fi
sudo apt install tshark -y
- name: Make dir
working-directory: evaluation
run: mkdir /tmp/ipynb && mkdir out
- name: Clean data again
working-directory: evaluation/data
run: find . -type f -name "*.pcap.csv" -exec sed -i '/8.8.8.8,88/d' {} +
- name: Analyze Data
working-directory: evaluation
run: papermill 03_Pcap.ipynb /tmp/ipynb/03_Pcap.ipynb -p ci "true"
- uses: actions/upload-artifact@master
if: always()
with:
name: output-ipynb
path: /tmp/ipynb
- uses: actions/upload-artifact@master
if: always()
with:
name: output-images
path: evaluation/out