Skip to content

cuda shared pointer update #917

cuda shared pointer update

cuda shared pointer update #917

Workflow file for this run

name: nerves-build
on:
pull_request:
paths-ignore:
- 'assets/**'
- '*.md'
- '**/*.md'
- 'LICENSE*'
- 'examples/**'
- 'gleam_src/**'
- 'test/**'
- 'Makefile.win'
- 'cc_toolchain/**'
- 'c_src/windows_fix/windows_fix.cpp'
- 'checksum.exs'
- 'do_release.sh'
- '.github/FUNDING.yml'
- '.github/workflows/linux-*'
- '.github/workflows/macos-*'
- '.github/workflows/windows-*'
- '.github/workflows/test-*.yml'
- '.github/*manylinux*.sh'
push:
tags:
- 'v*'
branches:
- main
- nerves-*
paths-ignore:
- 'assets/**'
- '*.md'
- '**/*.md'
- 'LICENSE*'
- 'examples/**'
- 'Makefile.win'
- 'cc_toolchain/**'
- 'c_src/windows_fix/windows_fix.cpp'
- 'checksum.exs'
- '.github/FUNDING.yml'
- '.github/workflows/linux-*'
- '.github/workflows/macos-*'
- '.github/workflows/windows-*'
- '.github/workflows/test-*.yml'
- '.github/*manylinux*.sh'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mix_compile:
runs-on: ubuntu-20.04
env:
MIX_ENV: prod
NERVES_PROJ_NAME: nerves_evision
OPENCV_VER: "4.10.0"
NERVES_LIVEBOOK_VER: "v0.12.1"
ELIXIR_VERSION: "1.16.1"
EVISION_PREFER_PRECOMPILED: "false"
strategy:
matrix:
include:
- pair:
target: rpi5
otp_version: "26"
- pair:
target: rpi4
otp_version: "26"
- pair:
target: rpi3a
otp_version: "26"
- pair:
target: rpi3
otp_version: "26"
- pair:
target: rpi2
otp_version: "26"
- pair:
target: rpi0
otp_version: "26"
- pair:
target: rpi
otp_version: "26"
- pair:
target: bbb
otp_version: "26"
- pair:
target: osd32mp1
otp_version: "26"
- pair:
target: npi_imx6ull
otp_version: "26"
- pair:
target: grisp2
otp_version: "26"
- pair:
target: mangopi_mq_pro
otp_version: "26"
- pair:
target: srhub
otp_version: "26"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp_version }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Install nerves and system dependencies
run: |
mkdir -p ~/.ssh
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCulZpVE/JdpWX53C35n45RSIMtaIIiTMnmRo5oDEMbyh0NnKI5byikkOvGnGLOO2KTlq4We+MF5iKx72B1Ixl8RY7L6Kc/h3R6jG4uOWBhw/WBhIebteJVYDzrlU8fHTewquWYT6tJ7v7g54Qe5vofsDeKBDqTJqJPlwNSxP8AjPZ0vQ4O4IhG0CXaDzU/G50sqzquKckgGWURLN9LcsA+kzciKJRhKw4Q7kpOiTNG/fzYxBpgpNrnyyr7bhj0jdOsg9KoG57aLSqbmEVCOyWa6yh6lOTp37S6ijBfQORxUu3I+6B04zUBSEvN4wgqslHU9pbIio8Szz1vbnlqsgO0tG1yqALfs6RVSjW81AujKefeH/8seE7q0yiHJXkE4tejIcewJT+2e6p/fP2pVSwyRqZ1bObtRUCMG3Pwdi0IpfsyBSa02Qc7eT9VB1WN7XD1vpfMDQ/nIWmoA40VkX3F3v5Mht5PZwVmlRyM8BrLtCYTreUP5xl6ZZCSX2IfOI8= nerves-ci-build' > ~/.ssh/id_rsa.pub
sudo apt-get update && sudo apt-get install -y build-essential automake autoconf pkg-config bc m4 unzip zip curl git libssl-dev libncurses5-dev python3 ca-certificates squashfs-tools ssh-askpass libmnl-dev
mix local.hex --force
mix local.rebar --force
- name: Cache mix packages
id: cache-mix-deps
uses: actions/cache@v4
with:
key: deps-${{ hashFiles('mix.lock') }}-${{ matrix.pair.otp_version }}-${{ env.ELIXIR_VERSION }}
path: |
./deps
- name: Get mix deps
if: steps.cache-mix-deps.outputs.cache-hit != 'true'
run: |
mix deps.get
- name: Cache OpenCV
id: cache-opencv
uses: actions/cache@v4
with:
key: opencv-${{ env.OPENCV_VER }}
path: |
./3rd_party
- name: Download OpenCV
if: steps.cache-opencv.outputs.cache-hit != 'true'
run: |
bash scripts/download_opencv.sh ${OPENCV_VER} 3rd_party/cache 3rd_party/opencv/
- name: Make a nerves project
run: |
mix archive.install hex nerves_bootstrap --force || true
wget -k https://github.com/fwup-home/fwup/releases/download/v1.10.1/fwup_1.10.1_amd64.deb -O ./fwup_1.10.1_amd64.deb
sudo dpkg -i ./fwup_1.10.1_amd64.deb
cd ../
git clone https://github.com/livebook-dev/nerves_livebook.git
cd nerves_livebook
git checkout "${NERVES_LIVEBOOK_VER}"
git checkout mix.exs
LINE="$(grep -n 'toolshed' mix.exs | awk -F: '{print $1+1}')"
head -n "${LINE}" mix.exs > mix.exs.tmp
echo ' {:evision, path: "../evision"},' >> mix.exs.tmp
tail -n "+${LINE}" mix.exs >> mix.exs.tmp
mv mix.exs.tmp mix.exs
sed -i 's/kino, "~> 0.7/kino, "~> 0.11/g' mix.exs
cat mix.exs
export MIX_TARGET=${{ matrix.pair.target }}
mix deps.get
mix deps.update nx
mix deps.update kino
cp -a ../evision/examples ./priv/evision_examples
sed -i 's/"welcome.livemd"\,/"welcome.livemd"\, "evision_examples",/g' lib/nerves_livebook/application.ex
export MAKE_BUILD_FLAGS="-j$(nproc)"
mix deps.compile
export PRIV_DIR="_build/${MIX_TARGET}_${MIX_ENV}/lib/evision/priv"
rm -rf "${PRIV_DIR}/include"
mix firmware
mkdir -p "/tmp/firmware"
cp "./_build/${MIX_TARGET}_${MIX_ENV}/nerves/images/nerves_livebook.fw" "/tmp/firmware/${NERVES_PROJ_NAME}_${{ matrix.pair.target }}_${MIX_ENV}.fw"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.NERVES_PROJ_NAME }}_${{ matrix.pair.target }}_${{ env.MIX_ENV }}.fw
path: /tmp/firmware/${{ env.NERVES_PROJ_NAME }}_${{ matrix.pair.target }}_${{ env.MIX_ENV }}.fw
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: /tmp/firmware/${{ env.NERVES_PROJ_NAME }}_${{ matrix.pair.target }}_${{ env.MIX_ENV }}.fw