|
1 | | -name: CI Containers |
| 1 | +name: Create container with pre-built tests |
| 2 | + |
2 | 3 | on: |
3 | 4 | workflow_dispatch: |
4 | | - schedule: |
5 | | - # Every 1st and 15th day of month |
6 | | - - cron: '0 0 1,15 * *' |
7 | | - push: |
8 | | - branches: |
9 | | - - sycl |
10 | | - paths: |
11 | | - - 'devops/actions/build_container/**' |
12 | | - - 'devops/containers/**' |
13 | | - - 'devops/dependencies.json' |
14 | | - - 'devops/scripts/install_drivers.sh' |
15 | | - - 'devops/scripts/install_build_tools.sh' |
16 | | - - '.github/workflows/sycl-containers.yaml' |
17 | | - pull_request: |
18 | | - paths: |
19 | | - - 'devops/actions/build_container/**' |
20 | | - - 'devops/containers/**' |
21 | | - - 'devops/dependencies.json' |
22 | | - - 'devops/scripts/install_drivers.sh' |
23 | | - - 'devops/scripts/install_build_tools.sh' |
24 | | - - '.github/workflows/sycl-containers.yaml' |
| 5 | + inputs: |
| 6 | + ref: |
| 7 | + type: string |
| 8 | + description: tag/sha |
| 9 | + required: true |
| 10 | + default: nightly-2025-07-18 |
25 | 11 |
|
26 | 12 | permissions: read-all |
27 | 13 |
|
28 | 14 | jobs: |
29 | | - build_and_push_images: |
30 | | - if: github.repository == 'intel/llvm' |
31 | | - name: Build and Push Docker Images |
32 | | - runs-on: ubuntu-latest |
| 15 | + build: |
| 16 | + uses: ./.github/workflows/sycl-linux-build.yml |
| 17 | + with: |
| 18 | + build_ref: ${{ inputs.ref }} |
| 19 | + build_cache_root: "/__w/" |
| 20 | + |
| 21 | + build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" |
| 22 | + cc: clang |
| 23 | + cxx: clang++ |
| 24 | + |
| 25 | + changes: '[]' |
| 26 | + |
| 27 | + toolchain_artifact: toolchain |
| 28 | + toolchain_artifact_filename: toolchain.tar.zst |
| 29 | + e2e_binaries_artifact: e2e_bin |
| 30 | + |
| 31 | + # Couldn't make it work from inside the container, so have to use an extra job |
| 32 | + # and pass an artifact. |
| 33 | + docker: |
| 34 | + runs-on: [Linux, build] |
| 35 | + needs: build |
33 | 36 | permissions: |
34 | 37 | packages: write |
35 | | - strategy: |
36 | | - matrix: |
37 | | - include: |
38 | | - - name: Base Ubuntu 22.04 Docker image |
39 | | - file: ubuntu2204_base |
40 | | - tag: latest |
41 | | - build_args: "" |
42 | | - - name: Base Ubuntu 24.04 Docker image |
43 | | - file: ubuntu2404_base |
44 | | - tag: latest |
45 | | - build_args: "" |
46 | | - - name: Build Ubuntu 22.04 Docker image |
47 | | - file: ubuntu2204_build |
48 | | - tag: latest |
49 | | - build_args: "" |
50 | | - - name: Build Ubuntu 24.04 Docker image |
51 | | - file: ubuntu2404_build |
52 | | - tag: latest |
53 | | - build_args: "" |
54 | | - - name: Intel Drivers Ubuntu 22.04 Docker image |
55 | | - file: ubuntu2204_intel_drivers |
56 | | - tag: latest |
57 | | - build_args: "" |
58 | | - - name: Intel Drivers Ubuntu 24.04 Docker image |
59 | | - file: ubuntu2404_intel_drivers |
60 | | - tag: latest |
61 | | - build_args: "" |
62 | | - - name: Build + Intel Drivers Ubuntu 22.04 Docker image |
63 | | - file: ubuntu2204_intel_drivers |
64 | | - tag: alldeps |
65 | | - build_args: | |
66 | | - base_image=ghcr.io/intel/llvm/ubuntu2204_build |
67 | | - base_tag=latest |
68 | | - - name: Build + Intel Drivers Ubuntu 24.04 Docker image |
69 | | - file: ubuntu2404_intel_drivers |
70 | | - tag: alldeps |
71 | | - build_args: | |
72 | | - base_image=ghcr.io/intel/llvm/ubuntu2404_build |
73 | | - base_tag=latest |
| 38 | + if: always() |
74 | 39 | steps: |
75 | | - - name: Checkout |
76 | | - uses: actions/checkout@v4 |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + with: |
| 42 | + sparse-checkout: | |
| 43 | + devops/ |
| 44 | +
|
| 45 | + - uses: actions/checkout@v4 |
77 | 46 | with: |
78 | | - fetch-depth: 2 |
79 | | - - name: Build and Push Container |
| 47 | + ref: ${{ inputs.ref }} |
| 48 | + path: llvm |
| 49 | + sparse-checkout: | |
| 50 | + llvm/utils/lit |
| 51 | + sycl/test-e2e |
| 52 | + - name: Pack sources |
| 53 | + run: | |
| 54 | + tar -I 'zstd -9' -cf devops/e2e_sources.tar.zst -C ./llvm . |
| 55 | +
|
| 56 | + - uses: actions/download-artifact@v4 |
| 57 | + with: |
| 58 | + name: toolchain |
| 59 | + path: devops/ |
| 60 | + - uses: actions/download-artifact@v4 |
| 61 | + with: |
| 62 | + name: e2e_bin |
| 63 | + path: devops/ |
| 64 | + |
| 65 | + |
| 66 | + - name: Build container |
80 | 67 | uses: ./devops/actions/build_container |
81 | 68 | with: |
82 | | - push: ${{ github.event_name != 'pull_request' }} |
83 | | - file: ${{ matrix.file }} |
| 69 | + push: true |
| 70 | + file: release_tests_binaries |
84 | 71 | username: ${{ github.repository_owner }} |
85 | 72 | password: ${{ secrets.GITHUB_TOKEN }} |
86 | 73 | tags: | |
87 | | - ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }} |
88 | | - ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }} |
89 | | - build-args: ${{ matrix.build_args }} |
| 74 | + ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref }} |
90 | 75 |
|
| 76 | + run-e2e: |
| 77 | + runs-on: [Linux, pvc] |
| 78 | + needs: [docker, build] |
| 79 | + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} |
| 80 | + container: |
| 81 | + image: ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref }} |
| 82 | + options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + with: |
| 86 | + sparse-checkout: | |
| 87 | + devops |
| 88 | + - run: | |
| 89 | + mkdir toolchain |
| 90 | + tar -I 'zstd' -xf /sycl-prebuilt/toolchain.tar.zst -C toolchain |
| 91 | + echo LD_LIBRARY_PATH=$PWD/toolchain/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV |
| 92 | + echo PATH=$PWD/toolchain/bin:$PATH >> $GITHUB_ENV |
| 93 | + - run: | |
| 94 | + sycl-ls |
| 95 | + - name: Run E2E tests |
| 96 | + uses: ./devops/actions/run-tests/e2e |
| 97 | + timeout-minutes: 60 |
| 98 | + with: |
| 99 | + ref: ${{ inputs.ref }} |
| 100 | + testing_mode: run-only |
| 101 | + target_devices: level_zero:gpu |
0 commit comments