Skip to content

Commit 41d4223

Browse files
authored
Merge pull request #97 from PKU-DAIR/tung
add tests for all platforms
2 parents 066f62e + 25246db commit 41d4223

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

.github/workflows/test.yml

+32-1
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,50 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
os: [ "ubuntu-latest", "windows-latest" ] # todo support macos test
36+
os: [ "macos-latest", "ubuntu-latest", "windows-latest" ]
3737
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
3838
steps:
3939
- uses: actions/checkout@v3
4040
- name: Set up Python ${{ matrix.python-version }}
4141
uses: actions/setup-python@v4
4242
with:
4343
python-version: ${{ matrix.python-version }}
44+
- name: Install Homebrew for MacOs
45+
if: matrix.os == 'macos-latest'
46+
run: |
47+
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
48+
brew install autoconf
49+
brew install automake
50+
brew install libomp
51+
- name: Get resource of SWIG for MacOs
52+
if: matrix.os == 'macos-latest'
53+
run: |
54+
pip install --upgrade pip setuptools wheel
55+
curl -L -o swig-3.0.12.tar.gz https://github.com/swig/swig/archive/refs/tags/v3.0.12.tar.gz
56+
tar -xzf swig-3.0.12.tar.gz
57+
curl -L -o pcre-8.44.tar.bz2 https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.bz2/download
58+
mv pcre-8.44.tar.bz2 pcre-8.44.tar
59+
mv pcre-8.44.tar swig-3.0.12/
60+
- name: Install SWIG for MacOs
61+
if: matrix.os == 'macos-latest'
62+
run: |
63+
cd ./swig-3.0.12/
64+
./Tools/pcre-build.sh
65+
./autogen.sh
66+
./configure
67+
make
68+
sudo make install
69+
cd ..
70+
rm -r ./swig-3.0.12
4471
- name: Install dependencies
4572
run: |
4673
python -m pip install --upgrade pip
4774
pip install --upgrade wheel setuptools
4875
pip install ".${{ env.test-requires }}"
76+
- name: Uninstall package openbox for MacOs
77+
if: matrix.os == 'macos-latest'
78+
run: |
79+
pip uninstall -y openbox
4980
- name: Run tests
5081
run: |
5182
pytest ${{ env.pytest-args }} ${{ env.test-dir }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs/
2828
test/.ipynb_checkpoints/
2929

3030
# Code coverage files
31-
.coverage
31+
.coverage*
3232
coverage.xml
3333
test/datas
3434

requirements/main.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ matplotlib
99
pandas
1010
numpy>=1.7.1
1111
scipy>=0.18.1,<=1.10.1
12-
scikit-learn>=0.21.3,<=1.1.3
12+
scikit-learn>=0.21.3,<=1.5.1
1313
scikit-optimize>=0.9
1414
ConfigSpace>=0.4.20,<=0.6.1
1515
emcee

0 commit comments

Comments
 (0)