Update setup.py #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-Linux-x64-Clang | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
- LICENSE | |
pull_request: | |
paths-ignore: | |
- README.md | |
- LICENSE | |
workflow_dispatch: | |
jobs: | |
Linux-x64-Clang: | |
strategy: | |
matrix: | |
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Check Python version | |
run: | | |
python --version | |
- name: cache-vulkansdk | |
id: cache-vulkansdk | |
uses: actions/[email protected] | |
with: | |
path: "1.2.162.1" | |
key: vulkansdk-linux-x86_64-1.2.162.1 | |
- name: vulkansdk | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/Tohrusky/realcugan-ncnn-vulkan-build-macOS/releases/download/v0.0.1/vulkansdk-linux-x86_64-1.2.162.1.tar.gz -O vulkansdk-linux-x86_64-1.2.162.1.tar.gz | |
tar -xf vulkansdk-linux-x86_64-1.2.162.1.tar.gz | |
rm -rf 1.2.162.1/source 1.2.162.1/samples | |
find 1.2.162.1 -type f | grep -v -E 'vulkan|glslang' | xargs rm | |
- name: build | |
env: | |
CC: clang | |
CXX: clang++ | |
run: | | |
export VULKAN_SDK=`pwd`/1.2.162.1/x86_64 | |
cd src | |
mkdir build && cd build | |
cmake -DOpenMP_CXX_FLAGS="-fexceptions -frtti" .. | |
cmake --build . -j 4 | |
- name: Test | |
run: | | |
pip install --upgrade pip chardet | |
pip install -r requirements.txt | |
cp src/waifu2x_ncnn_vulkan.py test | |
cp src/build/waifu2x_ncnn_vulkan_wrapper.*.so test | |
cp -r models test | |
cd test | |
ls | |
python -m pytest | |
- name: Upload dist | |
run: | | |
mkdir dist | |
cp src/build/waifu2x_ncnn_vulkan_wrapper.*.so dist | |
cp src/waifu2x_ncnn_vulkan.py dist | |
cp -r models dist | |
- name: upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: waifu2x-ncnn-linux-x64-clang-python${{ matrix.python-version }} | |
path: dist |