diff options
author | Andrzej Janik <[email protected]> | 2021-02-21 14:44:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-21 14:44:58 +0100 |
commit | 4ed9ef8edb2302809fd8859c505bd26bfc867796 (patch) | |
tree | 7a0d7bf0822b995465eddf0f0f894959602b6126 | |
parent | 36514bd6ebcc22fde93e1fc52b3e336da0683bfb (diff) | |
download | ZLUDA-4ed9ef8edb2302809fd8859c505bd26bfc867796.tar.gz ZLUDA-4ed9ef8edb2302809fd8859c505bd26bfc867796.zip |
Improve CI (#39)
* Use official GPU driver packages for building on Linux
* Start building on Windows
* Start uploading artifacts
-rw-r--r-- | .github/workflows/rust.yml | 67 | ||||
-rw-r--r-- | README.md | 5 |
2 files changed, 38 insertions, 34 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 435d25f..1f2c0a2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,45 +10,48 @@ env: CARGO_TERM_COLOR: always jobs: - build: - - runs-on: ubuntu-latest - + build_lin: + name: Build and publish (Linux) + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: submodules: true - - uses: actions/cache@v2 + - name: Install GPU drivers + run: | + sudo apt-get install -y gpg-agent wget + wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add - + sudo apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' + sudo apt-get update + sudo apt-get install intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1 libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev ocl-icd-opencl-dev + - name: Build + run: cargo build --workspace --verbose --release + - name: Rename to libcuda.so + run: | + mv target/release/libnvcuda.so target/release/libcuda.so + ln -s libcuda.so target/release/libcuda.so.1 + - uses: actions/upload-artifact@v2 with: + name: Linux path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install intel compute runtime - run: | - mkdir neo - cd neo - wget https://github.com/intel/compute-runtime/releases/download/20.51.18762/intel-gmmlib_20.3.2_amd64.deb - wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.5884/intel-igc-core_1.0.5884_amd64.deb - wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.5884/intel-igc-opencl_1.0.5884_amd64.deb - wget https://github.com/intel/compute-runtime/releases/download/20.51.18762/intel-opencl_20.51.18762_amd64.deb - wget https://github.com/intel/compute-runtime/releases/download/20.51.18762/intel-ocloc_20.51.18762_amd64.deb - wget https://github.com/intel/compute-runtime/releases/download/20.51.18762/intel-level-zero-gpu_1.0.18762_amd64.deb - - wget https://github.com/intel/compute-runtime/releases/download/20.51.18762/ww51.sum - sha256sum -c ww51.sum - - wget https://github.com/oneapi-src/level-zero/releases/download/v1.0.22/level-zero-devel_1.0.22+u18.04_amd64.deb - wget https://github.com/oneapi-src/level-zero/releases/download/v1.0.22/level-zero_1.0.22+u18.04_amd64.deb - wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.5884/intel-igc-opencl-devel_1.0.5884_amd64.deb - - sudo dpkg -i *.deb - - sudo apt update - sudo apt install ocl-icd-opencl-dev + target/release/libcuda.so + target/release/libcuda.so.1 + build_win: + name: Build and publish (Windows) + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true - name: Build - run: cargo build --workspace --verbose + run: cargo build --workspace --verbose --release + - uses: actions/upload-artifact@v2 + with: + name: Windows + path: | + target/release/nvcuda.dll + target/release/zluda_with.exe + target/release/zluda_dump.dll # TODO(take-cheeze): Support testing # - name: Run tests # run: cargo test --verbose @@ -58,7 +58,7 @@ Run your application like this: ``` ### Linux -A very recent version of [compute-runtime](https://github.com/intel/compute-runtime) and [Level Zero loader](https://github.com/oneapi-src/level-zero/releases) is required. At the time of the writing 20.45.18403 is the oldest recommended version. +You should install most recent run-time driver packages as outlined here: https://dgpu-docs.intel.com/installation-guides/index.html. Run your application like this: ``` LD_LIBRARY_PATH=<ZLUDA_DIRECTORY> <APPLICATION> <APPLICATIONS_ARGUMENTS> @@ -72,7 +72,8 @@ cargo build --release ``` in the main directory of the project. ### Linux -If you are building on Linux you must also symlink (or rename) the ZLUDA output library: +You should install most recent run-time an developer driver packages as outlined here: https://dgpu-docs.intel.com/installation-guides/index.html. Additionally, you should have `ocl-icd-opencl-dev` (or equivalent) installed. +If you are building on Linux you must also symlink (or rename) the ZLUDA output binaries after ZLUDA build finishes: ``` ln -s libnvcuda.so target/release/libcuda.so ln -s libcuda.so target/release/libcuda.so.1 |