Skip to content

Commit

Permalink
Update workflows for new containers. (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp authored Jan 24, 2025
1 parent 43c0b3e commit 07ecd95
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 107 deletions.
5 changes: 0 additions & 5 deletions .github/actions/do_build_dpcpp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ runs:
- name: Install Ninja
uses: llvm/actions/install-ninja@main

- name: Install spirv tools
shell: bash
run:
sudo apt-get install spirv-tools

- name: clone dpc++
if: inputs.create_dpcpp_artefact_method == 'build'
uses: actions/checkout@v4
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/do_build_icd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ runs:
- name: Install Ninja
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch

- name: install cross tools
if: steps.calc_vars.outputs.arch != 'x86_64'
uses: ./.github/actions/do_install_ubuntu_cross_tools
with:
cross_arch: ${{ steps.calc_vars.outputs.arch }}

- name: clone headers
uses: actions/checkout@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ runs:
llvm_version: ${{ inputs.llvm_version }}
llvm_build_type: RelAssert
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }}
vulkan_sdk_install: ${{ inputs.vulkan_sdk_install }}
os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }}

- name: build ock x86
Expand Down
18 changes: 0 additions & 18 deletions .github/actions/do_build_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,12 @@ runs:
repository: KhronosGroup/OpenCL-CTS
path: OpenCL-CTS

- name: aarch64 set-up # TODO: update if/when qemu no longer used
if: steps.calc_vars.outputs.arch == 'aarch64'
shell: bash
run: |
set -x
sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list
sudo dpkg --add-architecture arm64
sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get update
if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then
# TODO: Only needed for run - could be moved to corresponding run action
echo QEMU INSTALL MATCH FOR ${{inputs.target}}
sudo apt-get install --yes qemu-user
fi
- name: build opencl cts
shell: bash
env:
CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.cmake_toolchain }}"
run: |
echo CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN
# get spirv-as
sudo apt-get update
sudo apt-get install -y spirv-tools
# apply patches
pushd OpenCL-CTS
git log -1
Expand Down
27 changes: 0 additions & 27 deletions .github/actions/do_install_ubuntu_cross_tools/action.yml

This file was deleted.

44 changes: 1 addition & 43 deletions .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,60 +23,18 @@ inputs:
cross_arch:
description: 'Cross compilation architecture from: x86, arm, aarch64, riscv64. Default: "none" (no cross compile), will auto fetch native arch'
default: "none"
clang_tidy:
description: 'Enable installing of clang-tidy (currently 19)'
type: boolean
default: false
vulkan_sdk_install:
description: 'vulkan install flag'
default: true

runs:
# We don't want a new docker just a list of steps, so mark as composite
using: "composite"
steps:
- name: Install ubuntu prerequisites
# Note: most prereqs now installed in dockerfiles
if: ${{ inputs.os == 'ubuntu' }}
shell: bash
run: |
# required for virtualenv running in docker
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
# required due to using non docker to build llvm
# If we switch to always using docker we can drop.
sudo apt-get install --yes lib32ncurses-dev
if [ "${{ inputs.cross_arch }}" = "x86" ]; then sudo dpkg --add-architecture i386 ; fi
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-jammy.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-jammy.list; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list; fi
if [ "${{ inputs.clang_tidy }}" = "true" ]; then
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor - | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg >/dev/null
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
fi
sudo apt-get update
if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi
pip install lit clang-format==19.1.0 virtualenv
# required for gtest-terse-runner running in docker
sudo apt-get install --yes python3-colorama
sudo apt-get install --yes doxygen
if [ "${{ inputs.vulkan_sdk_install }}" = "true" ]; then \
sudo apt-get install --yes vulkan-sdk
fi
# TODO: Only required if we are running something that requires qemu, not required for building
if [ "${{ inputs.cross_arch }}" != "none" ] && [ "${{ inputs.cross_arch }}" != "x86" ]; then \
# Install QEMU for testing cross compilation.
sudo apt-get install --yes qemu-user; \
fi
- name: Install cross arch tools
if: ${{ inputs.os == 'ubuntu' }}
uses: ./.github/actions/do_install_ubuntu_cross_tools
with:
cross_arch: ${{ inputs.cross_arch }}
- name: Install windows prerequisites
if: ${{ inputs.os == 'windows' }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
# required to fetch internal or private CodeQL packs
packages: read
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

steps:
- name: Checkout repo
Expand Down Expand Up @@ -62,6 +66,10 @@ jobs:
# required to fetch internal or private CodeQL packs
packages: read
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

steps:
- name: Checkout repo
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/create_publish_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
# build and run for RISCV
run_riscv_m1_nightly_package:
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ jobs:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

runs-on: ubuntu-22.04
runs-on: cp-ubuntu-24.04
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest' }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
- name: clone ock platform
uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_ock_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
# build and run for RISCV
run_riscv_m1_ock_demo:
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

steps:
- name: Checkout repo
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/run_pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ jobs:
with:
llvm_version: 19
llvm_build_type: RelAssert
clang_tidy: true

- name: build initial config files
uses: ./.github/actions/do_build_ock
Expand All @@ -141,8 +140,6 @@ jobs:

- name: run clang-tidy
run: |
# TODO: Move to docker
sudo apt-get -y install parallel
git config --global --add safe.directory $PWD
git fetch origin ${{ github.base_ref }}
./scripts/compute-dependants.py \
Expand Down Expand Up @@ -408,9 +405,6 @@ jobs:
uses: actions/[email protected]
- name: Install Ninja
uses: llvm/actions/install-ninja@main
- name: install risc-v toolchain
run:
sudo apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
- run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al
- name: Run Clik
run: |
Expand Down

0 comments on commit 07ecd95

Please sign in to comment.