Skip to content

Commit 7bb7ad5

Browse files
test: adds github action
1 parent 0e30bfa commit 7bb7ad5

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.github/workflows/build_wheel.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
env:
8+
CIBW_SKIP: cp27-* cp33-* cp34-* cp35-* pp27* pp36* pp37*
9+
10+
jobs:
11+
build_wheels:
12+
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-20.04, windows-2019, macos-latest]
17+
arch: [auto]
18+
include:
19+
- os: ubuntu-20.04
20+
arch: aarch64
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Set up QEMU
26+
if: ${{ matrix.arch == 'aarch64' }}
27+
uses: docker/setup-qemu-action@v1
28+
29+
- name: Build wheels
30+
uses: joerick/cibuildwheel@v1.10.0
31+
# to supply options, put them in 'env', like:
32+
env:
33+
CIBW_ARCHS_LINUX: ${{matrix.arch}}
34+
CIBW_BEFORE_BUILD: pip install oldest-supported-numpy
35+
36+
- uses: actions/upload-artifact@v2
37+
with:
38+
path: ./wheelhouse/*.whl

automated_test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import pytest
2+
3+
import mmap
4+
import os
5+
import random
6+
27
import numpy as np
8+
39
from mapbuffer import MapBuffer, HEADER_LENGTH
4-
import random
5-
import mmap
610

711
@pytest.mark.parametrize("compress", (None, "gzip", "br", "zstd", "lzma"))
812
def test_empty(compress):
@@ -68,6 +72,8 @@ def test_mmap_access(compress):
6872
assert mb[1] == b"hello"
6973
assert mb[2] == b"world"
7074

75+
os.remove("test_mmap.mb")
76+
7177
@pytest.mark.parametrize("compress", (None, "gzip", "br", "zstd"))
7278
def test_object_access(compress):
7379
data = {

0 commit comments

Comments
 (0)