From bc47b567fbe423efc7355099f854840fdbbc3f90 Mon Sep 17 00:00:00 2001 From: Carmelo Cascone Date: Thu, 24 Mar 2022 16:40:39 -0700 Subject: [PATCH 1/3] Use GitHub Actions to verify solution Instead of Travis CI. --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3396234 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +name: CI + +on: + push: + branches: [ advanced ] + pull_request: + branches: [ advanced ] + + workflow_dispatch: + +jobs: + verify_solution: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Download deps + run: make deps + - name: Check solution + run: make check check-sr check-gtp NGSDN_TUTORIAL_SUDO=sudo From e5181a3a8f3fc41e28c613d8563ce87e3089d83f Mon Sep 17 00:00:00 2001 From: Carmelo Cascone Date: Thu, 24 Mar 2022 16:43:45 -0700 Subject: [PATCH 2/3] Update to trigger action --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3396234..a9d32ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,6 @@ on: branches: [ advanced ] pull_request: branches: [ advanced ] - workflow_dispatch: jobs: From f6da9bc9e6bdeb1994e110e8a692999437d88407 Mon Sep 17 00:00:00 2001 From: Carmelo Cascone Date: Thu, 24 Mar 2022 16:52:40 -0700 Subject: [PATCH 3/3] Do not attach stdin if missing --- util/mn-cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/mn-cmd b/util/mn-cmd index 346f201..9af5c0b 100755 --- a/util/mn-cmd +++ b/util/mn-cmd @@ -5,4 +5,7 @@ if [ -z $1 ]; then exit 1 fi -docker exec -it mininet /mininet/host-cmd $@ +# Do not attach stdin if running in an environment without (e.g., GitHub Actions) +it=$(test -t 0 && echo "-it" || echo "-t") + +docker exec $it mininet /mininet/host-cmd $@