Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
lots of tests
Browse files Browse the repository at this point in the history
Summary: More tests.

Reviewed By: kahne

Differential Revision: D6534850

fbshipit-source-id: 95e95f0be552e5a367c5d654c3c89ae33185ff24
  • Loading branch information
cpuhrsch authored and facebook-github-bot committed Dec 14, 2017
1 parent c9de932 commit 97fcde8
Show file tree
Hide file tree
Showing 15 changed files with 612 additions and 82 deletions.
1 change: 0 additions & 1 deletion .circleci/cmake_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
RESULTDIR=result
DATADIR=data

sudo apt-get install cmake
./.circleci/pull_data.sh
mkdir buildc && cd buildc && cmake .. && make && cd ..
cp buildc/fasttext .
Expand Down
95 changes: 68 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,65 +23,60 @@

version: 2
jobs:
"py361":
"py361-python":
docker:
- image: circleci/python:3.6.1
working_directory: ~/repo
steps:
- checkout
- run:
command: |
sudo pip install pybind11
sudo python setup.py install
. .circleci/cmake_test.sh
. .circleci/setup_circleimg.sh
. .circleci/python_test.sh
"py353":
"py353-python":
docker:
- image: circleci/python:3.5.3
working_directory: ~/repo
steps:
- checkout
- run:
command: |
sudo pip install pybind11
sudo python setup.py install
. .circleci/cmake_test.sh
. .circleci/setup_circleimg.sh
. .circleci/python_test.sh
"py346":
"py346-python":
docker:
- image: circleci/python:3.4.6
working_directory: ~/repo
steps:
- checkout
- run:
command: |
sudo pip install pybind11
sudo python setup.py install
. .circleci/cmake_test.sh
. .circleci/setup_circleimg.sh
. .circleci/python_test.sh
"py336":
"py336-python":
docker:
- image: circleci/python:3.3.6
working_directory: ~/repo
steps:
- checkout
- run:
command: |
sudo pip install pybind11
sudo python setup.py install
. .circleci/cmake_test.sh
. .circleci/setup_circleimg.sh
. .circleci/python_test.sh
"py2713":
"py2713-python":
docker:
- image: circleci/python:2.7.13
working_directory: ~/repo
steps:
- checkout
- run:
command: |
sudo pip install pybind11
sudo python setup.py install
. .circleci/cmake_test.sh
. .circleci/setup_circleimg.sh
. .circleci/python_test.sh
"gcc5":
docker:
Expand Down Expand Up @@ -123,7 +118,7 @@ jobs:
command: |
. .circleci/gcc_test.sh
"debian-wheezy":
"debian-wheezy-gcc":
docker:
- image: debian:wheezy
working_directory: ~/repo
Expand All @@ -133,8 +128,50 @@ jobs:
command: |
. .circleci/setup_debian.sh
. .circleci/gcc_test.sh
"debian-wheezy-cmake":
docker:
- image: debian:wheezy
working_directory: ~/repo
steps:
- checkout
- run:
command: |
. .circleci/setup_debian.sh
. .circleci/cmake_test.sh
"debian-jessie-gcc":
docker:
- image: debian:jessie
working_directory: ~/repo
steps:
- checkout
- run:
command: |
. .circleci/setup_debian.sh
. .circleci/gcc_test.sh
"debian-jessie-cmake":
docker:
- image: debian:jessie
working_directory: ~/repo
steps:
- checkout
- run:
command: |
. .circleci/setup_debian.sh
. .circleci/cmake_test.sh
"debian-jessie-python":
docker:
- image: debian:jessie
working_directory: ~/repo
steps:
- checkout
- run:
command: |
. .circleci/setup_debian.sh
. .circleci/python_test.sh
"website-build":
docker:
Expand All @@ -153,14 +190,18 @@ workflows:
version: 2
build:
jobs:
- "py361"
- "py353"
- "py346"
- "py336"
- "py2713"
- "py361-python"
- "py353-python"
- "py346-python"
- "py336-python"
- "py2713-python"
- "gcc5"
- "gcc6"
- "gcc7"
- "gcclatest"
- "debian-wheezy"
- "debian-wheezy-gcc"
- "debian-wheezy-cmake"
- "debian-jessie-gcc"
- "debian-jessie-cmake"
- "debian-jessie-python"
- "website-build"
12 changes: 12 additions & 0 deletions .circleci/python_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#

pip install .
python runtests.py -u
14 changes: 14 additions & 0 deletions .circleci/run_locally.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#

# This script illustrates how to run the build tests locally
# This requires docker

tail -n 15 .circleci/config.yml | sed s/.\\+\"\\\(\.\\+\\\)\"/\\1/g | xargs -P 4 -o -I {} bash -c "circleci build --job {} && (>&2 echo "{}")" > /dev/null
12 changes: 12 additions & 0 deletions .circleci/setup_circleimg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#

sudo apt-get update
sudo apt-get install -y cmake python-pip python-dev build-essential
2 changes: 1 addition & 1 deletion .circleci/setup_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
#

apt-get update
apt-get install -y vim g++ make cmake wget git
apt-get install -y vim g++ make cmake wget git python-pip python-dev build-essential
2 changes: 1 addition & 1 deletion python/fastText/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

from .test_configurations import get_supervised_models
from .test_script import gen_tests
from .test_script import gen_small_tests
from .test_script import gen_unit_tests
Loading

0 comments on commit 97fcde8

Please sign in to comment.