add more nuke versions to build strategy #14
Workflow file for this run
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: Build plugins | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '*' | |
| pull_request: | |
| env: | |
| image: ghcr.io/mateuszwojt/nukedockerbuild | |
| OIDN_VERSION: "2.3.3" | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| nuke_version: ["14.0", "14.1", "15.0", "15.1", "15.2", "16.0"] | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download and Install OpenImageDenoise | |
| run: | | |
| wget https://github.com/RenderKit/oidn/releases/download/v${{ env.OIDN_VERSION }}/oidn-${{ env.OIDN_VERSION }}.x86_64.linux.tar.gz | |
| tar -xzf oidn-${{ env.OIDN_VERSION }}.x86_64.linux.tar.gz -C ${{ github.workspace }} | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull image | |
| run: docker pull ${{ env.image }}:${{ matrix.nuke_version }}-linux | |
| - name: Run build | |
| run: | | |
| docker run --rm -v "${{ github.workspace }}:/nuke_build_directory" ${{ env.image }}:${{ matrix.nuke_version }}-linux bash -c "cmake3 . -DOIDN_ROOT=/nuke_build_directory/oidn-${{ env.OIDN_VERSION }}.x86_64.linux -B build && cmake3 --build build" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.nuke_version }} | |
| path: ${{ github.workspace }}/build/lib | |
| # build-macos: | |
| # runs-on: macos-latest | |
| # strategy: | |
| # matrix: | |
| # nuke_version: ["14.0", "14.1", "15.0"] | |
| # fail-fast: true | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Set up Docker and OpenImageDenoise | |
| # run: | | |
| # brew install docker | |
| # curl -L -o oidn.tar.gz https://github.com/RenderKit/oidn/releases/download/v${{ env.OIDN_VERSION }}/oidn-${{ env.OIDN_VERSION }}.x86_64.macos.tar.gz | |
| # tar -xzf oidn.tar.gz -C ${{ github.workspace }} | |
| # colima start --cpu 2 --memory 10 --disk 10 | |
| # - name: Pull image | |
| # run: docker pull ${{ env.image }}:${{ matrix.nuke_version }}-macos-latest | |
| # - name: Run build | |
| # run: | | |
| # docker run --rm -v "${{ github.workspace }}:/nuke_build_directory" ${{ env.image }}:${{ matrix.nuke_version }}-macos-latest bash -c "cmake . -DOIDN_ROOT=/nuke_build_directory/oidn-${{ env.OIDN_VERSION }}.x86_64.macos -B build && cmake --build build" | |
| # - uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: macos-${{ matrix.nuke_version }} | |
| # path: ${{ github.workspace }}/build/lib | |
| # build-macos-arm: | |
| # runs-on: macos-latest | |
| # strategy: | |
| # matrix: | |
| # nuke_version: ["15.0"] | |
| # fail-fast: true | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Set up Docker and OpenImageDenoise | |
| # run: | | |
| # brew install docker | |
| # curl -L -o oidn.tar.gz https://github.com/RenderKit/oidn/releases/download/v${{ env.OIDN_VERSION }}/oidn-${{ env.OIDN_VERSION }}.arm64.macos.tar.gz | |
| # tar -xzf oidn.tar.gz -C ${{ github.workspace }} | |
| # colima start --cpu 2 --memory 10 --disk 10 | |
| # - name: Pull image | |
| # run: docker pull ${{ env.image }}:${{ matrix.nuke_version }}-macos-arm-latest | |
| # - name: Run build | |
| # run: | | |
| # docker run --rm -v "${{ github.workspace }}:/nuke_build_directory" ${{ env.image }}:${{ matrix.nuke_version }}-macos-arm-latest bash -c "cmake . -DOIDN_ROOT=/nuke_build_directory/oidn-${{ env.OIDN_VERSION }}.arm64.macos -B build && cmake --build build" | |
| # - uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: macos_arm-${{ matrix.nuke_version }} | |
| # path: ${{ github.workspace }}/build/lib | |
| build-windows: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| nuke_version: ["14.0", "14.1", "15.0", "15.1", "15.2", "16.0"] | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download OpenImageDenoise | |
| run: | | |
| wget https://github.com/RenderKit/oidn/releases/download/v${{ env.OIDN_VERSION }}/oidn-${{ env.OIDN_VERSION }}.x64.windows.zip | |
| unzip oidn-${{ env.OIDN_VERSION }}.x64.windows.zip | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull image | |
| run: docker pull ${{ env.image }}:${{ matrix.nuke_version }}-windows | |
| - name: Run build | |
| run: | | |
| OIDN_DIR="oidn-${{ env.OIDN_VERSION }}.x64.windows" | |
| docker run --rm -v "${{ github.workspace }}:/nuke_build_directory" ${{ env.image }}:${{ matrix.nuke_version }}-windows bash -c "cmake . -G Ninja -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/nukedockerbuild/toolchain.cmake -DOIDN_ROOT=/nuke_build_directory/$OIDN_DIR -B build && cmake --build build --config Release" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-${{ matrix.nuke_version }} | |
| path: ${{ github.workspace }}/build/lib | |
| create-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-windows] | |
| permissions: write-all | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| release_file_name: ${{ github.event.repository.name }}_${{ github.ref_name }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Collect files and put them in release folder structure | |
| run: | | |
| mkdir /tmp/${{ github.event.repository.name }} | |
| for artifact in ${{ github.workspace }}/*; do | |
| if [ -d "$artifact" ]; then | |
| basename=$(basename -- $artifact) | |
| os=$(echo "$basename" | cut -d'-' -f1) | |
| version=$(echo "$basename" | cut -d'-' -f2) | |
| export OS="$os" | |
| export VERSION="$version" | |
| destination_dir="/tmp/${{ github.event.repository.name }}/${VERSION}/${OS}" | |
| mkdir -p "${destination_dir}" | |
| echo "${destination_dir}" | |
| for file in "$artifact"/*.dll "$artifact"/*.so "$artifact"/*.dylib; do | |
| if [ -f "${file}" ]; then | |
| cp "${file}" "${destination_dir}/" | |
| echo "Copied ${file} to ${destination_dir}/" | |
| fi | |
| done | |
| fi | |
| done | |
| - name: Prepare zip | |
| run: | | |
| cd /tmp | |
| zip -r /tmp/${{ env.release_file_name }}.zip ${{ github.event.repository.name }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release_candidate | |
| path: /tmp/${{ env.release_file_name }}.zip | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: /tmp/${{ env.release_file_name }}.zip |