Skip to content

[CI] Enable llvm-test-suite on Windows #7477

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

Closed
wants to merge 3 commits into from
Closed
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
14 changes: 9 additions & 5 deletions .github/workflows/sycl_gen_test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ on:
required: false
default: ${{ github.sha }}
outputs:
lts_matrix:
description: "Generated Matrix"
value: ${{ jobs.test_matrix.outputs.lts_matrix }}
lts_lx_matrix:
description: "Generated Linux LTS Matrix"
value: ${{ jobs.test_matrix.outputs.lts_lx_matrix }}
lts_wn_matrix:
description: "Generated Windows LTS Matrix"
value: ${{ jobs.test_matrix.outputs.lts_wn_matrix }}
cts_matrix:
description: "Generated SYCL CTS Matrix"
value: ${{ jobs.test_matrix.outputs.cts_matrix }}
lts_aws_matrix:
description: "Generated Matrix AWS subset"
description: "Generated Linux AWS Matrix"
value: ${{ jobs.test_matrix.outputs.lts_aws_matrix }}
jobs:
test_matrix:
name: Generate Test Matrix
runs-on: ubuntu-latest
outputs:
lts_matrix: ${{ steps.work.outputs.lts_matrix }}
lts_lx_matrix: ${{ steps.work.outputs.lts_lx_matrix }}
lts_wn_matrix: ${{ steps.work.outputs.lts_wn_matrix }}
cts_matrix: ${{ steps.work.outputs.cts_matrix }}
lts_aws_matrix: ${{ steps.work.outputs.lts_aws_matrix }}
steps:
Expand Down
196 changes: 100 additions & 96 deletions .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,105 +21,109 @@ jobs:
name: Generate Test Matrix
uses: ./.github/workflows/sycl_gen_test_matrix.yml
with:
lts_config: "l0_gen9"
cts_config: "cuda"
linux_default:
name: Linux Default
needs: test_matrix
uses: ./.github/workflows/sycl_linux_build_and_test.yml
secrets: inherit
with:
build_cache_root: "/__w/llvm"
build_artifact_suffix: "post_commit"
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
cts_matrix: ${{ needs.test_matrix.outputs.cts_matrix }}
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
linux_no_assert:
name: Linux (no assert)
uses: ./.github/workflows/sycl_linux_build_and_test.yml
secrets: inherit
with:
build_cache_root: "/__w/llvm"
build_cache_suffix: gcc_no_assertions
build_artifact_suffix: gcc_no_assertions
build_configure_extra_args: --no-assertions
linux_clang_shared_libs:
# TODO use nightly images when Docker containers are available
name: Linux + Clang + Shared libs
runs-on: ubuntu-20.04
if: github.repository == 'intel/llvm'
steps:
- uses: actions/checkout@v3
with:
path: src
- name: Install Ubuntu deps
run: sudo apt install -y ninja-build ccache
- name: Setup Cache
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/cache
key: build-linux-shared-libs-${{ github.sha }}
restore-keys: |
build-linux-shared-libs-
- name: Configure
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
sudo apt-get update
sudo apt-get install -y clang-15
export CC="clang-15"
export CXX="clang++-15"
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
--ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
- name: Compile
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
- name: check-llvm
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
- name: check-clang
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
- name: check-sycl
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
- name: check-llvm-spirv
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
- name: check-xptifw
if: always()
run: |
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
- name: Pack
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: sycl_linux_${{ matrix.config }}
path: llvm_sycl.tar.gz
lts_config: "win_l0_gen9"
# lts_config: "l0_gen9;win_l0_gen9"
# cts_config: "cuda"
# linux_default:
# name: Linux Default
# needs: test_matrix
# uses: ./.github/workflows/sycl_linux_build_and_test.yml
# secrets: inherit
# with:
# build_cache_root: "/__w/llvm"
# build_artifact_suffix: "post_commit"
# lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
# cts_matrix: ${{ needs.test_matrix.outputs.cts_matrix }}
# lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
# linux_no_assert:
# name: Linux (no assert)
# uses: ./.github/workflows/sycl_linux_build_and_test.yml
# secrets: inherit
# with:
# build_cache_root: "/__w/llvm"
# build_cache_suffix: gcc_no_assertions
# build_artifact_suffix: gcc_no_assertions
# build_configure_extra_args: --no-assertions
# linux_clang_shared_libs:
# # TODO use nightly images when Docker containers are available
# name: Linux + Clang + Shared libs
# runs-on: ubuntu-20.04
# if: github.repository == 'intel/llvm'
# steps:
# - uses: actions/checkout@v3
# with:
# path: src
# - name: Install Ubuntu deps
# run: sudo apt install -y ninja-build ccache
# - name: Setup Cache
# uses: actions/cache@v3
# id: cache
# with:
# path: ${{ github.workspace }}/cache
# key: build-linux-shared-libs-${{ github.sha }}
# restore-keys: |
# build-linux-shared-libs-
# - name: Configure
# run: |
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
# sudo apt-get update
# sudo apt-get install -y clang-15
# export CC="clang-15"
# export CXX="clang++-15"
# mkdir -p $GITHUB_WORKSPACE/build
# cd $GITHUB_WORKSPACE/build
# python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
# --ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
# --cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
# --cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
# - name: Compile
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
# - name: check-llvm
# if: always()
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
# - name: check-clang
# if: always()
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
# - name: check-sycl
# if: always()
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
# - name: check-llvm-spirv
# if: always()
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
# - name: check-xptifw
# if: always()
# run: |
# python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
# -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
# - name: Pack
# run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: sycl_linux_${{ matrix.config }}
# path: llvm_sycl.tar.gz

