Skip to content

Commit

Permalink
Update GitHub Action (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkmxy committed Feb 13, 2024
1 parent dda1dce commit cd6dbb5
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 28 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}


services:
nfd:
image: ghcr.io/named-data/nfd:latest
volumes:
- ${{ github.workspace }}/tests/config:/config
- /run/nfd:/run/nfd

strategy:
fail-fast: false
matrix:
Expand All @@ -25,27 +32,20 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# - name: Setup node for the following actions
# run: |
# apt-get update && apt-get install -y software-properties-common npm
# npm install npm@latest -g && npm install n -g && n latest
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev python3-setuptools
git clone --depth=1 --recursive --branch ndn-cxx-0.8.1 https://github.com/named-data/ndn-cxx.git
cd ndn-cxx
sudo ./waf configure && sudo ./waf && sudo ./waf install && cd ..
git clone --depth=1 --recursive --branch NFD-22.12 https://github.com/named-data/NFD.git && cd NFD
sudo ./waf configure --without-libpcap --without-websocket && sudo ./waf && sudo ./waf install && cd ..
sudo ldconfig
ndnsec-key-gen test
sudo nfd start -c /usr/local/etc/ndn/nfd.conf.sample &
pip3 install ".[dev]"
- name: Run tests
run: pytest tests

29 changes: 15 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include = [

[tool.poetry.dependencies]
python = "^3.10"
python-ndn = "^0.4.1"
python-ndn = "^0.4.2"
pyyaml = "^6.0"
pendulum = "^3.0.0"
setuptools = "^69.0.0"
Expand Down
173 changes: 173 additions & 0 deletions tests/config/nfd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
general
{
}

log
{
default_level INFO
}

forwarder
{
default_hop_limit 0
}

tables
{
cs_max_packets 1
cs_policy lru
cs_unsolicited_policy drop-all
strategy_choice
{
/ /localhost/nfd/strategy/multicast
/localhost /localhost/nfd/strategy/multicast
/localhost/nfd /localhost/nfd/strategy/best-route
/ndn/broadcast /localhost/nfd/strategy/multicast
}

network_region
{
}
}

face_system
{
general
{
enable_congestion_marking yes
}

unix
{
path /run/nfd/nfd.sock
}

tcp
{
listen no
port 6363
enable_v4 no
enable_v6 no

local
{
whitelist
{
subnet 127.0.0.0/8
subnet ::1/128
}
blacklist
{
}
}
}

udp
{
listen no
port 6363
enable_v4 no
enable_v6 no

idle_timeout 600

unicast_mtu 8800

mcast yes
mcast_group 224.0.23.170
mcast_port 56363
mcast_group_v6 ff02::1234
mcast_port_v6 56363
mcast_ad_hoc no

whitelist
{
*
}
blacklist
{
}
}

ether
{

listen no

idle_timeout 600

mcast yes
mcast_group 01:00:5E:00:17:AA
mcast_ad_hoc no

whitelist
{
*
}
blacklist
{
}
}

websocket
{
listen no
port 9696
enable_v4 yes
enable_v6 yes
}


netdev_bound
{
}
}


authorizations
{
authorize
{
certfile any

privileges
{
faces
fib
cs
strategy-choice
}
}
}

rib
{
localhost_security
{
trust-anchor
{
type any
}
}

prefix_announcement_validation
{
trust-anchor
{
type any
}
}

auto_prefix_propagate
{
cost 15
timeout 10000

refresh_interval 300

base_retry_wait 50
max_retry_wait 3600
}

readvertise_nlsr no
}

0 comments on commit cd6dbb5

Please sign in to comment.