Velox Test #22
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: Velox Test | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repository: | |
| description: 'Velox repository' | |
| type: string | |
| required: false | |
| default: 'facebookincubator/velox' | |
| velox_commit: | |
| description: 'Velox commit SHA or branch' | |
| type: string | |
| required: false | |
| default: 'main' | |
| workflow_call: | |
| inputs: | |
| repository: | |
| type: string | |
| required: false | |
| default: 'facebookincubator/velox' | |
| velox_commit: | |
| type: string | |
| required: false | |
| default: 'main' | |
| jobs: | |
| velox-cpu: | |
| runs-on: linux-amd64-cpu-latest-1 | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| CCACHE_DIR: ${{ github.workspace }}/ccache | |
| steps: | |
| - &checkout-velox-testing | |
| name: Checkout this repository for CI scripts | |
| uses: actions/checkout@v4 | |
| with: | |
| path: velox-testing | |
| - &checkout-velox | |
| name: Checkout Velox | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ inputs.repository || github.event.inputs.repository || 'facebookincubator/velox' }} | |
| ref: ${{ inputs.velox_commit || github.event.inputs.velox_commit || 'main' }} | |
| path: velox | |
| - &get-velox-sha | |
| name: Get Velox commit SHA | |
| id: velox-sha | |
| run: | | |
| VELOX_REF="${{ inputs.velox_commit || github.event.inputs.velox_commit || 'main' }}" | |
| echo "Input ref: $VELOX_REF" | |
| if [[ "$VELOX_REF" == "main" || "$VELOX_REF" == "master" ]]; then | |
| cd velox | |
| ACTUAL_SHA=$(git rev-parse HEAD) | |
| echo "Resolved SHA for branch '$VELOX_REF': $ACTUAL_SHA" | |
| echo "VELOX_COMMIT_SHA=$ACTUAL_SHA" >> $GITHUB_ENV | |
| echo "velox_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT | |
| else | |
| echo "Using provided ref: $VELOX_REF" | |
| echo "VELOX_COMMIT_SHA=$VELOX_REF" >> $GITHUB_ENV | |
| echo "velox_sha=$VELOX_REF" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Restore Compiler Cache | |
| uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-linux-adapters-gcc-cpu | |
| - name: Building Velox for CPU | |
| run: | | |
| echo " - CUDF support: DISABLED" | |
| echo " - Target: CPU-only build" | |
| cd ${{ github.workspace }}/velox-testing/velox/scripts | |
| ./build_velox.sh --all-cuda-archs --cpu --plain | |
| - name: Stash Compiler Cache | |
| uses: apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-linux-adapters-gcc-cpu | |
| - &run-velox-tests | |
| name: Run Velox Tests | |
| run: | | |
| cd ${{ github.workspace }}/velox-testing/velox/scripts | |
| ./test_velox.sh | |
| velox-gpu: | |
| runs-on: linux-amd64-gpu-l4-latest-1 | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| CCACHE_DIR: ${{ github.workspace }}/ccache | |
| steps: | |
| - *checkout-velox-testing | |
| - *checkout-velox | |
| - *get-velox-sha | |
| - name: Restore Compiler Cache | |
| uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-linux-adapters-gcc-gpu | |
| - name: Building Velox for GPU | |
| run: | | |
| echo " - CUDF support: ENABLED" | |
| echo " - Target: GPU-accelerated build" | |
| cd ${{ github.workspace }}/velox-testing/velox/scripts | |
| ./build_velox.sh --all-cuda-archs --gpu --plain | |
| - name: Stash Compiler Cache | |
| uses: apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-linux-adapters-gcc-gpu | |
| - *run-velox-tests |