use GCC on linux

This commit is contained in:
Andrew Cassidy 2021-04-07 18:42:45 -07:00
parent d5c2dfb96b
commit ca98bbb1f7

View File

@ -23,22 +23,33 @@ jobs:
# recursively checkout submodules. # recursively checkout submodules.
submodules: 'true' submodules: 'true'
lfs: 'true' lfs: 'true'
- 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: Set up Linux
if: runner.os == 'Linux'
run: |
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install flake8 ninja Pillow click nose parameterized pybind11-stubgen python -m pip install flake8 ninja Pillow click nose parameterized pybind11-stubgen
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 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: Compile and install - name: Compile and install
run: python setup.py build --debug install run: python setup.py build --debug install
- name: Test with nose - name: Test with nose
run: nosetests tests -d --with-coverage run: nosetests tests -d --with-coverage