Skip to content

Commit 93c0d00

Browse files
committed
Build native image
1 parent 77d9bd6 commit 93c0d00

File tree

2 files changed

+45
-21
lines changed

2 files changed

+45
-21
lines changed

.github/workflows/main.yml

+44-21
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,54 @@ env:
77
ALL_TESTS: 1
88

99
jobs:
10-
test:
10+
# test:
11+
# runs-on: ubuntu-latest
12+
# strategy:
13+
# fail-fast: false
14+
# matrix:
15+
# include:
16+
# - python-version: '3.10'
17+
# toxenv: py310
18+
# - python-version: '3.11'
19+
# toxenv: py311
20+
# - python-version: '3.11'
21+
# toxenv: pillow8.x
22+
# - python-version: '3.11'
23+
# toxenv: pillow9.x
24+
# steps:
25+
# - uses: actions/checkout@v2
26+
# - name: Set up Python ${{ matrix.python-version }}
27+
# uses: actions/setup-python@v2
28+
# with:
29+
# python-version: ${{ matrix.python-version }}
30+
# - name: Install dependencies
31+
# run: |
32+
# sudo apt-get install fonts-ipafont-gothic ghostscript libjpeg8-dev libfreetype6-dev
33+
# pip install -U docutils tox
34+
# - name: Run tox
35+
# env:
36+
# TOXENV: ${{ matrix.toxenv }}
37+
# run: tox -- -v
38+
native:
1139
runs-on: ubuntu-latest
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
include:
16-
- python-version: '3.10'
17-
toxenv: py310
18-
- python-version: '3.11'
19-
toxenv: py311
20-
- python-version: '3.11'
21-
toxenv: pillow8.x
22-
- python-version: '3.11'
23-
toxenv: pillow9.x
2440
steps:
2541
- uses: actions/checkout@v2
26-
- name: Set up Python ${{ matrix.python-version }}
42+
- name: Set up Python 3.11
2743
uses: actions/setup-python@v2
2844
with:
29-
python-version: ${{ matrix.python-version }}
45+
python-version: 3.11
3046
- name: Install dependencies
3147
run: |
32-
sudo apt-get install fonts-ipafont-gothic ghostscript libjpeg8-dev libfreetype6-dev
33-
pip install -U docutils tox
34-
- name: Run tox
35-
env:
36-
TOXENV: ${{ matrix.toxenv }}
37-
run: tox -- -v
48+
sudo apt-get install fonts-ipafont-gothic ghostscript libjpeg8-dev libfreetype6-dev ccache patchelf
49+
pip install -U docutils tox nuitka
50+
pip install .
51+
- name: Build native image
52+
run: |
53+
python3 -m nuitka --include-module=blockdiag.imagedraw --include-module=blockdiag.plugins --include-module=blockdiag.utils --include-module=blockdiag.noderenderer --onefile `which blockdiag`
54+
- name: Smoke test
55+
run: |
56+
./blockdiag.bin
57+
- uses: actions/upload-artifact@v3
58+
with:
59+
name: blockdiag.bin
60+
path: ./blockdiag.bin

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ TAGS
1616
env/
1717
build/
1818
dist/
19+
venv/

0 commit comments

Comments
 (0)