Skip to content

Commit 6e6ba09

Browse files
committed
Build using hpckit docker image
1 parent 119b0f1 commit 6e6ba09

File tree

1 file changed

+9
-37
lines changed

1 file changed

+9
-37
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
# based on: https://gist.github.com/scivision/b22455e3322826a1c385d5d4b1a8d25e
2-
31
name: Build project
42

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-
103
on:
114
push:
125
paths:
@@ -19,36 +12,15 @@ on:
1912
jobs:
2013
linux:
2114
runs-on: ubuntu-latest
22-
2315
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
2618

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
3022
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

Comments
 (0)