Skip to content

Commit 491598d

Browse files
committed
Merge branch 'master_community' into connection_rm_destroyMinPermSynapses
2 parents c67f9d8 + 0bc71e1 commit 491598d

File tree

94 files changed

+4598
-1461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4598
-1461
lines changed

.github/workflows/arm.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: ARM64
2+
3+
on:
4+
# run every day of the week at 02:00
5+
schedule:
6+
- cron: 0 2 * * *
7+
8+
jobs:
9+
build-arm64-docker:
10+
name: Build for ARM64 on Docker
11+
runs-on: ubuntu-18.04
12+
if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule' # tag or schedule
13+
steps:
14+
- name: Install docker # bug in ubuntu, conflicts with docker.io
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get remove --purge -y moby-engine moby-cli
18+
sudo apt-get install -y qemu-user-static docker.io
19+
20+
- uses: actions/checkout@v2
21+
22+
- name: ARM64 build
23+
run: |
24+
sudo docker build -t htm-arm64-docker --build-arg arch=arm64 .
25+
26+
- name: Tests
27+
run: |
28+
sudo docker run htm-arm64-docker python setup.py test
29+
30+
- name: Copy files from docker
31+
run: |
32+
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
33+
ls dist

.github/workflows/build.yml

Lines changed: 0 additions & 232 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: PR
2+
3+
on:
4+
# run on pull_request events that target the master branch
5+
pull_request:
6+
branches:
7+
- master
8+
# run every day of the week at 02:00
9+
schedule:
10+
- cron: 0 2 * * *
11+
12+
jobs:
13+
build:
14+
name: Building on ${{ matrix.os }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
#max-parallel: 4
18+
matrix:
19+
python-version: [3.7]
20+
os: [ubuntu-18.04, windows-2019, macOS-latest]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Set up Python ${{ matrix.python-version }} for PR
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Versions
31+
run: |
32+
python --version
33+
cmake --version
34+
c++ --version
35+
36+
- name: Install gcc-8
37+
if: matrix.os == 'ubuntu-18.04'
38+
env:
39+
CC: gcc-8
40+
CXX: g++-8
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get -y install gcc-8 g++-8
44+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 \
45+
100 \
46+
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \
47+
--slave /usr/bin/gcov gcov /usr/bin/gcov-8 \
48+
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-8 \
49+
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-8 \
50+
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \
51+
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \
52+
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8
53+
sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-8 100
54+
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install -r requirements.txt
58+
python setup.py configure
59+
60+
- name: build htmcore with setup.py
61+
run: python setup.py install --user --force
62+
63+
- name: C++ & Python Tests
64+
run: python setup.py test
65+
66+
- name: Memory leaks check (valgrind)
67+
if: matrix.os == 'ubuntu-18.04'
68+
run: |
69+
sudo apt-get -y install valgrind
70+
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
71+
72+
- uses: actions/upload-artifact@v2
73+
with:
74+
name: "pr_build"
75+
path: build/Release/distr/dist
76+
77+
78+
79+
build-debug:
80+
name: Build and test in Debug mode
81+
#currently cannot run on Linux & Debug due to a bug in YAML parser: issue #218
82+
runs-on: macOS-latest
83+
steps:
84+
- uses: actions/checkout@v2
85+
86+
- name: Install dependencies (Debug)
87+
run: |
88+
mkdir -p build/scripts
89+
cd build/scripts
90+
cmake ../.. -DCMAKE_BUILD_TYPE=Debug
91+
92+
- name: Debug build
93+
run: |
94+
cd build/scripts
95+
make -j2 && make install
96+
97+
- name: C++ Tests
98+
run: |
99+
cd build/scripts
100+
../Debug/bin/unit_tests
101+

0 commit comments

Comments
 (0)