Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
92 changes: 0 additions & 92 deletions .github/workflows/linux_post_commit.yml

This file was deleted.

47 changes: 46 additions & 1 deletion .github/workflows/sycl_containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
schedule:
# Every 1st and 15th day of month
- cron: '0 0 1,15 * *'
push:
branches:
- sycl

jobs:
base_image_ubuntu2004:
Expand All @@ -14,14 +17,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
fetch-depth: 2
- name: Check if dependencies have changed
id: deps_changed
shell: bash {0}
run: |
git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_base.Dockerfile
echo "::set-output name=flag::$?"
- name: Login to GitHub Container Registry
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/build-push-action@v2
with:
push: true
Expand All @@ -30,3 +41,37 @@ jobs:
ghcr.io/${{ github.repository }}/ubuntu2004_base:latest
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_base.Dockerfile
# This job produces a Docker container with the latest versions of Intel
# drivers, that can be found on GitHub.
drivers_image_ubuntu2004:
if: github.repository == 'intel/llvm'
name: Intel Drivers Ubuntu 20.04 Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Check if dependencies have changed
id: deps_changed
shell: bash {0}
run: |
git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_intel_drivers.Dockerfile
echo "::set-output name=flag::$?"
- name: Login to GitHub Container Registry
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/build-push-action@v2
with:
push: true
tags: |
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest-${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:latest
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_intel_drivers.Dockerfile
44 changes: 44 additions & 0 deletions .github/workflows/sycl_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: SYCL Nightly Builds

on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'

jobs:
ubuntu2004_build_test:
if: github.repository == 'intel/llvm'
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
with:
build_github_cache: true
build_cache_root: ${{ github.workspace }}
build_artifact_suffix: default
ubuntu2004_docker_build_push:
if: github.repository == 'intel/llvm'
runs-on: ubuntu-latest
needs: ubuntu2004_build_test
steps:
- uses: actions/checkout@v2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should save the time on checking out sources by using an image where some old SHA is checked out already and we need just update it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure saving 1 minute on a 1,5 hour build is a significant improvement.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not significant, but still an improvement!
I'm okay to get back to this after we configure everything else.

- uses: actions/download-artifact@v2
with:
name: sycl_nightly_ubuntu2004
path: devops/
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container
uses: docker/build-push-action@v2
with:
push: true
build-args: |
base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers
base_tag=stable
tags: |
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:${{ github.sha }}
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:latest
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile

138 changes: 138 additions & 0 deletions .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Linux Post Commit Checks

on:
push:
branches:
- sycl
jobs:
check:
runs-on: ubuntu-20.04

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we re-use of the containers to avoid configuring the system from scratch?

if: github.repository == 'intel/llvm'
strategy:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I thought we can re-use the workflow added by #4773. I see a lot of duplicated commands from .github/workflows/sycl_linux_build_and_test.yml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the intention. I'll fix that before moving PR to ready for review.

fail-fast: false
matrix:
config: ["Default", "SharedLibs", "NoAssertions"]

steps:
- uses: actions/checkout@v2
with:
path: src
- name: Install Ubuntu deps
run: sudo apt install -y ninja-build ccache
- name: Setup Cache
uses: actions/cache@v2
id: cache
with:
path: ${{ github.workspace }}/cache
key: build-${{ runner.os }}-${{ matrix.config }}-${{ github.sha }}
restore-keys: |
build-${{ runner.os }}-${{ matrix.config }}-
- name: Configure
run: |
CONFIG=${{ matrix.config }}
case $CONFIG in
Default)
export ARGS=""
;;
SharedLibs)
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-13 main"
sudo apt-get update
sudo apt-get install -y clang-13
export ARGS="--shared-libs"
export CC="clang-13"
export CXX="clang++-13"
;;
NoAssertions)
export ARGS="--no-assertions"
;;
esac
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 $ARGS --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@v1
with:
name: sycl_linux_${{ matrix.config }}
path: llvm_sycl.tar.gz
drivers_image_ubuntu2004:
name: Intel Drivers Ubuntu 20.04 Docker image (stable versions)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check if dependencies have changed
id: deps_changed
shell: bash {0}
run: |
git diff --exit-code HEAD~1 -- devops/dependencies.json
echo "::set-output name=flag::$?"
- name: Get dependencies configuration
id: get_deps
if: ${{ steps.deps_changed.outputs.flag }}
run: |
DEPS=`cat devops/dependencies.json`
DEPS="${DEPS//'%'/'%25'}"
DEPS="${DEPS//$'\n'/'%0A'}"
DEPS="${DEPS//$'\r'/'%0D'}"
echo $DEPS
echo "::set-output name=dependenciesJson::$DEPS"
- name: Build and Push Container
uses: docker/build-push-action@v2
if: ${{ steps.deps_changed.outputs.flag }}
with:
push: true
build-args: |
compute_runtime_tag=${{fromJson(steps.get_deps.outputs.dependenciesJson).linux.compute_runtime_tag}}
igc_tag=${{fromJson(steps.get_deps.outputs.dependenciesJson).linux.igc_tag}}
tbb_tag=${{fromJson(steps.get_deps.outputs.dependenciesJson).linux.tbb_tag}}
fpgaemu_tag=${{fromJson(steps.get_deps.outputs.dependenciesJson).linux.fpgaemu_tag}}
cpu_tag=${{fromJson(steps.get_deps.outputs.dependenciesJson).linux.cpu_tag}}
tags: |
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:stable-${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2004_intel_drivers:stable
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_intel_drivers.Dockerfile
Loading