Skip to content

Commit

Permalink
Merge branch 'master' into sync
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyuan129 authored Jul 20, 2024
2 parents f1e8e04 + 2dcd229 commit 8aca78f
Show file tree
Hide file tree
Showing 35 changed files with 758 additions and 860 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Docker
on:
push:
tags:
- '*'
schedule:
# twice a month
- cron: '20 8 5,20 * *'
workflow_dispatch:

permissions:
attestations: write
packages: write
id-token: write

jobs:
ndn-python-repo:
uses: named-data/actions/.github/workflows/docker-image.yml@v1
with:
name: ndn-python-repo
target: ndn-python-repo
44 changes: 22 additions & 22 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read

jobs:
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
python-version: ['3.9', '3.10', 'pypy-3.9']
os: [ubuntu-latest]
python-version: ['3.12', 'pypy-3.10']

services:
nfd:
image: ghcr.io/named-data/nfd:latest
volumes:
- /run/nfd:/run/nfd

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- 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.0 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.02 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 pytest
pip3 install wheel
pip3 install .
python -m pip install --upgrade pip
pip3 install ".[dev]"
- name: Setup PIB and TPM
run: |
pyndnsec Init-Pib
pyndnsec New-Item /test
- name: Run tests
run: pytest
run: pytest tests
12 changes: 10 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ sphinx:
formats:
- pdf

build:
os: ubuntu-22.04
tools:
python: "3.12"

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.10-alpine AS ndn-python-repo

COPY . /repo

RUN pip install --disable-pip-version-check -e /repo[mongodb]

ENV HOME=/config
VOLUME /config
VOLUME /run/nfd

ENTRYPOINT ["/usr/local/bin/ndn-python-repo"]
CMD ["-c", "/config/repo.conf"]
17 changes: 0 additions & 17 deletions Pipfile

This file was deleted.

253 changes: 0 additions & 253 deletions Pipfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions docs/src/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ To use non-default databases, perform the following steps:

# only the chosen db's config will be read
mongodb:
'uri': 'mongodb://127.0.0.1:27017/'
'db': 'repo'
'collection': 'data'

Expand Down
Loading

0 comments on commit 8aca78f

Please sign in to comment.