Skip to content

cuda shared pointer update #654

cuda shared pointer update

cuda shared pointer update #654

Workflow file for this run

name: windows-x86_64
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'assets/**'
- '*.md'
- '**/*.md'
- 'LICENSE*'
- 'examples/**'
- 'nerves/**'
- 'gleam_src/**'
- 'Makefile'
- 'cc_toolchain/**'
- 'checksum.exs'
- 'do_release.sh'
- '.github/FUNDING.yml'
- '.github/workflows/nerves-*.yml'
- '.github/workflows/linux-*.yml'
- '.github/workflows/macos-*.yml'
- '.github/workflows/test-*.yml'
- '.github/workflows/windows-precompile.yml'
- '.github/*manylinux*.sh'
push:
branches:
- main
- test-*
paths-ignore:
- 'assets/**'
- '*.md'
- '**/*.md'
- 'LICENSE*'
- 'examples/**'
- 'nerves/**'
- 'Makefile'
- 'cc_toolchain/**'
- 'checksum.exs'
- '.github/FUNDING.yml'
- '.github/workflows/nerves-*.yml'
- '.github/workflows/linux-*.yml'
- '.github/workflows/macos-*.yml'
- '.github/workflows/test-*.yml'
- '.github/workflows/windows-precompile-cuda.yml'
- '.github/workflows/windows-precompile.yml'
- '.github/*manylinux*.sh'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mix_test:
runs-on: windows-latest
env:
MIX_ENV: test
OPENCV_VER: "4.10.0"
OTP_VERSION: "26"
ELIXIR_VERSION: "1.16.3"
EVISION_PREFER_PRECOMPILED: "false"
MAKE: "nmake"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Cache mix packages
id: cache-mix-deps
uses: actions/cache@v4
with:
key: deps-${{ hashFiles('mix.lock') }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}
path: |
./deps
- name: Get mix deps
if: steps.cache-mix-deps.outputs.cache-hit != 'true'
shell: bash
run: |
mix deps.get
- name: Cache OpenCV source code
id: cache-opencv
uses: actions/cache@v4
with:
key: opencv-${{ env.OPENCV_VER }}
path: |
./3rd_party
- name: Download OpenCV source code
if: steps.cache-opencv.outputs.cache-hit != 'true'
shell: bash
run: |
bash scripts/download_opencv.sh ${OPENCV_VER} 3rd_party/cache 3rd_party/opencv/
- name: Cache compiled OpenCV
id: cache-mix-compile
uses: actions/cache@v4
with:
key: compiled-opencv-${{ env.OPENCV_VER }}-x86_64-windows-msvc-${{ hashFiles('Makefile.win') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
./c_src/configuration.private.hpp
- name: Compile OpenCV
if: steps.cache-mix-compile.outputs.cache-hit != 'true'
shell: bash
run: |
rm -f Makefile
mix compile_opencv
- name: Mix Compile
shell: bash
run: |
rm -f Makefile
rm -f "_build/${MIX_ENV}/lib/evision/priv/evision.dll"
rm -f "_build/${MIX_ENV}/lib/evision/priv/windows_fix.dll"
rm -rf lib/generated && rm -rf src/generated
mkdir -p lib/generated && mkdir -p src/generated
mix compile
- name: Compile once again but without optional deps
shell: bash
run: |
mix compile --force --warnings-as-errors --no-optional-deps
- name: Cache testdata
id: cache-mix-testdata
uses: actions/cache@v4
with:
key: testdata-${{ hashFiles('test/downloading_list.txt') }}
path: |
./test/testdata
# - name: Mix Test
# shell: bash
# run: |
# mix test --include require_downloading --include require_ffmpeg --exclude may_crash
- name: create tarball
shell: bash
run: |
export ROOT_DIR="$(pwd)"
cd _build/${MIX_ENV}/lib/evision/priv
tar -czf "${ROOT_DIR}/evision-windows.tar.gz" .
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: evision-windows.tar.gz
path: evision-windows.tar.gz