Skip to content

Bump opencv from 0.84.5 to 0.85.3 in /src-tauri #337

Bump opencv from 0.84.5 to 0.85.3 in /src-tauri

Bump opencv from 0.84.5 to 0.85.3 in /src-tauri #337

Workflow file for this run

name: "Build App"
on:
pull_request:
push:
branches:
- main
jobs:
build-app:
defaults:
run:
shell: bash -el {0}
environment: signing
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
triplet: x64-osx
vcpkg-package: "opencv4[dnn]"
vcpkg-version: 2022.09.27
- platform: windows-latest
triplet: x64-windows-static-md
vcpkg-package: "opencv4[dnn]"
vcpkg-version: 2022.09.27
- platform: ubuntu-latest
triplet: x64-linux
vcpkg-package: "opencv4[dnn]"
vcpkg-version: 2022.09.27
runs-on: ${{ matrix.platform }}
steps:
- name: Pin vcpkg version
run: |
cd $VCPKG_INSTALLATION_ROOT && git checkout . && git checkout ${{ matrix.vcpkg-version }}
- name: Install Linux System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-3 libdbus-1-dev libxi-dev libxtst-dev libgles2-mesa-dev libgtk-3-dev \
libwebkit2gtk-4.0-dev librsvg2-dev jq clang && sudo ln -fs libclang.so.1 /usr/lib/llvm-14/lib/libclang.so
if: runner.os == 'Linux'
- name: Install Windows System Dependencies
run: choco install -y wget jq
if: runner.os == 'Windows'
- name: Install MacOS System Dependencies
run: brew install jq pkg-config && mkdir -p /Users/runner/lib && ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib /Users/runner/lib/libclang.dylib
if: runner.os == 'macOS'
- uses: actions/checkout@v4
with:
submodules: true
- name: Disable Signing if not on main
# Private key not available otherwise
if: github.ref != 'refs/heads/main'
run: jq '.tauri.updater.active = false' src-tauri/tauri.conf.json > src-tauri/tauri.conf.json.tmp && mv src-tauri/tauri.conf.json.tmp src-tauri/tauri.conf.json
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set VCPKG_ROOT
run: echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: |
${{ env.VCPKG_ROOT }}/installed
${{ env.VCPKG_ROOT }}/packages
key: ${{ matrix.vcpkg-version }}-${{ matrix.platform }}-vcpkg-${{ matrix.vcpkg-package }}-${{ matrix.triplet }}
- name: Download Model
run: wget -O md_v5a.0.0-1280x1280.onnx https://github.com/bencevans/megadetector-onnx/releases/download/v0.2.0/md_v5a.0.0-1280x1280.onnx
- name: Build OpenCV 4
run: "'${{env.VCPKG_ROOT}}/vcpkg' install ${{ matrix.vcpkg-package }}:${{ matrix.triplet }}"
- name: Cache Rust / Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-${{runner.arch}}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.vcpkg-version }}-${{ matrix.platform }}-vcpkg-${{ matrix.vcpkg-package }}-${{ matrix.triplet }}
- name: Build App
run: npm ci && OPENCV_DISABLE_PROBES=pkg_config,cmake npm run tauri build
env:
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
- name: Run Rust Tests
run: cd src-tauri && cargo test
- uses: actions/upload-artifact@v3
if: ${{ env.ACTIONS_RUNNER_DEBUG }}
with:
name: CamTrap Detector MacOS Intel.dmg
path: src-tauri/target/release/bundle/dmg/*.dmg
- name: Remove Bundles to Reduce Cache
run: rm -rf src-tauri/target/release/bundle/
# - uses: tauri-apps/tauri-action@v0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
# with:
# tauriScript: npm run tauri --
# args: --features builtin
# tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
# releaseName: 'App v__VERSION__'
# releaseBody: 'See the assets to download this version and install.'
# releaseDraft: true
# prerelease: false