Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update appveyor.yml #16

Merged
merged 2 commits into from
Sep 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ d:
env:
- ARCH="x86_64"

matrix:
include:
- {os: linux, d: ldc, env: ARCH="x86", addons: {apt: {packages: [[gcc-multilib]]}}}
- {os: linux, d: dmd, env: ARCH="x86", addons: {apt: {packages: [[gcc-multilib]]}}}

before_install:
- sudo apt-get install -qq python-numpy
- cd test && python test_npy_fileio.py && cd ..
Expand Down
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: doc test clean
.PHONY: doc test test-ldc clean


clean:
Expand All @@ -20,12 +20,17 @@ hmod:
hmod --exclude numir.old ./source
mv doc docs

test/a1_f4.npy: test/npy_test.py
test/a1_f4.npy: test/test_npy_fileio.py
cd test && python test_npy_fileio.py && cd ..

test:
dub test --build=unittest-cov --compiler=dmd
test: test/a1_f4.npy
dub test --build=unittest-cov --compiler=dmd --arch=x86
tail -n 1 source-numir*.lst
dub test --build=unittest-cov --compiler=dmd --arch=x86
tail -n 1 source-numir*.lst

test-ldc:
test-ldc: test/a1_f4.npy
dub test --build=unittest-cov --compiler=ldc2
tail -n 1 source-numir*.lst
dub test --build=unittest-cov --compiler=dmd --arch=x86
tail -n 1 source-numir*.lst
10 changes: 10 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ environment:
arch: x64
PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3
- DC: dmd
DVersion: stable
arch: x86
PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3
- DC: ldc
DVersion: stable
arch: x86
PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3

skip_tags: false
branches:
Expand Down
2 changes: 1 addition & 1 deletion source/numir/io.d
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ immutable npyfmt = "{'descr': '%s', 'fortran_order': %s, 'shape': (%s), }";
struct NpyHeaderInfo(size_t N)
{
string descr;
long[N] shape;
ptrdiff_t[N] shape;
}


Expand Down
3 changes: 2 additions & 1 deletion source/numir/random.d
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ auto permutation(T...)(T t) {
unittest {
import numir : arange;
import mir.ndslice.sorting : sort;
import numir.testing : approxEqual;
import std.stdio;
auto ps1 = permutation(100);
auto ps2 = permutation(100);
Expand All @@ -129,5 +130,5 @@ unittest {
auto ps3 = permutation(1, 10, 0.1);
auto ps4 = permutation(1, 10, 0.1);
assert(ps3 != ps4);
assert(ps4.sort() == arange(1, 10, 0.1));
assert(ps4.sort.approxEqual(arange(1, 10, 0.1)));
}