@@ -33,19 +33,50 @@ jobs:
33
33
strategy :
34
34
fail-fast : false
35
35
matrix :
36
- os : [ "ubuntu-latest", "windows-latest" ] # todo support macos test
36
+ os : [ "macos-latest", " ubuntu-latest", "windows-latest" ]
37
37
python-version : [ "3.8", "3.9", "3.10", "3.11" ]
38
38
steps :
39
39
- uses : actions/checkout@v3
40
40
- name : Set up Python ${{ matrix.python-version }}
41
41
uses : actions/setup-python@v4
42
42
with :
43
43
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
44
71
- name : Install dependencies
45
72
run : |
46
73
python -m pip install --upgrade pip
47
74
pip install --upgrade wheel setuptools
48
75
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
49
80
- name : Run tests
50
81
run : |
51
82
pytest ${{ env.pytest-args }} ${{ env.test-dir }}
0 commit comments