Skip to content

Commit

Permalink
Merge pull request #97 from PKU-DAIR/tung
Browse files Browse the repository at this point in the history
add tests for all platforms
  • Loading branch information
Elubrazione authored Sep 6, 2024
2 parents 066f62e + 25246db commit 41d4223
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,50 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "windows-latest" ] # todo support macos test
os: [ "macos-latest", "ubuntu-latest", "windows-latest" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Homebrew for MacOs
if: matrix.os == 'macos-latest'
run: |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install autoconf
brew install automake
brew install libomp
- name: Get resource of SWIG for MacOs
if: matrix.os == 'macos-latest'
run: |
pip install --upgrade pip setuptools wheel
curl -L -o swig-3.0.12.tar.gz https://github.com/swig/swig/archive/refs/tags/v3.0.12.tar.gz
tar -xzf swig-3.0.12.tar.gz
curl -L -o pcre-8.44.tar.bz2 https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.bz2/download
mv pcre-8.44.tar.bz2 pcre-8.44.tar
mv pcre-8.44.tar swig-3.0.12/
- name: Install SWIG for MacOs
if: matrix.os == 'macos-latest'
run: |
cd ./swig-3.0.12/
./Tools/pcre-build.sh
./autogen.sh
./configure
make
sudo make install
cd ..
rm -r ./swig-3.0.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install ".${{ env.test-requires }}"
- name: Uninstall package openbox for MacOs
if: matrix.os == 'macos-latest'
run: |
pip uninstall -y openbox
- name: Run tests
run: |
pytest ${{ env.pytest-args }} ${{ env.test-dir }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs/
test/.ipynb_checkpoints/

# Code coverage files
.coverage
.coverage*
coverage.xml
test/datas

Expand Down
2 changes: 1 addition & 1 deletion requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ matplotlib
pandas
numpy>=1.7.1
scipy>=0.18.1,<=1.10.1
scikit-learn>=0.21.3,<=1.1.3
scikit-learn>=0.21.3,<=1.5.1
scikit-optimize>=0.9
ConfigSpace>=0.4.20,<=0.6.1
emcee
Expand Down

0 comments on commit 41d4223

Please sign in to comment.