Update acpp bypasses #3180
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: SYCL CTS CI | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
# Run on our default base branch to prime ccache for faster CI runs in PRs. | |
- main | |
jobs: | |
# Pushing container images requires DockerHub credentials, provided as GitHub secrets. | |
# Secrets are not available for runs triggered from external branches (forks). | |
check-secrets: | |
runs-on: ubuntu-latest | |
outputs: | |
available: ${{ steps.check.outputs.available }} | |
steps: | |
- name: Check whether secrets are available | |
id: check | |
run: | | |
SECRET=${{ secrets.DOCKERHUB_TOKEN }} | |
echo "available=${SECRET:+yes}" >> $GITHUB_OUTPUT | |
build-common-base-image: | |
needs: check-secrets | |
if: needs.check-secrets.outputs.available == 'yes' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build common base image | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker/common | |
push: true | |
tags: khronosgroup/sycl-cts-ci:common | |
cache-from: type=registry,ref=khronosgroup/sycl-cts-ci:common | |
cache-to: type=inline | |
build-image-for-sycl-impl: | |
needs: build-common-base-image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
# NB: Don't forget to update versions in compile-cts step as well | |
matrix: | |
include: | |
- sycl-impl: dpcpp | |
version: 2025-05-01 | |
- sycl-impl: adaptivecpp | |
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899 | |
- sycl-impl: simsycl | |
version: 27ca7a05e65d24c784ba831225d0a53341719590 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build SYCL container image | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker/${{ matrix.sycl-impl }} | |
push: true | |
tags: khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} | |
cache-from: type=registry,ref=khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} | |
cache-to: type=inline | |
build-args: | | |
IMPL_VERSION=${{ matrix.version }} | |
check-clang-format: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cpp-linter/cpp-linter-action@main | |
id: linter | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
style: file | |
tidy-checks: '-*' # Disable all clang-tidy checks for now. Enable checks as needed. | |
lines-changed-only: true | |
format-review: true | |
passive-reviews: true | |
compile-cts: | |
needs: build-image-for-sycl-impl | |
# Wait for Docker image builds, but run even if they're skipped | |
if: always() | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
# NB: Don't forget to update versions in build-image-for-sycl-impl step as well | |
matrix: | |
include: | |
- sycl-impl: dpcpp | |
version: 2025-05-01 | |
- sycl-impl: adaptivecpp | |
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899 | |
- sycl-impl: simsycl | |
version: 27ca7a05e65d24c784ba831225d0a53341719590 | |
env: | |
container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} | |
parallel-build-jobs: 2 | |
container: | |
image: khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Configure CMake | |
working-directory: ${{ env.container-workspace }} | |
run: | | |
bash /scripts/configure.sh \ | |
-DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="${{ env.container-workspace }}/ci/${{ matrix.sycl-impl }}.filter" \ | |
-DSYCL_CTS_MEASURE_BUILD_TIMES=ON | |
- name: Set up ccache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.container-workspace }}/.ccache | |
key: ${{ matrix.sycl-impl }}-ccache-${{ github.sha }} | |
restore-keys: | | |
${{ matrix.sycl-impl }}-ccache- | |
# Use ccache's "depend mode" to meet the GitHub Actions timeout of 6 hours with DPC++ compiler. | |
# This is a workaround for the fact that ccache's default mode (i.e. "preprocessor mode") introduces significant overhead in case of the cache miss. | |
# This requires compilation with -MD, which is enabled because we use the Ninja generator. | |
# Using this mode should not have any practical disadvantages. | |
- name: Set ccache environment variables | |
run: | | |
echo "CCACHE_DEPEND=1" >> "$GITHUB_ENV" | |
echo "CCACHE_DIR=${{ env.container-workspace }}/.ccache" >> "$GITHUB_ENV" | |
- name: Build 'oclmath' | |
working-directory: ${{ env.container-workspace }}/build | |
run: cmake --build . --target oclmath | |
- name: Build 'util' | |
working-directory: ${{ env.container-workspace }}/build | |
run: cmake --build . --target util | |
- name: Build all supported test categories | |
working-directory: ${{ env.container-workspace }}/build | |
run: | | |
TS_BEFORE=$(date +%s) | |
cmake --build . --target test_conformance --parallel ${{ env.parallel-build-jobs }} | |
TS_AFTER=$(date +%s) | |
ELAPSED=$(($TS_AFTER - $TS_BEFORE)) | |
sort --numeric-sort --reverse --output=build_times.log build_times.log | |
echo "Total time: $( date --date=@$ELAPSED --utc '+%-Hh %-Mm %-Ss' )" >> build_times.log | |
- name: Upload build times artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-times-${{ matrix.sycl-impl }} | |
path: ${{ env.container-workspace }}/build/build_times.log | |
# This job simply summarizes the results of the "compile-cts" matrix build job above. | |
# It can then be used in a branch protection rule instead of having to enumerate all | |
# entries of the matrix manually (and having to update it whenever the matrix changes). | |
cts-compiles-for-all-implementations: | |
needs: [compile-cts] | |
if: always() | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Summarize matrix build results | |
run: | | |
if [[ "${{ needs.compile-cts.result }}" == "success" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi |