v0.2.2-rc0 #70
Workflow file for this run
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: windows-precompile-cuda | |
on: | |
push: | |
tags: | |
- 'v*' | |
- 'windows-cuda' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
windows-precompile-cuda11: | |
runs-on: windows-2019 | |
env: | |
MIX_ENV: prod | |
OPENCV_VER: "4.10.0" | |
ELIXIR_VERSION: "1.16.0" | |
EVISION_PREFER_PRECOMPILED: "false" | |
EVISION_GENERATE_LANG: "erlang,elixir" | |
EVISION_ENABLE_CONTRIB: "true" | |
EVISION_ENABLE_CUDA: "true" | |
MAKE: "nmake" | |
MSBUILD_PLATFORM: x64 | |
CMAKE_GENERATOR_TYPE: Ninja | |
EVISION_KEEP_OCV_BUILD_DIR: "false" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pair: | |
cuda_ver: "11.8.0" | |
cuda_id: "118" | |
cudnn: "8.7.0" | |
OTP_VERSION: "25" | |
NIF_VERSION: "2.16" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Git Checkout | |
shell: bash | |
run: | | |
echo "$(pwd)" | |
cd .. | |
ls -lah | |
cp -rf evision /c/evision | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.pair.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
vsversion: "2019" | |
- name: Install CUDA with cuDNN 8.7.0 | |
uses: cocoa-xu/[email protected] | |
with: | |
cuda: ${{ matrix.pair.cuda_ver }} | |
cudnn: ${{ matrix.pair.cudnn }} | |
cudnn_url: ${{ secrets.CUDA_V870_WINDOWS_X86_64_CUDA11 }} | |
# check python version and their EOL | |
# https://devguide.python.org/versions/ | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Get mix deps | |
shell: bash | |
run: | | |
cd C:/evision | |
mix deps.get | |
- name: Mix compile | |
shell: bash | |
run: | | |
cd C:/evision | |
mix compile | |
- name: Create precompiled library | |
shell: bash | |
run: | | |
export RUNNER_DIR=`pwd` | |
cd C:/evision | |
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v} | |
mkdir -p "${PKG_NAME}" | |
export PRIV_DIR="_build/${MIX_ENV}/lib/evision/priv" | |
rm -rf "${PRIV_DIR}/include" | |
cp -a "${PRIV_DIR}" "${PKG_NAME}" | |
cp -a lib/generated "${PKG_NAME}/elixir_generated" | |
cp -a src/generated "${PKG_NAME}/erlang_generated" | |
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}" | |
rm -rf "${PKG_NAME}" | |
ls -lah "${PKG_NAME}.tar.gz" | |
mkdir -p "${RUNNER_DIR}/artifacts" | |
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts" | |
cd "${RUNNER_DIR}/artifacts" | |
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256" | |
- name: Mix compile for Gleam (experimental) | |
shell: bash | |
run: | | |
cd C:/evision | |
export GLEAM_EVISION=true | |
rm -f _build/${{ env.MIX_ENV }}/lib/evision/priv/evision.so | |
mix compile | |
- name: Create precompiled library for Gleam (experimental) | |
shell: bash | |
run: | | |
export RUNNER_DIR=`pwd` | |
cd C:/evision | |
export PKG_NAME=gleam_evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v} | |
mkdir -p "${PKG_NAME}" | |
export PRIV_DIR="_build/${MIX_ENV}/lib/evision/priv" | |
rm -rf "${PRIV_DIR}/include" | |
cp -a "${PRIV_DIR}" "${PKG_NAME}" | |
cp -a gleam_src "${PKG_NAME}/gleam_generated" | |
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}" | |
rm -rf "${PKG_NAME}" | |
ls -lah "${PKG_NAME}.tar.gz" | |
mkdir -p "${RUNNER_DIR}/artifacts" | |
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts" | |
cd "${RUNNER_DIR}/artifacts" | |
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256" | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
artifacts/*.tar.gz | |
artifacts/*.sha256 | |
windows-precompile-cuda12: | |
runs-on: windows-2019 | |
env: | |
MIX_ENV: prod | |
OPENCV_VER: "4.10.0" | |
ELIXIR_VERSION: "1.16.0" | |
EVISION_PREFER_PRECOMPILED: "false" | |
EVISION_GENERATE_LANG: "erlang,elixir" | |
EVISION_ENABLE_CONTRIB: "true" | |
EVISION_ENABLE_CUDA: "true" | |
MAKE: "nmake" | |
MSBUILD_PLATFORM: x64 | |
CMAKE_GENERATOR_TYPE: Ninja | |
EVISION_KEEP_OCV_BUILD_DIR: "false" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pair: | |
cuda_ver: "12.1.0" | |
cuda_id: "121" | |
cudnn: "8.9.0" | |
OTP_VERSION: "25" | |
NIF_VERSION: "2.16" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Git Checkout | |
shell: bash | |
run: | | |
echo "$(pwd)" | |
cd .. | |
ls -lah | |
cp -rf evision /c/evision | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.pair.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
vsversion: "2019" | |
- name: Install CUDA with cuDNN 8.9.0 | |
uses: cocoa-xu/[email protected] | |
with: | |
cuda: ${{ matrix.pair.cuda_ver }} | |
cudnn: ${{ matrix.pair.cudnn }} | |
cudnn_url: ${{ secrets.CUDA_V890_WINDOWS_X86_64_CUDA12 }} | |
# check python version and their EOL | |
# https://devguide.python.org/versions/ | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Get mix deps | |
shell: bash | |
run: | | |
cd C:/evision | |
mix deps.get | |
- name: Mix compile | |
shell: bash | |
run: | | |
cd C:/evision | |
mix compile | |
- name: Create precompiled library | |
shell: bash | |
run: | | |
export RUNNER_DIR=`pwd` | |
cd C:/evision | |
export PKG_NAME=evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v} | |
mkdir -p "${PKG_NAME}" | |
export PRIV_DIR="_build/${MIX_ENV}/lib/evision/priv" | |
rm -rf "${PRIV_DIR}/include" | |
cp -a "${PRIV_DIR}" "${PKG_NAME}" | |
cp -a lib/generated "${PKG_NAME}/elixir_generated" | |
cp -a src/generated "${PKG_NAME}/erlang_generated" | |
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}" | |
rm -rf "${PKG_NAME}" | |
ls -lah "${PKG_NAME}.tar.gz" | |
mkdir -p "${RUNNER_DIR}/artifacts" | |
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts" | |
cd "${RUNNER_DIR}/artifacts" | |
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256" | |
- name: Mix compile for Gleam (experimental) | |
shell: bash | |
run: | | |
cd C:/evision | |
export GLEAM_EVISION=true | |
rm -f _build/${{ env.MIX_ENV }}/lib/evision/priv/evision.so | |
mix compile | |
- name: Create precompiled library | |
shell: bash | |
run: | | |
export RUNNER_DIR=`pwd` | |
cd C:/evision | |
export PKG_NAME=gleam_evision-nif_${{ matrix.pair.NIF_VERSION }}-x86_64-windows-msvc-contrib-cuda${{ matrix.pair.cuda_id }}-${GITHUB_REF##*/v} | |
mkdir -p "${PKG_NAME}" | |
export PRIV_DIR="_build/${MIX_ENV}/lib/evision/priv" | |
rm -rf "${PRIV_DIR}/include" | |
cp -a "${PRIV_DIR}" "${PKG_NAME}" | |
cp -a gleam_src "${PKG_NAME}/gleam_generated" | |
tar -czf "${PKG_NAME}.tar.gz" "${PKG_NAME}" | |
rm -rf "${PKG_NAME}" | |
ls -lah "${PKG_NAME}.tar.gz" | |
mkdir -p "${RUNNER_DIR}/artifacts" | |
mv "${PKG_NAME}.tar.gz" "${RUNNER_DIR}/artifacts" | |
cd "${RUNNER_DIR}/artifacts" | |
sha256sum "${PKG_NAME}.tar.gz" | tee "${PKG_NAME}.tar.gz.sha256" | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
artifacts/*.tar.gz | |
artifacts/*.sha256 |