Skip to content

update test

update test #84

Workflow file for this run

name: kdsource
on:
- push
- pull_request
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: "Ubuntu_Latest",
os: ubuntu-latest,
python-version: 3.9,
}
- {
name: "MacOS_Latest",
os: macos-latest,
python-version: 3.9,
}
- {
name: "Windows Latest",
os: windows-latest,
python-version: 3.9,
archiver: "7z a"
}
steps:
- uses: actions/checkout@master
with:
submodules: 'true'
- name: Install and test C API on Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt-get update
sudo apt-get install cmake libxml2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/share/KDSource
make
make test
make install
cd ..
export PATH=$PATH:/usr/share/KDSource/bin
kdtool -h
kdtool resample -h
- name: Install and test C API on MacOS
if: startsWith(matrix.config.name, 'MacOS')
run: |
brew update
brew install cmake libxml2
mkdir build
cd build
mkdir /Users/runner/work/KDSource/KDinstall
cmake .. -DCMAKE_INSTALL_PREFIX=/Users/runner/work/KDSource/KDinstall
make
make test
make install
cd ..
export PATH=$PATH:/Users/runner/work/KDSource/KDinstall/bin
kdtool -h
kdtool resample -h
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Install and test C API on Windows
if: startsWith(matrix.config.name, 'Windows')
run: |
$KDDIR=$(pwd)
mkdir KDSourceINSTALL
cd KDSourceINSTALL
$INSTALLDIR=$(pwd)
cd ..
mkdir dependencies
cd dependencies
curl -L -o libxml2-2.9.3-win32-x86_64.7z http://xmlsoft.org/sources/win32/64bit/libxml2-2.9.3-win32-x86_64.7z
curl -L -o iconv-1.14-win32-x86_64.7z http://xmlsoft.org/sources/win32/64bit/iconv-1.14-win32-x86_64.7z
curl -L -o zlib-1.2.8-win32-x86_64.7z http://xmlsoft.org/sources/win32/64bit/zlib-1.2.8-win32-x86_64.7z
7z x libxml2-2.9.3-win32-x86_64.7z -o"libxml2-2.9.3-win32-x86_64" -y
7z x iconv-1.14-win32-x86_64.7z -o"iconv-1.14-win32-x86_64" -y
7z x zlib-1.2.8-win32-x86_64.7z -o"zlib-1.2.8-win32-x86_64" -y
$export PATH="$KDDIR/dependencies/libxml2-2.9.3-win32-x86_64:$PATH"
$export PATH="$KDDIR/dependencies/iconv-1.14-win32-x86_64:$PATH"
$export PATH="$KDDIR/dependencies/zlib-1.2.8-win32-x86_64:$PATH"
$export C_INCLUDE_PATH="$KDDIR/dependencies/iconv-1.14-win32-x86_64/include"
$export C_INCLUDE_PATH="$KDDIR/dependencies/libxml2-2.9.3-win32-x86_64/include"
$export C_LIB_PATH="$KDDIR/dependencies/iconv-1.14-win32-x86_64/lib"
$export C_LIB_PATH="$KDDIR/dependencies/libxml2-2.9.3-win32-x86_64/lib"
cd ..
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_PREFIX_PATH="$KDDIR\dependencies" -G "MinGW Makefiles" -DLIBXML2_INCLUDE_DIR:PATH="$KDDIR/dependencies/libxml2-2.9.3-win32-x86_64/include/libxml2" -DLIBXML2_LIBRARIES:PATH="$KDDIR/dependencies/libxml2-2.9.3-win32-x86_64/lib"
mingw32-make
mingw32-make test
mingw32-make install
cd ..
echo "$INSTALLDIR\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$INSTALLDIR\lib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$env:PATH += ";$INSTALLDIR\bin;$INSTALLDIR\lib"
kdtool-resample -h
- name: Set up Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python-version}}
- name: Install tox
run: pip install tox tox-gh-actions
- name: Test with tox
run: tox -r -c python