CI #25
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| jobs: | |
| windows: | |
| strategy: | |
| matrix: | |
| python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: cache-vulkansdk | |
| id: cache-vulkansdk | |
| uses: actions/cache@v1 | |
| with: | |
| path: "VulkanSDK" | |
| key: VulkanSDK-1.2.162.0-Installer | |
| - name: vulkansdk | |
| if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
| run: | | |
| Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.2.162.0/windows/VulkanSDK-1.2.162.0-Installer.exe?Human=true -OutFile VulkanSDK-1.2.162.0-Installer.exe | |
| 7z x -aoa ./VulkanSDK-1.2.162.0-Installer.exe -oVulkanSDK | |
| Remove-Item .\VulkanSDK\Demos, .\VulkanSDK\Samples, .\VulkanSDK\Third-Party, .\VulkanSDK\Tools, .\VulkanSDK\Tools32, .\VulkanSDK\Bin32, .\VulkanSDK\Lib32 -Recurse | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Check Python version | |
| run: | | |
| python --version | |
| - name: Install dependencies | |
| run: | | |
| pip install build | |
| - name: Build | |
| run: | | |
| $env:VULKAN_SDK="$(pwd)\VulkanSDK" | |
| $env:CMAKE_FLAGS="-DPY_VERSION=${{ matrix.python-version }}" | |
| python -m build -w . | |
| ubuntu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libvulkan-dev glslang-dev glslang-tools | |
| pip install build | |
| - name: Build | |
| run: | | |
| python -m build -w . | |
| ubuntu-1804: | |
| strategy: | |
| matrix: | |
| python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
| runs-on: ubuntu-18.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Check Python version | |
| run: | | |
| python --version | |
| - name: cache-vulkansdk | |
| id: cache-vulkansdk | |
| uses: actions/cache@v1 | |
| with: | |
| path: "1.2.162.0" | |
| key: vulkansdk-linux-x86_64-1.2.162.0 | |
| - name: vulkansdk | |
| if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
| run: | | |
| wget https://sdk.lunarg.com/sdk/download/1.2.162.0/linux/vulkansdk-linux-x86_64-1.2.162.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.2.162.0.tar.gz | |
| tar -xf vulkansdk-linux-x86_64-1.2.162.0.tar.gz | |
| rm -rf 1.2.162.0/source 1.2.162.0/samples | |
| find 1.2.162.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm | |
| - name: Install dependencies | |
| run: | | |
| pip install build | |
| - name: Build | |
| run: | | |
| export VULKAN_SDK=`pwd`/1.2.162.0/x86_64 | |
| export CMAKE_FLAGS="-DPY_VERSION=${{ matrix.python-version }}" | |
| python -m build -w . | |
| macos: | |
| strategy: | |
| matrix: | |
| python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: cache-vulkansdk | |
| id: cache-vulkansdk | |
| uses: actions/cache@v1 | |
| with: | |
| path: "vulkansdk-macos-1.2.162.0" | |
| key: vulkansdk-macos-1.2.162.0 | |
| - name: vulkansdk | |
| if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
| run: | | |
| wget https://sdk.lunarg.com/sdk/download/1.2.162.0/mac/vulkansdk-macos-1.2.162.0.dmg?Human=true -O vulkansdk-macos-1.2.162.0.dmg | |
| hdiutil attach vulkansdk-macos-1.2.162.0.dmg | |
| cp -r /Volumes/vulkansdk-macos-1.2.162.0 . | |
| rm -rf vulkansdk-macos-1.2.162.0/Applications | |
| find vulkansdk-macos-1.2.162.0 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm | |
| hdiutil detach /Volumes/vulkansdk-macos-1.2.162.0 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Check Python version | |
| run: | | |
| python --version | |
| - name: Install dependencies | |
| run: | | |
| pip install build | |
| - name: Build | |
| run: | | |
| export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.162.0/macOS | |
| export CMAKE_FLAGS="-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 \ | |
| -DPY_VERSION=${{ matrix.python-version }}" | |
| python -m build -w . |