forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #805 from htm-community/pypi_cibuildwheel
CI PyPI cibuildwheel
- Loading branch information
Showing
4 changed files
with
231 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: ARM64 | ||
|
||
on: | ||
# run every day of the week at 02:00 | ||
schedule: | ||
- cron: 0 2 * * * | ||
|
||
jobs: | ||
build-arm64-docker: | ||
name: Build for ARM64 on Docker | ||
runs-on: ubuntu-18.04 | ||
if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule' # tag or schedule | ||
steps: | ||
- name: Install docker # bug in ubuntu, conflicts with docker.io | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get remove --purge -y moby-engine moby-cli | ||
sudo apt-get install -y qemu-user-static docker.io | ||
- uses: actions/checkout@v1 | ||
|
||
- name: ARM64 build | ||
run: | | ||
sudo docker build -t htm-arm64-docker --build-arg arch=arm64 . | ||
- name: Tests | ||
run: | | ||
sudo docker run htm-arm64-docker python setup.py test | ||
- name: Copy files from docker | ||
run: | | ||
sudo docker cp `sudo docker ps -alq`:/usr/local/src/htm.core/dist dist #TODO the `command` is not 100% reliable, replace with some name/id | ||
ls dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: PR | ||
|
||
on: | ||
# run on pull_request events that target the master branch | ||
pull_request: | ||
branches: | ||
- master | ||
# run every day of the week at 02:00 | ||
schedule: | ||
- cron: 0 2 * * * | ||
|
||
jobs: | ||
build: | ||
name: Building on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
#max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
os: [ubuntu-18.04, windows-2019, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} for PR | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Versions | ||
run: | | ||
python --version | ||
cmake --version | ||
c++ --version | ||
- name: Install gcc-8 | ||
if: matrix.os == 'ubuntu-18.04' | ||
env: | ||
CC: gcc-8 | ||
CXX: g++-8 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install gcc-8 g++-8 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 \ | ||
100 \ | ||
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \ | ||
--slave /usr/bin/gcov gcov /usr/bin/gcov-8 \ | ||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-8 \ | ||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-8 \ | ||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \ | ||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \ | ||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8 | ||
sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-8 100 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements.txt | ||
python setup.py configure | ||
- name: build htmcore with setup.py | ||
run: python setup.py install --user --force | ||
|
||
- name: C++ & Python Tests | ||
run: python setup.py test | ||
|
||
- name: Memory leaks check (valgrind) | ||
if: matrix.os == 'ubuntu-18.04' | ||
run: | | ||
sudo apt-get -y install valgrind | ||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/build/Release/lib valgrind --show-leak-kinds=definite,indirect,possible,reachable --track-origins=yes --num-callers=40 --error-exitcode=3 ./build/Release/bin/hello 5 || exit 1 | ||
build-debug: | ||
name: Build and test in Debug mode | ||
#currently cannot run on Linux & Debug due to a bug in YAML parser: issue #218 | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Install dependencies (Debug) | ||
run: | | ||
echo "built type: ${CMAKE_BUILD_TYPE}" | ||
mkdir -p build/scripts | ||
cd build/scripts | ||
cmake ../.. -DCMAKE_BUILD_TYPE=Debug | ||
- name: Debug build | ||
run: | | ||
cd build/scripts | ||
make -j2 && make install | ||
- name: C++ Tests | ||
run: | | ||
cd build/scripts | ||
../Debug/bin/unit_tests | ||
Oops, something went wrong.