File tree Expand file tree Collapse file tree 3 files changed +61
-5
lines changed Expand file tree Collapse file tree 3 files changed +61
-5
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+ branches :
8+ - master
9+ pull_request :
10+ branches :
11+ - master
12+
13+ concurrency :
14+ group : build-${{ github.head_ref }}
15+
16+ jobs :
17+ build :
18+ name : Build wheels and source distribution
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - uses : actions/checkout@v3
23+
24+ - name : Install build dependencies
25+ run : python -m pip install --upgrade build
26+
27+ - name : Build
28+ run : python -m build
29+
30+ - uses : actions/upload-artifact@v3
31+ with :
32+ name : artifacts
33+ path : dist/*
34+ if-no-files-found : error
35+
36+ publish :
37+ name : Publish release
38+ needs :
39+ - build
40+ runs-on : ubuntu-latest
41+
42+ steps :
43+ - uses : actions/download-artifact@v3
44+ with :
45+ name : artifacts
46+ path : dist
47+
48+ - name : Push build artifacts to PyPI
49+ uses : pypa/gh-action-pypi-publish@v1.5.1
50+ with :
51+ skip_existing : true
52+ user : __token__
53+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ test.py
1010.vscode /
1111vgcore. *
1212.venv /
13- _pointers.cpython *
13+ _pointers.cpython *
14+ * .egg-info /
15+ wheelhouse /
Original file line number Diff line number Diff line change 44)
55from pointers ._cstd import DivT
66
7- # pytest breaks c pointers for whatever reason
87
98def test_bindings ():
109 assert type (localeconv ()) is StructPointer
@@ -16,14 +15,16 @@ def test_bindings():
1615 assert r == 4
1716 assert type (r ) is int
1817
18+
1919def test_to_c_ptr ():
20- a = to_c_ptr (' test' )
20+ a = to_c_ptr (" test" )
2121 assert a .type is str
22- assert ~ a == 'test'
22+ assert ~ a == "test"
23+
2324
2425def test_strings ():
2526 mem = c_malloc (2 )
2627 sprintf (mem , "%s" , "a" ) # testing format strings
2728 ptr = cast (mem , bytes )
2829 assert ~ ptr == b"a"
29- c_free (mem )
30+ c_free (mem )
You can’t perform that action at this time.
0 commit comments