Skip to content

[CI] Enable llvm-test-suite in post-commit on l0_gen9 #6352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 4 additions & 41 deletions .github/workflows/sycl_linux_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,14 @@ on:
build_artifact_suffix:
type: string
required: true
intel_drivers_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest"
lts_config:
lts_matrix:
type: string
required: false
default: ""
lts_cmake_extra_args:
type: string
required: false
default: ""
amdgpu_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
cuda_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
lts_ref:
type: string
required: false
Expand Down Expand Up @@ -169,38 +157,14 @@ jobs:
name: sycl_lit_${{ inputs.build_artifact_suffix }}
path: lit.tar.xz

# This job generates matrix of tests for LLVM Test Suite
resolve_matrix:
name: Resolve Test Matrix
runs-on: ubuntu-latest
outputs:
lts: ${{ steps.work.outputs.lts }}
steps:
- name: Download scripts and configs
run: |
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/generate_test_matrix.js
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/test_configs.json
wget raw.githubusercontent.com/intel/llvm/sycl/devops/dependencies.json
mv dependencies.json dependencies.sycl.json
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/dependencies.json
- id: work
uses: actions/github-script@v6
name: Generate matrix
env:
GHA_INPUTS: ${{ toJSON(inputs) }}
with:
script: |
const script = require('./generate_test_matrix.js');
script({core, process});

llvm_test_suite:
needs: [build, resolve_matrix]
if: ${{ inputs.lts_config != '' }}
needs: build
if: ${{ inputs.lts_matrix != '' }}
strategy:
fail-fast: false
max-parallel: ${{ inputs.max_parallel }}
matrix:
include: ${{ fromJSON(needs.resolve_matrix.outputs.lts) }}
include: ${{ fromJSON(inputs.lts_matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
env: ${{ matrix.env }}
Expand Down Expand Up @@ -241,4 +205,3 @@ jobs:
check_sycl_all: ${{ matrix.check_sycl_all }}
results_name_suffix: ${{ matrix.config }}_${{ inputs.build_artifact_suffix }}
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'

10 changes: 9 additions & 1 deletion .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@ on:
- .github/workflows/sycl_post_commit.yml

jobs:
# This job generates matrix of tests for LLVM Test Suite
resolve_matrix:
name: Resolve Test Matrix
uses: ./.github/workflows/sycl_resolve_test_matrix.yml
with:
lts_config: "l0_gen9"
linux_default:
name: Linux Default
needs: resolve_matrix
uses: ./.github/workflows/sycl_linux_build_and_test.yml
with:
build_cache_root: "/__w/llvm"
build_artifact_suffix: default
build_artifact_suffix: "post_commit"
lts_matrix: ${{ needs.resolve_matrix.outputs.lts_matrix }}
linux_no_assert:
name: Linux (no assert)
uses: ./.github/workflows/sycl_linux_build_and_test.yml
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/sycl_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,23 @@ jobs:
- name: Run clang-format
uses: ./devops/actions/clang-format

# This job generates matrix of tests for LLVM Test Suite
resolve_matrix:
name: Resolve Test Matrix
uses: ./.github/workflows/sycl_resolve_test_matrix.yml
with:
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda"

linux_default:
name: Linux
# Only build and test patches, that have passed all linter checks, because
# the next commit is likely to be a follow-up on that job.
needs: lint
needs: [lint, resolve_matrix]
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
uses: ./.github/workflows/sycl_linux_build_and_test.yml
with:
build_cache_root: "/__w/"
build_cache_size: "8G"
build_artifact_suffix: "default"
build_cache_suffix: "default"
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda"
lts_matrix: ${{ needs.resolve_matrix.outputs.lts_matrix }}
49 changes: 49 additions & 0 deletions .github/workflows/sycl_resolve_test_matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Reusable test matrix generation

on:
workflow_call:
inputs:
intel_drivers_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest"
amdgpu_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
cuda_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
lts_config:
type: string
required: true
default: ""
outputs:
lts_matrix:
description: "Generated Matrix"
value: ${{ jobs.resolve_matrix.outputs.lts_matrix }}
jobs:
resolve_matrix:
name: Resolve Test Matrix
runs-on: ubuntu-latest
outputs:
lts_matrix: ${{ steps.work.outputs.lts_matrix }}
steps:
- name: Download scripts and configs
shell: bash
run: |
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/generate_test_matrix.js
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/test_configs.json
wget raw.githubusercontent.com/intel/llvm/sycl/devops/dependencies.json
mv dependencies.json dependencies.sycl.json
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/dependencies.json
- id: work
uses: actions/github-script@v6
name: Generate matrix
env:
GHA_INPUTS: ${{ toJSON(inputs) }}
with:
script: |
const script = require('./generate_test_matrix.js');
script({core, process});
2 changes: 1 addition & 1 deletion .github/workflows/sycl_windows_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
name: Build
name: Build + LIT
runs-on: [Windows, build]
# TODO use cached checkout
steps:
Expand Down
2 changes: 1 addition & 1 deletion devops/scripts/generate_test_matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = ({core, process}) => {
"ghcr.io/intel/llvm/ubuntu2004_base:latest");
}

core.setOutput('lts', ltsString);
core.setOutput('lts_matrix', ltsString);
}
});
}