Try to fix Vagrant github actions #96
Workflow file for this run
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: 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 |