repo: upgrade to memory-level 2.0.0 #735
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: build | |
on: | |
push: | |
pull_request: | |
permissions: {} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.local/share/pnpm/store | |
key: build-${{ hashFiles('**/package.json') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack pnpm install | |
env: | |
PUPPETEER_SKIP_DOWNLOAD: true | |
- run: corepack pnpm build | |
- run: corepack pnpm lint | |
timeout-minutes: 30 | |
unittest: | |
strategy: | |
matrix: | |
node: [20, 22] | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.local/share/pnpm/store | |
key: unittest-${{ matrix.node }}-${{ hashFiles('**/package.json') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
echo "deb [arch=amd64 trusted=yes] https://nfd-nightly-apt.ndn.today/ubuntu jammy main" \ | |
| sudo tee /etc/apt/sources.list.d/nfd-nightly.list | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends ndnsec | |
pip install git+https://github.com/UCLA-IRL/ndn-python-repo@2dcd229a4cb81927a52e8a8f1d963c55ee939ffa | |
- run: corepack pnpm install | |
env: | |
PUPPETEER_SKIP_DOWNLOAD: true | |
- run: corepack pnpm test | |
if: ${{ matrix.node == 22 }} | |
- run: corepack pnpm cover | |
env: | |
NODE_OPTIONS: --experimental-websocket | |
if: ${{ matrix.node == 20 }} | |
- uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ matrix.node == 20 }} | |
continue-on-error: true | |
timeout-minutes: 30 | |
integ: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.local/share/pnpm/store | |
~/.cache/puppeteer | |
key: integ-${{ hashFiles('**/package.json') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
echo "deb [arch=amd64 trusted=yes] https://nfd-nightly-apt.ndn.today/ubuntu jammy main" \ | |
| sudo tee /etc/apt/sources.list.d/nfd-nightly.list | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends clang-format-15 libndn-cxx-dev libpsync-dev nfd | |
- run: corepack pnpm install | |
- run: corepack pnpm build | |
- name: Check dependencies and devDependencies | |
run: node mk/check-dep.mjs | |
- run: corepack pnpm literate lint | |
- run: corepack pnpm literate | |
- run: cd integ/browser-tests && corepack pnpm test | |
- run: cd integ/cxx-tests && corepack pnpm test | |
- name: Check C++ and bash code style | |
run: | | |
corepack pnpm clang-format | |
corepack pnpm shfmt | |
git diff --exit-code | |
timeout-minutes: 30 | |
publish: | |
needs: [build, unittest, integ] | |
if: ${{ github.repository == 'yoursunny/NDNts' && github.event_name == 'push' }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.local/share/pnpm/store | |
key: publish-${{ hashFiles('**/package.json') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack pnpm install | |
env: | |
PUPPETEER_SKIP_DOWNLOAD: true | |
- run: corepack pnpm build | |
- run: bash mk/publish-nightly.sh | |
env: | |
GTAGID: G-YSW3MP43Z4 | |
- run: | | |
corepack pnpm typedoc | |
[[ -f docs/typedoc/modules/_ndn_packet.html ]] | |
env: | |
GTAGID: G-YSW3MP43Z4 | |
- uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
repo: yoursunny/NDNts-nightly | |
build_dir: ./mk/nightly-output/ | |
commit_message: ${{ github.sha }} ${{ github.run_id }} | |
fqdn: ndnts-nightly.ndn.today | |
env: | |
GH_PAT: ${{ secrets.NIGHTLY_ACCESS_TOKEN }} | |
- uses: nwtgck/actions-netlify@v3 | |
with: | |
publish-dir: ./docs/ | |
production-deploy: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: ${{ github.sha }} ${{ github.run_id }} | |
enable-pull-request-comment: false | |
enable-commit-comment: false | |
enable-commit-status: false | |
enable-github-deployment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: 8987d2bb-7638-4d6b-adff-806fe3b7309a | |
timeout-minutes: 30 |