-
Notifications
You must be signed in to change notification settings - Fork 82
46 lines (40 loc) · 1.61 KB
/
vagrant_fastclick.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
name: vagrant-up
on: [push]
jobs:
vagrant-up:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Install vagrant
run: brew install vagrant
- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Show Vagrant version
run: vagrant --version
- name: Run vagrant up
run: cd mininet/fastclick/ && vagrant up
- name: Test SSH to machine
run: cd mininet/fastclick/ && vagrant ssh -c "echo hello"
- name: List fastclick state
run: |
cd mininet/fastclick/
vagrant ssh -c "ls /home/vagrant/fastclick"
vagrant ssh -c "ls /home/vagrant/fastclick/bin"
vagrant ssh -c "ls -al /home/vagrant/fastclick/bin"
vagrant ssh -c "file /home/vagrant/fastclick/userlevel/click"
- name: Click hello world
run: cd mininet/fastclick/ && vagrant ssh -c "cd /home/vagrant/fastclick ; ./userlevel/click -e 'DriverManager(print $now);' ; exit 0" || exit 0
- name: ssh to box and launch mininet
run: |
cd mininet/fastclick/
vagrant ssh -c "sudo mn -c ; cd /vagrant && echo exit | sudo python2 switch/topology.py" 2>&1 | tee test.log
ls
vagrant ssh -c "ls"
vagrant ssh -c "ls /home/vagrant/fastclick/"
vagrant ssh -c "cat /home/vagrant/fastclick/click.log"
grep "1 packets transmitted, 1 received" test.log