Skip to content

Setup MKL environment #32

Setup MKL environment

Setup MKL environment #32

Workflow file for this run

name: Test and generate documentation of C implementation
on:
push:
branches:
- main
# Configure GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
env:
DOCS_OUT_PATH: c/build/html
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up GitHub Pages
uses: actions/configure-pages@v3
- name: Add Intel APT repository
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
- name: Install CMake, Ninja, Intel MKL and Doxygen
uses: awalsh128/cache-apt-pkgs-action@master
with:
packages: cmake intel-oneapi-mkl-devel doxygen graphviz
version: 1 # cache key
- name: Setup Intel MKL environment
run: |
sh -x /opt/intel/oneapi/setvars.sh
source /opt/intel/oneapi/setvars.sh intel64
- name: Create build system
working-directory: c
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKING=OFF -Bbuild
- name: Test implementation
working-directory: c
run: |
cmake --build build --parallel
ctest --test-dir build -V
- name: Generate documentation
working-directory: c
run: |
cmake --build build --parallel --target docs_diag_scals
touch "../$DOCS_OUT_PATH/.nojekyll" # Ensure pages with underscores work
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ env.DOCS_OUT_PATH }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2