Skip to content

Read from stdin and write to stdout #28

Read from stdin and write to stdout

Read from stdin and write to stdout #28

Workflow file for this run

name: Test
on: [push, pull_request]
env:
PYTHONFAULTHANDLER: x
ALL_TESTS: 1
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.10'
toxenv: py310
- python-version: '3.11'
toxenv: py311
- python-version: '3.11'
toxenv: pillow8.x
- python-version: '3.11'
toxenv: pillow9.x
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install fonts-ipafont-gothic ghostscript libjpeg8-dev libfreetype6-dev
pip install -U docutils tox
- name: Run tox
env:
TOXENV: ${{ matrix.toxenv }}
run: tox -- -v
native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt-get install fonts-ipafont-gothic ghostscript libjpeg8-dev libfreetype6-dev ccache patchelf
pip install -U docutils tox nuitka
pip install .[pdf]
pip install seqdiag nwdiag actdiag
- name: Build single binary image
run: |
python3 -m nuitka --nofollow-import-to=*.tests \
--nofollow-import-to=reportlab.graphics.testshapes \
--include-module=actdiag \
--include-module=nwdiag \
--include-module=seqdiag \
--include-module=packetdiag \
--include-module=rackdiag \
--include-module=reportlab.pdfgen.canvas \
--include-module=blockdiag.imagedraw \
--include-module=blockdiag.plugins \
--include-module=blockdiag.utils \
--include-module=blockdiag.noderenderer \
--onefile src/blockdiag \
--output-filename=blockdiag-bundle.bin
- uses: actions/upload-artifact@v3
with:
name: native-images-amd64
path: ./*.bin
- name: Smoke test
run: |
echo 'blockdiag { A -> B; }' | ./blockdiag-bundle.bin -Tsvg -
echo 'blockdiag { A -> B; }' | ./blockdiag-bundle.bin -Tpng -
echo 'blockdiag { A -> B; }' | ./blockdiag-bundle.bin -Tpdf -
echo 'seqdiag { A -> B [label = "call"]; A <- B [label = "return"]; }' | ./blockdiag-bundle.bin -Tsvg --module=seqdiag -
echo 'actdiag { write -> convert -> image; lane user { label = "User"; write [label = "Writing reST"]; image [label = "Get diagram IMAGE"]; }; lane actdiag { convert [label = "Convert reST to Image"]; } }' | ./blockdiag-bundle.bin -Tsvg --module=actdiag -
echo 'packetdiag { colwidth = 32; node_height = 72; 0-15: Source Port; 16-31: Destination Port; }' | ./blockdiag-bundle.bin -Tsvg --module=packetdiag -
echo 'nwdiag { network dmz { web01; web02; }; network internal { web01; web02; db01; } }' | ./blockdiag-bundle.bin -Tsvg --module=nwdiag -
echo 'rackdiag { 8U; 1: UPS [2U]; 3: DB Server; 4: Web Server; 8: L3 Switch }' | ./blockdiag-bundle.bin -Tsvg --module=rackdiag -