Skip to content

Commit 63924fe

Browse files
Add workflow to build the package and upload to dppy/label/dev
Fix post-link script so that tests pass.
1 parent 6bf9a5f commit 63924fe

File tree

7 files changed

+111
-5
lines changed

7 files changed

+111
-5
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @oleksandr-pavlyk @xaleryb @ZzEeKkAa @ndgrigorian

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Summary of the proposed change
2+
3+
### Additional details
4+
5+
### Example illustrating what changed
6+

.github/workflows/conda-package.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Conda package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
permissions: read-all
10+
11+
env:
12+
PACKAGE_NAME: intel-gpu-ocl-icd-system
13+
14+
15+
jobs:
16+
build_and_test_linux:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/[email protected]
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set pkgs_dirs
25+
run: |
26+
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
27+
28+
- name: Add conda to system path
29+
run: echo $CONDA/bin >> $GITHUB_PATH
30+
31+
- name: Install conda-build
32+
run: conda install conda-build -c conda-forge --override-channels
33+
34+
- name: Build conda package
35+
run: |
36+
# use bootstrap channel to pull NumPy linked with OpenBLAS
37+
CHANNELS="-c conda-forge --override-channels"
38+
conda build \
39+
$CHANNELS \
40+
recipe
41+
42+
- name: Upload artifact
43+
uses: actions/[email protected]
44+
with:
45+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}
46+
path: /usr/share/miniconda/conda-bld/noarch/${{ env.PACKAGE_NAME }}-*.tar.bz2
47+
48+
upload_linux:
49+
needs: build_and_test_linux
50+
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Download conda artifact
54+
uses: actions/download-artifact@v4
55+
with:
56+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}
57+
58+
- name: Install anaconda-client
59+
run: conda install anaconda-client -c conda-forge --override-channels
60+
- name: Add conda to system path
61+
run: echo $CONDA/bin >> $GITHUB_PATH
62+
- name: Package version
63+
run: echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.tar.bz2 | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV
64+
65+
- name: Upload
66+
env:
67+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
68+
run: |
69+
anaconda --token $ANACONDA_TOKEN upload --user dppy --label dev ${PACKAGE_NAME}-*.tar.bz2
70+
71+
- name: Upload Wheels
72+
env:
73+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
74+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}
75+
76+

SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
## Report a Vulnerability
4+
5+
Please report security issues or vulnerabilities to the [Intel® Security Center].
6+
7+
For more information on how Intel® works to resolve security issues, see
8+
[Vulnerability Handling Guidelines].
9+
10+
[Intel® Security Center]:https://www.intel.com/content/www/us/en/security-center/default.html
11+
12+
[Vulnerability Handling Guidelines]:https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html

recipe/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package:
66
version: {{ version }}
77

88
build:
9+
noarch: generic
910
number: 0
1011
skip: True # [not linux]
1112

@@ -16,7 +17,7 @@ requirements:
1617
test:
1718
commands:
1819
- export ICD_FN=${CONDA_PREFIX}/etc/OpenCL/vendors/intel-ocl-gpu.icd
19-
- test -h ${ICD_FN} || test ! -a ${ICD_FN}
20+
- test -h ${ICD_FN}
2021

2122
about:
2223
home: https://github.com/IntelPython/{{ name|lower }}-feedstock

recipe/post-link.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@
1616

1717
systemwide_vendors=/etc/OpenCL/vendors
1818
env_vendors=${PREFIX}/etc/OpenCL/vendors
19-
env_icd_fn=$local_vendors/intel-ocl-gpu.icd
19+
env_icd_fn=$env_vendors/intel-ocl-gpu.icd
2020

2121
if [[ -d $systemwide_vendors ]]
2222
then
2323
systemwide_icd_fn=$(grep -rl "libigdrcl" ${systemwide_vendors})
2424
if [[ -f $systemwide_icd_fn ]]
2525
then
2626
ln -s $systemwide_icd_fn $env_icd_fn
27-
echo "Symbolic link was successfully created. OpenCL GPU device should be discoverable by OpenCL loader." >> ${PREFIX}/.messages.txt
27+
echo "Symbolic link was successfully created. OpenCL GPU device should be discoverable by OpenCL loader.\n" >> ${PREFIX}/.messages.txt
2828
else
29-
echo "No ICD file for Intel(R) GPU device was found in '${systemwise_vendors}'." >> ${PREFIX}/.messages.txt
29+
echo "No ICD file for Intel(R) GPU device was found in '${systemwise_vendors}'.\n" >> ${PREFIX}/.messages.txt
30+
echo "Creating default symbolic link.\n" >> ${PREFIX}/.messages.txt
31+
ln -s ${systemwide_vendors}/intel.icd $env_icd_fn
3032
fi
3133
else
32-
echo "Folder '${systemwide_vendors}' does not exist. Try installing GPU drivers and then reinstall intel-gpu-ocl-icd-system conda package" >> $PREFIX/.messages.txt
34+
echo "Folder '${systemwide_vendors}' does not exist. \n" >> $PREFIX/.messages.txt
35+
echo "Creating default symbolic link. \n" >> ${PREFIX}/.messages.txt
36+
ln -s ${systemwide_vendors}/intel.icd $env_icd_fn
3337
fi

0 commit comments

Comments
 (0)