55 pull_request :
66 branches :
77 - master
8+ # run on push events to the master branch
9+ push :
10+ branches :
11+ - master
812 # run every day of the week at 02:00
913 schedule :
1014 - cron : 0 2 * * *
@@ -16,15 +20,15 @@ jobs:
1620 strategy :
1721 # max-parallel: 4
1822 matrix :
19- python-version : [3.9 .x]
23+ python-version : [3.13 .x]
2024 # https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners
21- os : [ubuntu-20.04 , windows-2019 , macos-10.15] # TODO upgrade to macos-11.0 when available on GH Actions CI
25+ os : [ubuntu-latest , windows-latest , macos-latest]
2226
2327 steps :
24- - uses : actions/checkout@v2
28+ - uses : actions/checkout@v4
2529
2630 - name : Set up Python ${{ matrix.python-version }} for PR
27- uses : actions/setup-python@v2
31+ uses : actions/setup-python@v5
2832 with :
2933 python-version : ${{ matrix.python-version }}
3034
@@ -56,17 +60,35 @@ jobs:
5660
5761 - name : Install dependencies
5862 run : |
59- python -m pip install -r requirements.txt
60- python setup.py configure
63+ python -m pip install setuptools wheel
64+
65+ - name : Setup venv and build htmcore (Linux & macOS)
66+ if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
67+ run : |
68+ python -m venv .venv
69+ source .venv/bin/activate
70+ python htm_install.py
71+
72+ - name : Setup venv and build htmcore (Windows)
73+ if : matrix.os == 'windows-latest'
74+ run : |
75+ python -m venv .venv
76+ .venv\Scripts\python.exe htm_install.py
6177
62- - name : build htmcore with setup.py
63- run : python setup.py install --user --force
78+ - name : C++ & Python Tests (Linux & macOS)
79+ if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
80+ run : |
81+ source .venv/bin/activate
82+ python htm_test.py
6483
65- - name : C++ & Python Tests
66- run : python setup.py test
84+ - name : C++ & Python Tests (Windows)
85+ if : matrix.os == 'windows-latest'
86+ run : |
87+ .venv\Scripts\activate.bat
88+ .venv\Scripts\python.exe htm_test.py
6789
6890 - name : Memory leaks check (valgrind)
69- if : matrix.os == 'ubuntu-20.04 '
91+ if : matrix.os == 'ubuntu-latest '
7092 run : |
7193 sudo apt-get -y install valgrind
7294 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
@@ -78,36 +100,10 @@ jobs:
78100 run : ./build/Release/bin/napi_hello 1000 || exit 3
79101
80102 - name : Hello example (dynamically linked)
81- if : matrix.os == 'ubuntu-20.04 '
103+ if : matrix.os == 'ubuntu-latest '
82104 run : LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/build/Release/lib ./build/Release/bin/dynamic_hello 1000 || exit 4
83105
84- - uses : actions/upload-artifact@v2
106+ - uses : actions/upload-artifact@v4
85107 with :
86- name : " pr_build"
87- path : build/Release/distr/dist
88-
89-
90-
91- build-debug :
92- name : Build and test in Debug mode
93- # currently cannot run on Linux & Debug due to a bug in YAML parser: issue #218
94- runs-on : macOS-latest
95- steps :
96- - uses : actions/checkout@v2
97-
98- - name : Install dependencies (Debug)
99- run : |
100- mkdir -p build/scripts
101- cd build/scripts
102- cmake ../.. -DCMAKE_BUILD_TYPE=Debug
103-
104- - name : Debug build
105- run : |
106- cd build/scripts
107- make -j2 && make install
108-
109- - name : C++ Tests
110- run : |
111- cd build/scripts
112- ../Debug/bin/unit_tests
113-
108+ name : htm-core-${{ matrix.os }}-py-${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.sha }}
109+ path : dist/*.whl
0 commit comments