Skip to content

Commit 15f63ca

Browse files
committed
CI: Set up arrayfire for clippy job as well
The clippy job now needs arrayfire to because the build script checks for a valid arrayfire installation.
1 parent ff970c9 commit 15f63ca

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

+24
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
clippy:
7474
name: Clippy Lints
7575
runs-on: ubuntu-18.04
76+
env:
77+
AF_VER: 3.8.0
7678
steps:
7779
- name: Checkout Repository
7880
uses: actions/checkout@master
@@ -83,7 +85,29 @@ jobs:
8385
toolchain: stable
8486
override: true
8587
components: clippy
88+
89+
- name: Cache ArrayFire
90+
uses: actions/cache@v1
91+
id: arrayfire
92+
with:
93+
path: afbin
94+
key: ${{ runner.os }}-af-${{ env.AF_VER }}
95+
96+
- name: Download ArrayFire
97+
# Only download and cache arrayfire if already not found
98+
if: steps.arrayfire.outputs.cache-hit != 'true'
99+
run: |
100+
wget --quiet http://arrayfire.s3.amazonaws.com/${AF_VER}/ArrayFire-v${AF_VER}_Linux_x86_64.sh
101+
chmod +x ./ArrayFire-v${AF_VER}_Linux_x86_64.sh
102+
mkdir afbin
103+
./ArrayFire-v${AF_VER}_Linux_x86_64.sh --skip-license --exclude-subdir --prefix=./afbin
104+
rm ./afbin/lib64/libcu*.so*
105+
rm ./afbin/lib64/libafcuda*.so*
106+
rm ./ArrayFire-v${AF_VER}_Linux_x86_64.sh
107+
86108
- name: Run clippy tool
109+
env:
110+
AF_PATH: ${{ github.workspace }}/afbin
87111
uses: actions-rs/cargo@v1
88112
with:
89113
command: clippy

0 commit comments

Comments
 (0)