Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cornac
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arthur Batel
cornac
Commits
8e21fb63
Unverified
Commit
8e21fb63
authored
3 years ago
by
Quoc-Tuan Truong
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Test all platforms on master branch (#422)
parent
1fdee503
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/python-package.yml
+13
-4
13 additions, 4 deletions
.github/workflows/python-package.yml
.github/workflows/python-publish.yml
+6
-8
6 additions, 8 deletions
.github/workflows/python-publish.yml
setup.py
+4
-4
4 additions, 4 deletions
setup.py
with
23 additions
and
16 deletions
.github/workflows/python-package.yml
+
13
−
4
View file @
8e21fb63
...
@@ -11,33 +11,42 @@ on:
...
@@ -11,33 +11,42 @@ on:
jobs
:
jobs
:
build
:
build
:
name
:
Building on ${{ matrix.os }}
runs-on
:
ubuntu-18.04
runs-on
:
${{ matrix.os }}
strategy
:
strategy
:
fail-fast
:
false
fail-fast
:
false
matrix
:
matrix
:
os
:
[
ubuntu-18.04
,
macos-latest
,
windows-latest
]
python-version
:
[
3.6
,
3.7
,
3.8
,
3.9
]
python-version
:
[
3.6
,
3.7
,
3.8
,
3.9
]
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
uses
:
actions/setup-python@v2
with
:
with
:
python-version
:
${{ matrix.python-version }}
python-version
:
${{ matrix.python-version }}
-
name
:
Brew unlink gcc@9 to avoid build error with OpenMP on MacOS
if
:
matrix.os == 'macos-latest'
run
:
brew unlink gcc@9
-
name
:
Display Python version
-
name
:
Display Python version
run
:
python -c "import sys; print(sys.version)"
run
:
python -c "import sys; print(sys.version)"
-
name
:
Install dependencies
-
name
:
Install dependencies
run
:
|
run
:
|
python -m pip install --upgrade pip
python -m pip install --upgrade pip
python -m pip install --only-binary=numpy,scipy numpy~=1.19.0 scipy Cython pytest pytest-cov
codecov
flake8
python -m pip install --only-binary=numpy,scipy numpy~=1.19.0 scipy Cython pytest pytest-cov flake8
python -m pip install -e .[tests]
python -m pip install -e .[tests]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-
name
:
Lint with flake8
-
name
:
Lint with flake8
run
:
|
run
:
|
# stop the build if there are Python syntax errors or undefined names
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
-
name
:
Test with pytest
-
name
:
Test with pytest
run
:
|
run
:
|
python -m pytest --cov=cornac
python -m pytest --cov=cornac
This diff is collapsed.
Click to expand it.
.github/workflows/python-publish.yml
+
6
−
8
View file @
8e21fb63
...
@@ -17,6 +17,7 @@ jobs:
...
@@ -17,6 +17,7 @@ jobs:
name
:
Building on ${{ matrix.os }}
name
:
Building on ${{ matrix.os }}
runs-on
:
${{ matrix.os }}
runs-on
:
${{ matrix.os }}
strategy
:
strategy
:
fail-fast
:
false
matrix
:
matrix
:
os
:
[
ubuntu-18.04
,
macos-latest
,
windows-latest
]
os
:
[
ubuntu-18.04
,
macos-latest
,
windows-latest
]
python-version
:
[
3.6
,
3.7
,
3.8
,
3.9
]
python-version
:
[
3.6
,
3.7
,
3.8
,
3.9
]
...
@@ -28,17 +29,14 @@ jobs:
...
@@ -28,17 +29,14 @@ jobs:
uses
:
actions/setup-python@v2
uses
:
actions/setup-python@v2
with
:
with
:
python-version
:
${{ matrix.python-version }}
python-version
:
${{ matrix.python-version }}
-
name
:
Brew unlink gcc@9 to avoid build error with OpenMP on MacOS
if
:
matrix.os == 'macos-latest'
run
:
brew unlink gcc@9
-
name
:
Display Python version
-
name
:
Display Python version
run
:
python -c "import sys; print(sys.version)"
run
:
python -c "import sys; print(sys.version)"
-
name
:
Install GCC with OpenMP support for MacOS
if
:
matrix.os == 'macos-latest'
run
:
|
brew reinstall gcc@9
brew unlink gcc
brew link gcc
-
name
:
Install dependencies
-
name
:
Install dependencies
run
:
|
run
:
|
python -m pip install --upgrade pip
python -m pip install --upgrade pip
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
4
View file @
8e21fb63
...
@@ -97,8 +97,8 @@ else:
...
@@ -97,8 +97,8 @@ else:
os
.
environ
[
"
CC
"
]
=
gcc
os
.
environ
[
"
CC
"
]
=
gcc
os
.
environ
[
"
CXX
"
]
=
gcc
os
.
environ
[
"
CXX
"
]
=
gcc
else
:
else
:
USE_OPENMP
=
False
USE_OPENMP
=
False
print
(
"
No GCC available. Install gcc from Homebrew
"
"
using brew install gcc.
"
)
print
(
"
No GCC available. Install gcc from Homebrew using brew install gcc.
"
)
# required arguments for default gcc of OSX
# required arguments for default gcc of OSX
compile_args
.
extend
([
"
-O2
"
,
"
-stdlib=libc++
"
,
"
-mmacosx-version-min=10.7
"
])
compile_args
.
extend
([
"
-O2
"
,
"
-stdlib=libc++
"
,
"
-mmacosx-version-min=10.7
"
])
link_args
.
extend
([
"
-O2
"
,
"
-stdlib=libc++
"
,
"
-mmacosx-version-min=10.7
"
])
link_args
.
extend
([
"
-O2
"
,
"
-stdlib=libc++
"
,
"
-mmacosx-version-min=10.7
"
])
...
@@ -305,7 +305,7 @@ setup(
...
@@ -305,7 +305,7 @@ setup(
extras_require
=
{
"
tests
"
:
[
"
pytest
"
,
"
pytest-pep8
"
,
"
pytest-xdist
"
,
"
pytest-cov
"
]},
extras_require
=
{
"
tests
"
:
[
"
pytest
"
,
"
pytest-pep8
"
,
"
pytest-xdist
"
,
"
pytest-cov
"
]},
cmdclass
=
cmdclass
,
cmdclass
=
cmdclass
,
packages
=
find_packages
(),
packages
=
find_packages
(),
classifiers
=
(
classifiers
=
[
"
Development Status :: 5 - Production/Stable
"
,
"
Development Status :: 5 - Production/Stable
"
,
"
Intended Audience :: Science/Research
"
,
"
Intended Audience :: Science/Research
"
,
"
Intended Audience :: Education
"
,
"
Intended Audience :: Education
"
,
...
@@ -318,5 +318,5 @@ setup(
...
@@ -318,5 +318,5 @@ setup(
"
License :: OSI Approved :: Apache Software License
"
,
"
License :: OSI Approved :: Apache Software License
"
,
"
Topic :: Software Development
"
,
"
Topic :: Software Development
"
,
"
Topic :: Scientific/Engineering
"
,
"
Topic :: Scientific/Engineering
"
,
)
,
]
,
)
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment