Skip to content

Commit e421bfc

Browse files
committed
cache intel compiler
Signed-off-by: Ian <[email protected]>
1 parent 83a30a0 commit e421bfc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/ci-linux.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,19 @@ jobs:
3838
${{ runner.os }}-cmake-${{ matrix.compiler }}-${{ matrix.cxx_version }}-
3939
${{ runner.os }}-cmake-${{ matrix.compiler }}-
4040
41+
- name: Cache Compiler
42+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
43+
with:
44+
path: /opt/intel
45+
key: ${{ runner.os }}-compiler-intel-${{ matrix.compiler }}-${{ matrix.cxx_version }}
46+
restore-keys: |
47+
${{ runner.os }}-compiler-intel-
48+
4149
- name: install dependencies
4250
run: sudo apt install -yqq ninja-build
4351

4452
- name: Install compiler
53+
if: steps.cache-compiler.outputs.cache-hit != 'true'
4554
run: |
4655
wget --progress=dot:giga https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ac92f2bb-4818-4e53-a432-f8b34d502f23/intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh
4756
sudo bash intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh -s -a -s --action install --eula accept
@@ -51,7 +60,6 @@ jobs:
5160
source /opt/intel/oneapi/setvars.sh
5261
cmake -S . --preset=${{matrix.compiler}} -B build -DCMAKE_CXX_STANDARD=${{matrix.cxx_version}}
5362
54-
5563
- name: build
5664
run: |
5765
source /opt/intel/oneapi/setvars.sh
@@ -80,6 +88,12 @@ jobs:
8088
path: build
8189
key: ${{ runner.os }}-cmake-${{ matrix.compiler }}-${{ matrix.cxx_version }}-${{ matrix.target }}
8290

91+
- name: Cache Compiler
92+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
93+
with:
94+
path: /opt/intel
95+
key: ${{ runner.os }}-compiler-intel-${{ matrix.compiler }}-${{ matrix.cxx_version }}
96+
8397
- name: test
8498
run: |
8599
source /opt/intel/oneapi/setvars.sh

0 commit comments

Comments
 (0)