Skip to content

Commit

Permalink
All the things!
Browse files Browse the repository at this point in the history
  • Loading branch information
Xarthisius committed Nov 11, 2020
1 parent ae94560 commit 47f3de3
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 176 deletions.
13 changes: 2 additions & 11 deletions .github/actions/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ runs:
echo python `which python`
python -c "import sys; print(sys.version)"
python -c "import os; print(os.environ)"
- name: BeforeInstall
- name: Install dependencies and yt
shell: bash
run: source ./tests/travis_before_install.sh
- name: Install
shell: bash
run: source ./tests/travis_install.sh


# - name: Install non Python deps
# if: runner.os == 'Linux'
# shell: bash
# run: sudo apt-get install libhdf5-serial-dev libnetcdf-dev libproj-dev proj-data proj-bin libgeos-dev libopenmpi-dev
run: source ./tests/ci_install.sh
55 changes: 45 additions & 10 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,62 @@ env:
HOMEBREW_NO_AUTO_UPDATE: 1

jobs:
windows:
runs-on: windows-latest

build:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04]
python-version: [3.8]
minimal: [false]
answer-tests: [false]
include:
- os: ubuntu-18.04
python-version: 3.6
minimal: true
answer-tests: false
- os: ubuntu-18.04
python-version: 3.7
minimal: false
answer-tests: true

runs-on: ${{ matrix.os }}
steps:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: s-weigand/setup-conda@v1
if: matrix.os == 'windows-latest'
with:
update-conda: true
conda-channels: conda-forge
activate-conda: true
- run: conda --version
- run: which python
- uses: ./.github/actions
python-version: ${{matrix.python-version}}
- name: Show env
shell: bash
run: |
echo PATH $PATH
echo python `which python`
python -c "import sys; print(sys.version)"
- name: Install dependencies and yt
shell: bash
run: |
if [ "${{ matrix.minimal }}" == "true" ]; then
export MINIMAL=1
fi
source ./tests/ci_install.sh
- name: Run Tests
run: python -m nose -c nose_unit.cfg --traverse-namespace
run: |
if [ "${{ matrix.answer-tests }}" == "true" ] then:
export CONFIG=nose_answer.cfg
else
export CONFIG=nose_unit.cfg
fi
python -m nose -c $CONFIG --traverse-namespace
# osx:
# runs-on: macos-latest
Expand Down
87 changes: 0 additions & 87 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions appveyor.yml

This file was deleted.

28 changes: 25 additions & 3 deletions tests/travis_install.sh → tests/ci_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
set -x # Show which command is being run

echo "Travis build stage: $TRAVIS_BUILD_STAGE_NAME"
[[ -n ${RUNNER_OS} ]] && export TRAVIS_OS_NAME=${RUNNER_OS}

case ${RUNNER_OS} in
linux|Linux)
sudo apt-get install \
libhdf5-serial-dev \
libnetcdf-dev \
libproj-dev \
proj-data \
proj-bin \
libgeos-dev \
libopenmpi-dev
;;
osx|macOS)
sudo mkdir -p /usr/local/man
sudo chown -R "${USER}:admin" /usr/local/man
HOMEBREW_NO_AUTO_UPDATE=1 brew install hdf5 proj geos open-mpi netcdf ccache
;;
esac

mkdir -p $HOME/.config/yt
echo "[yt]" > $HOME/.config/yt/ytrc
echo "suppressStreamLogging = True" >> $HOME/.config/yt/ytrc
cat $HOME/.config/yt/ytrc
cp tests/matplotlibrc .

# Step 1: pre-install required packages
if [[ "${RUNNER_OS}" == "Windows" ]] && [[ $MINIMAL != 1 ]]; then
Expand All @@ -16,8 +40,6 @@ if [[ "${RUNNER_OS}" == "Windows" ]] && [[ $MINIMAL != 1 ]]; then
conda info -a
conda install --yes -c conda-forge $CYTHON $NUMPY $CARTOPY $H5PY $MATPLOTLIB $SCIPY
else
# ccache -s
# Upgrade pip and setuptools and wheel to get clean install
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade setuptools
Expand Down
50 changes: 0 additions & 50 deletions tests/travis_before_install.sh

This file was deleted.

0 comments on commit 47f3de3

Please sign in to comment.