Skip to content

Pack MKL into container using ocipkg #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cargo.lock linguist-generated=true
54 changes: 54 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: pack

on:
push:
branches:
- main
tags:
# tag must be rust_version-mkl_version
- "*.*.*-*.*"
pull_request:
branches:
- main

jobs:
linux:
runs-on: ubuntu-22.04
container:
image: ghcr.io/rust-math/rust-mkl:1.62.1-2020.1
steps:
- uses: actions/checkout@v1

- uses: actions-rs/cargo@v1
with:
command: install
args: ocipkg-cli --version=0.2.3
- name: Add path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
run: |
ocipkg login -u ${{ github.repository_owner }} -p ${{ github.token }} https://ghcr.io

- name: Install Intel MKL
run: |
apt update
apt install -y cpio
curl -sfLO http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16533/l_mkl_2020.1.217.tgz
tar xf l_mkl_2020.1.217.tgz
cd l_mkl_2020.1.217
./install.sh -s ../silent.cfg

- name: Create oci-archive using intel-mkl-pack
uses: actions-rs/cargo@v1
with:
command: run
args: --release

- name: Push oci-archives
if: github.event_name != 'pull_request'
run: >-
for ar in $(find . -name "mkl-*-*-*.tar"); do
ocipkg push $ar;
done
33 changes: 33 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: rust

on:
push:
branches:
- main
pull_request: {}

jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: check

check-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

clippy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: clippy
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# cargo
target/
.cargo-*/

# rustfmt
**/*.rs.bk
rusty-tags.*

# Generated oci-archives
*.tar
Loading