Bump version to 0.1.2 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Rust | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
openvx_setup: | |
name: Setup OpenVX | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get commit hash of submodule | |
id: get-hash | |
run: echo "hash=$(git -C vendor/openvx-sample-impl rev-parse HEAD)" >> GITHUB_OUTPUT | |
- name: Setup caching | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: vendor/openvx-sample-impl/install | |
key: OpenVXCacheKey-${{ steps.get-hash.outputs.hash }} | |
- name: Install OpenCL | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ocl-icd-opencl-dev intel-opencl-icd cmake | |
- name: Build OpenVX | |
if: steps.cache.outputs.cache-hit != 'true' | |
working-directory: vendor/openvx-sample-impl | |
run: | | |
python Build.py \ | |
--os=Linux --arch=64 --conf=Release \ | |
--c=clang --cpp=clang \ | |
--conf_vision --conf_nn \ | |
--opencl_interop --enh_vision --ix \ | |
--streaming --pipelining | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: openvx_artifacts | |
path: vendor/openvx-sample-impl/install/Linux | |
test: | |
name: Run tests | |
needs: | |
- openvx_setup | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download OpenVX artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: openvx_artifacts | |
path: vendor/openvx-sample-impl/install/Linux | |
- name: Set OpenVX path | |
run: | | |
echo "OPENVX_DIR=${GITHUB_WORKSPACE}/vendor/openvx-sample-impl/install/Linux/x64/Release" >> $GITHUB_ENV | |
- name: Set OpenVX library paths | |
run: | | |
echo "LIBRARY_PATH=${OPENVX_DIR}/bin" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=${OPENVX_DIR}/bin" >> $GITHUB_ENV | |
- name: Install OpenCL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libclang-dev libopencv-dev ocl-icd-opencl-dev intel-opencl-icd | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "16.0" | |
- name: Build libraries and sample | |
run: cargo build | |
- name: Run Docests | |
run: cargo test --doc | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate code coverage | |
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |