Skip to content

Commit f1ec8df

Browse files
authored
Install Codeplay packages via APT (#3687)
Codeplay now provides packages via APT. Token is no longer needed.
1 parent a068330 commit f1ec8df

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

.github/workflows/dependencies/dependencies_codeplay.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,24 @@
66

77
set -eu -o pipefail
88

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

13-
curl -o oneapi_amd.sh -L "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&filters[]=linux&aat=$1"
14-
chmod +x oneapi_amd.sh
15-
sudo ./oneapi_amd.sh --yes
14+
# https://developer.codeplay.com/apt/index.html
15+
sudo wget -qO - https://developer.codeplay.com/apt/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/codeplay-keyring.gpg > /dev/null
16+
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
17+
18+
sudo apt-get update
19+
20+
# try apt install up to five times, to avoid connection splits
21+
status=1
22+
for itry in {1..5}
23+
do
24+
sudo apt-get install -y --no-install-recommends \
25+
$1 \
26+
&& { sudo apt-get clean; status=0; break; } \
27+
|| { sleep 10; }
28+
done
29+
if [[ ${status} -ne 0 ]]; then exit 1; fi

.github/workflows/dependencies/dependencies_hip.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ sudo apt-get install -y --no-install-recommends \
4343
roctracer-dev \
4444
rocprofiler-dev \
4545
rocrand-dev \
46-
rocprim-dev \
47-
hiprand-dev
46+
rocprim-dev
47+
48+
# hiprand-dev is a new package that does not exist in old versions
49+
sudo apt-get install -y --no-install-recommends hiprand-dev || true
4850

4951
# activate
5052
#

.github/workflows/intel.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,29 +97,24 @@ jobs:
9797
tests-oneapi-sycl-eb-nvidia:
9898
name: oneAPI SYCL for Nvidia GPUs [tests w/ EB]
9999
runs-on: ubuntu-latest
100-
env:
101-
CODEPLAYTOKEN: ${{ secrets.CODEPLAYTOKEN }}
102100
steps:
103101
- uses: actions/checkout@v3
104102
- name: Dependencies
105-
if: ${{ env.CODEPLAYTOKEN != '' }}
106103
run: |
107-
.github/workflows/dependencies/dependencies_nvcc.sh
104+
.github/workflows/dependencies/ubuntu_free_disk_space.sh
108105
.github/workflows/dependencies/dependencies_dpcpp.sh
109-
.github/workflows/dependencies/dependencies_codeplay.sh ${{ env.CODEPLAYTOKEN }}
106+
.github/workflows/dependencies/dependencies_nvcc.sh 12.0
107+
.github/workflows/dependencies/dependencies_codeplay.sh oneapi-nvidia-12.0
110108
.github/workflows/dependencies/dependencies_ccache.sh
111109
- name: Set Up Cache
112-
if: ${{ env.CODEPLAYTOKEN != '' }}
113110
uses: actions/cache@v3
114111
with:
115112
path: ~/.cache/ccache
116113
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
117114
restore-keys: |
118115
ccache-${{ github.workflow }}-${{ github.job }}-git-
119116
- name: Build & Install
120-
if: ${{ env.CODEPLAYTOKEN != '' }}
121-
# clang currently supports CUDA up to version 11.5 and a warning is issued with newer versions
122-
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"}
117+
env: {CXXFLAGS: "-fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor"}
123118
run: |
124119
export CCACHE_COMPRESS=1
125120
export CCACHE_COMPRESSLEVEL=10
@@ -148,28 +143,23 @@ jobs:
148143
no-tests-oneapi-sycl-amd:
149144
name: oneAPI SYCL for AMD GPUs
150145
runs-on: ubuntu-20.04
151-
env:
152-
CODEPLAYTOKEN: ${{ secrets.CODEPLAYTOKEN }}
153146
steps:
154147
- uses: actions/checkout@v3
155148
- name: Dependencies
156-
if: ${{ env.CODEPLAYTOKEN != '' }}
157149
run: |
158150
.github/workflows/dependencies/ubuntu_free_disk_space.sh
159-
.github/workflows/dependencies/dependencies_hip.sh 5.4.6
160151
.github/workflows/dependencies/dependencies_dpcpp.sh
161-
.github/workflows/dependencies/dependencies_codeplay.sh ${{ env.CODEPLAYTOKEN }}
152+
.github/workflows/dependencies/dependencies_hip.sh 5.4.3
153+
.github/workflows/dependencies/dependencies_codeplay.sh oneapi-amd-5.4.3
162154
.github/workflows/dependencies/dependencies_ccache.sh
163155
- name: Set Up Cache
164-
if: ${{ env.CODEPLAYTOKEN != '' }}
165156
uses: actions/cache@v3
166157
with:
167158
path: ~/.cache/ccache
168159
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
169160
restore-keys: |
170161
ccache-${{ github.workflow }}-${{ github.job }}-git-
171162
- name: Build & Install
172-
if: ${{ env.CODEPLAYTOKEN != '' }}
173163
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"}
174164
run: |
175165
export CCACHE_COMPRESS=1

0 commit comments

Comments
 (0)