windows_default:
name: Windows
needs: test_matrix
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_windows_build_and_test.yml
with:
lts_matrix: ${{ needs.test_matrix.outputs.lts_wn_matrix }}

macos_default:
name: macOS
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_macos_build_and_test.yml
# macos_default:
# name: macOS
# if: github.repository == 'intel/llvm'
# uses: ./.github/workflows/sycl_macos_build_and_test.yml
2 changes: 1 addition & 1 deletion .github/workflows/sycl_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ jobs:
build_cache_size: "8G"
build_artifact_suffix: "default"
build_cache_suffix: "default"
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
123 changes: 96 additions & 27 deletions .github/workflows/sycl_windows_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ on:
build_ref:
type: string
required: false
lts_matrix:
type: string
required: false
default: "[]"
lts_aws_matrix:
type: string
required: false
default: "[]"
lts_cmake_extra_args:
type: string
required: false
default: ""
lts_ref:
type: string
required: false
default: 'intel'
max_parallel:
type: number
required: false
default: 4

jobs:
build:
Expand Down Expand Up @@ -50,39 +70,88 @@ jobs:
--cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=sccache"
- name: Build
id: build
# TODO replace utility installation with a single CMake target
run: |
cmake --build build --target sycl-toolchain
cmake --build build --target deploy-sycl-toolchain
cmake --build build --target utils/FileCheck/install
cmake --build build --target utils/count/install
cmake --build build --target utils/not/install
cmake --build build --target utils/lit/install
cmake --build build --target utils/llvm-lit/install
cmake --build build --target install-clang-format
cmake --build build --target install-clang-tidy
cmake --build build --target install-llvm-size
cmake --build build --target install-llvm-cov
cmake --build build --target install-llvm-profdata
cmake --build build --target install-compiler-rt
sccache --show-stats
- name: check-llvm
shell: bash
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
run: |
cmake --build build --target check-llvm
- name: check-clang
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
shell: bash
run: |
cmake --build build --target check-clang
- name: check-sycl
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
shell: bash
run: |
cmake --build build --target check-sycl
- name: check-llvm-spirv
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
shell: bash
run: |
cmake --build build --target check-llvm-spirv
- name: check-xptifw
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
shell: bash
run: |
cmake --build build --target check-xptifw
# - name: check-llvm
# shell: bash
# if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
# run: |
# cmake --build build --target check-llvm
# - name: check-clang
# if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
# shell: bash
# run: |
# cmake --build build --target check-clang
# - name: check-sycl
# if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
# shell: bash
# run: |
# cmake --build build --target check-sycl
# - name: check-llvm-spirv
# if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
# shell: bash
# run: |
# cmake --build build --target check-llvm-spirv
# - name: check-xptifw
# if: ${{ always() && !cancelled() && steps.build.outcome == 'success' }}
# shell: bash
# run: |
# cmake --build build --target check-xptifw
- name: Install
shell: bash
run: cmake --build build --target deploy-sycl-toolchain
- name: Upload toolchain
uses: actions/upload-artifact@v3
with:
name: sycl_windows_default
path: install/**/*
path: install
- name: Upload LIT
uses: actions/upload-artifact@v3
with:
name: sycl_windows_lit
path: src/llvm/utils/lit

llvm_test_suite:
needs: build
if: ${{ !failure() && inputs.lts_matrix != '[]' }}
strategy:
fail-fast: false
max-parallel: ${{ inputs.max_parallel }}
matrix:
include: ${{ fromJSON(inputs.lts_matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
env: ${{ matrix.env }}
steps:
- uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d
with:
arch: amd64
# TODO: use cached_checkout
- uses: actions/checkout@v3
with:
persist-credentials: false
path: llvm
- name: Register cleanup after job is finished
uses: ./llvm/devops/actions/cleanup
- uses: ./llvm/devops/actions/llvm_test_suite_win
name: Run LLVM Test Suite
with:
test_ref: ${{ inputs.lts_ref }}
sycl_artifact: sycl_windows_default
lit_artifact: sycl_windows_lit
check_sycl_all: ${{ matrix.check_sycl_all }}
results_name_suffix: ${{ matrix.config }}_default
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'
Loading