-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions: testing against ns-3.35, ns-3.40, ns-3.41
- Loading branch information
1 parent
bc8f45c
commit 3dda2cd
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'tests' | ||
|
||
jobs: | ||
ns3_check: | ||
runs-on: ubuntu-latest | ||
name: Compatibility ns-3.35 (Ubuntu 18.04) | ||
steps: | ||
- name: ns3-compatibility-action | ||
uses: emanuelegiona/ns3-compatibility-action@v1.0.0 | ||
with: | ||
ns3_docker_img: egiona/ns3-base:u18.04-n3.35 | ||
test_script: run-tests.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'tests' | ||
|
||
jobs: | ||
ns3_check: | ||
runs-on: ubuntu-latest | ||
name: Compatibility ns-3.40 (Ubuntu 20.04) | ||
steps: | ||
- name: ns3-compatibility-action | ||
uses: emanuelegiona/ns3-compatibility-action@v1.0.0 | ||
with: | ||
ns3_docker_img: egiona/ns3-base:u20.04-n3.40 | ||
test_script: run-tests.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'tests' | ||
|
||
jobs: | ||
ns3_check: | ||
runs-on: ubuntu-latest | ||
name: Compatibility ns-3.41 (Ubuntu 22.04) | ||
steps: | ||
- name: ns3-compatibility-action | ||
uses: emanuelegiona/ns3-compatibility-action@v1.0.0 | ||
with: | ||
ns3_docker_img: egiona/ns3-base:u22.04-n3.41 | ||
test_script: run-tests.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Prepare output files | ||
OUTCOME=1 | ||
echo "${OUTCOME}" > /home/exit-code.txt | ||
echo "ext-process: Test not run" > /home/test-output.txt | ||
|
||
# Install module into ns-3 "contrib" tree using the Makefile (assumption: working directory is the same as this file) | ||
OUTCOME=1 | ||
cp -r ext-process /home/ | ||
cd /home | ||
|
||
# Update path to external process's launcher file in test file | ||
sed -i 's%^\( std::string launcherPath = \).*$%\1'"\"${NS3_DEBUG_DIR}/contrib/ext-process/launcher-py.sh\";"'%' /home/ext-process/test/ext-process-test-suite.cc | ||
|
||
# Ensure debug profile _before_ copying module | ||
export NS3_CURR_PROFILE=${NS3_DEBUG_DIR} | ||
make sync_module FILE=ext-process | ||
|
||
# Necessary to avoid killing docker parent processes (build scripts send USR1 signal in interactive shells) | ||
trap "echo Ignoring USR1" USR1 | ||
./build-debug.sh && OUTCOME=0 | ||
|
||
if [[ "$OUTCOME" -eq 1 ]]; then | ||
echo "Error: build failed" | ||
else | ||
# Run module-specific tests and retain their outputs | ||
OUTCOME=1 | ||
make test SUITE=ext-process LOG=/home/test-output && \ | ||
OUTCOME=0 | ||
|
||
if [[ "$OUTCOME" -eq 1 ]]; then | ||
echo "Error: tests failed" | ||
fi | ||
fi | ||
|
||
# Only return success if all previous commands executed correctly | ||
echo "${OUTCOME}" > /home/exit-code.txt | ||
|
||
# === No exit here === | ||
# Avoids exiting the entrypoint sub-script from GitHub action that sources this file |