Skip to content

Commit

Permalink
Install Codeplay packages via APT
Browse files Browse the repository at this point in the history
Codeplay now provides packages via APT. Token is no longer needed.
  • Loading branch information
WeiqunZhang committed Jan 3, 2024
1 parent a068330 commit a79ca25
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/dependencies/dependencies_codeplay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@

set -eu -o pipefail

curl -o oneapi_nvidia.sh -L "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&filters[]=linux&aat=$1"
chmod +x oneapi_nvidia.sh
sudo ./oneapi_nvidia.sh --yes
# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

curl -o oneapi_amd.sh -L "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&filters[]=linux&aat=$1"
chmod +x oneapi_amd.sh
sudo ./oneapi_amd.sh --yes
# https://developer.codeplay.com/apt/index.html
sudo wget -qO - https://developer.codeplay.com/apt/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/codeplay-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/codeplay-keyring.gpg] https://developer.codeplay.com/apt all main" | sudo tee /etc/apt/sources.list.d/codeplay.list

sudo apt-get update

# try apt install up to five times, to avoid connection splits
status=1
for itry in {1..5}
do
sudo apt-get install -y --no-install-recommends \
$1 \
&& { sudo apt-get clean; status=0; break; } \
|| { sleep 10; }
done
if [[ ${status} -ne 0 ]]; then exit 1; fi
19 changes: 4 additions & 15 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,22 @@ jobs:
tests-oneapi-sycl-eb-nvidia:
name: oneAPI SYCL for Nvidia GPUs [tests w/ EB]
runs-on: ubuntu-latest
env:
CODEPLAYTOKEN: ${{ secrets.CODEPLAYTOKEN }}
steps:
- uses: actions/checkout@v3
- name: Dependencies
if: ${{ env.CODEPLAYTOKEN != '' }}
run: |
.github/workflows/dependencies/dependencies_nvcc.sh
.github/workflows/dependencies/ubuntu_free_disk_space.sh
.github/workflows/dependencies/dependencies_dpcpp.sh
.github/workflows/dependencies/dependencies_codeplay.sh ${{ env.CODEPLAYTOKEN }}
.github/workflows/dependencies/dependencies_codeplay.sh oneapi-nvidia-12.0
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
if: ${{ env.CODEPLAYTOKEN != '' }}
uses: actions/cache@v3
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Install
if: ${{ env.CODEPLAYTOKEN != '' }}
# clang currently supports CUDA up to version 11.5 and a warning is issued with newer versions
env: {CXXFLAGS: "-fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-unknown-cuda-version"}
run: |
Expand Down Expand Up @@ -147,29 +142,23 @@ jobs:
no-tests-oneapi-sycl-amd:
name: oneAPI SYCL for AMD GPUs
runs-on: ubuntu-20.04
env:
CODEPLAYTOKEN: ${{ secrets.CODEPLAYTOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Dependencies
if: ${{ env.CODEPLAYTOKEN != '' }}
run: |
.github/workflows/dependencies/ubuntu_free_disk_space.sh
.github/workflows/dependencies/dependencies_hip.sh 5.4.6
.github/workflows/dependencies/dependencies_dpcpp.sh
.github/workflows/dependencies/dependencies_codeplay.sh ${{ env.CODEPLAYTOKEN }}
.github/workflows/dependencies/dependencies_codeplay.sh oneapi-amd-5.4.3
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
if: ${{ env.CODEPLAYTOKEN != '' }}
uses: actions/cache@v3
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Install
if: ${{ env.CODEPLAYTOKEN != '' }}
env: {CXXFLAGS: "-fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx90a -fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor"}
run: |
export CCACHE_COMPRESS=1
Expand Down

0 comments on commit a79ca25

Please sign in to comment.