Skip to content

Commit

Permalink
Update Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchieMeng committed Aug 24, 2021
1 parent 50ab00e commit 28a6607
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI
on: [push, pull_request]
env:
DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
APPNAME_SHORT: rife
jobs:
windows:
runs-on: windows-latest
Expand Down Expand Up @@ -39,9 +40,8 @@ jobs:
$env:SWIG_DIR="$(pwd)\SWIG"
$env:SWIG_EXECUTABLE="$(pwd)\SWIG\swig.exe"
$env:PATH="$env:PATH;$env:SWIG_DIR"
mkdir build; cd build
cmake -A x64 ../src
cmake --build . --config Release -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build --config Release -j 2
ubuntu: # no needs to install swig for it is already there
runs-on: ubuntu-latest
Expand All @@ -65,9 +65,8 @@ jobs:
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build -j 2
ubuntu-1804: # no needs to install swig for it is already there
runs-on: ubuntu-18.04
Expand All @@ -91,9 +90,8 @@ jobs:
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build -j 2
macos:
runs-on: macos-latest
Expand Down Expand Up @@ -125,7 +123,7 @@ jobs:
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/include \
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \
../src
../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build . -j 3
# - name: build-arm64
# run: |
Expand Down
36 changes: 11 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
APPLICATION_NAME: rife-ncnn-vulkan-python
APPNAME_SHORT: rife

jobs:

Expand Down Expand Up @@ -48,17 +49,13 @@ jobs:
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build -j 2
- name: package
run: |
mkdir -p ${{ env.PACKAGENAME }}
cp README.md LICENSE ${{ env.PACKAGENAME }}
cp build/rife_ncnn_vulkan.py ${{ env.PACKAGENAME }}
cp build/rife_ncnn_vulkan_wrapper.py ${{ env.PACKAGENAME }}
cp build/_rife_ncnn_vulkan_wrapper.so ${{ env.PACKAGENAME }}
cp -r models/ ${{ env.PACKAGENAME }}
cp -r build/${{ env.APPNAME_SHORT }}_ncnn_vulkan_python/* ${{ env.PACKAGENAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -91,17 +88,13 @@ jobs:
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build -j 2
- name: package
run: |
mkdir -p ${{ env.PACKAGENAME }}
cp README.md LICENSE ${{ env.PACKAGENAME }}
cp build/rife_ncnn_vulkan.py ${{ env.PACKAGENAME }}
cp build/rife_ncnn_vulkan_wrapper.py ${{ env.PACKAGENAME }}
cp build/_rife_ncnn_vulkan_wrapper.so ${{ env.PACKAGENAME }}
cp -r models/ ${{ env.PACKAGENAME }}
cp -r build/${{ env.APPNAME_SHORT }}_ncnn_vulkan_python/* ${{ env.PACKAGENAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -225,10 +218,7 @@ jobs:
run: |
mkdir -p ${{ env.PACKAGENAME }}
cp README.md LICENSE ${{ env.PACKAGENAME }}
cp build-x86_64/rife_ncnn_vulkan.py ${{ env.PACKAGENAME }}
cp build-x86_64/rife_ncnn_vulkan_wrapper.py ${{ env.PACKAGENAME }}
cp build-x86_64/_rife_ncnn_vulkan_wrapper.so ${{ env.PACKAGENAME }}
cp -r models/ ${{ env.PACKAGENAME }}
cp -r build-x86_64/${{ env.APPNAME_SHORT }}_ncnn_vulkan_python/* ${{ env.PACKAGENAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -275,20 +265,16 @@ jobs:
$env:SWIG_DIR="$(pwd)\SWIG"
$env:SWIG_EXECUTABLE="$(pwd)\SWIG\swig.exe"
$env:PATH="$env:PATH;$env:SWIG_DIR"
mkdir build; cd build
cmake -A x64 ../src
cmake --build . --config Release -j 2
cmake -A x64 -B build ../${{ env.APPNAME_SHORT }}_ncnn_vulkan_python
cmake --build build --config Release -j 2
- name: package
run: |
mkdir ${{ env.PACKAGENAME }}
ls build
Copy-Item -Verbose -Path "README.md" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "LICENSE" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "src\rife_ncnn_vulkan.py" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "build\rife_ncnn_vulkan_wrapper.py" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "build\Release\_rife_ncnn_vulkan_wrapper.pyd" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "C:\windows\system32\vcomp140.dll" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Recurse -Path "models" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Recurse -Path build\${{ env.APPNAME_SHORT }}_ncnn_vulkan_python\* -Destination "${{ env.PACKAGENAME }}"
7z a -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 28a6607

Please sign in to comment.