|
1 |
| -# based on: https://gist.github.com/scivision/b22455e3322826a1c385d5d4b1a8d25e |
2 |
| - |
3 | 1 | name: Build project
|
4 | 2 |
|
5 |
| -env: |
6 |
| - LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic |
7 |
| - # https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml |
8 |
| - CTEST_NO_TESTS_ACTION: error |
9 |
| - |
10 | 3 | on:
|
11 | 4 | push:
|
12 | 5 | paths:
|
|
19 | 12 | jobs:
|
20 | 13 | linux:
|
21 | 14 | runs-on: ubuntu-latest
|
22 |
| - |
23 | 15 | steps:
|
24 |
| - # must be first as we're using scripts from this repo |
25 |
| - - uses: actions/checkout@v4 |
| 16 | + - name: Checkout code |
| 17 | + uses: actions/checkout@v4 |
26 | 18 |
|
27 |
| - - name: cache install oneAPI |
28 |
| - id: cache-install |
29 |
| - uses: actions/cache@v3 |
| 19 | + # Set up the Intel oneAPI Docker container |
| 20 | + - name: Set up Intel oneAPI container |
| 21 | + uses: addnab/docker-run-action@v3 |
30 | 22 | with:
|
31 |
| - path: | |
32 |
| - /opt/intel/oneapi |
33 |
| - key: install-apt |
34 |
| - |
35 |
| - - name: non-cache install oneAPI |
36 |
| - if: steps.cache-install.outputs.cache-hit != 'true' |
37 |
| - timeout-minutes: 10 |
38 |
| - run: | |
39 |
| - id |
40 |
| - ls -lisa .github/workflow_scripts/ |
41 |
| - sh -c .github/workflow_scripts/oneapi_setup_apt_repo_linux.sh |
42 |
| - sudo apt install ${{ env.LINUX_CPP_COMPONENTS }} |
43 |
| -
|
44 |
| - - name: Setup Intel oneAPI environment |
45 |
| - run: | |
46 |
| - source /opt/intel/oneapi/setvars.sh |
47 |
| - printenv >> $GITHUB_ENV |
48 |
| -
|
49 |
| - - name: Run build script |
50 |
| - run: ./build.sh |
51 |
| - |
52 |
| - - name: exclude unused files from cache |
53 |
| - if: steps.cache-install.outputs.cache-hit != 'true' |
54 |
| - run: sh -c .github/workflow_scripts/oneapi_cache_exclude_linux.sh |
| 23 | + image: intel/oneapi-hpckit:latest |
| 24 | + options: --rm # Remove the container after execution |
| 25 | + # Inside the container, run build commands |
| 26 | + run: build.sh |
0 commit comments