Files
neolink/.github/workflows/build.yaml
T

53 lines
1.9 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
ubuntu:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-2019]
steps:
- uses: actions/checkout@v2
- if: runner.os == 'Linux'
name: apt install gstreamer
run: |
sudo apt update
sudo apt install -y libgstrtspserver-1.0-dev libgstreamer1.0-dev libgstreamer-plugins-bad1.0-dev libgstreamer-plugins-good1.0-dev
- if: runner.os == 'Windows'
name: Install Gstreamer
run: |
$curlgst = Start-Job -ScriptBlock { curl.exe -fsSL "https://gstreamer.freedesktop.org/data/pkg/windows/1.16.2/gstreamer-1.0-devel-msvc-x86_64-1.16.2.msi" -o gstreamer-1.0-devel.msi }
choco install -y --no-progress gstreamer
echo "Installing gstreamer-1.0-devel"
Wait-Job $curlgst
msiexec /i gstreamer-1.0-devel.msi /qn /norestart
echo "Updating Environment"
echo "::add-path::C:\gstreamer\1.0\x86_64\bin"
echo "::set-env name=GSTREAMER_1_0_ROOT_X86_64::C:\gstreamer\1.0\x86_64\"
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- uses: actions/upload-artifact@v2
with:
name: release-${{ matrix.os }}
path: "target/release/neolink*"