Skip to content

Cargo: Update to 0.5.6 #145

Cargo: Update to 0.5.6

Cargo: Update to 0.5.6 #145

Workflow file for this run

name: Deploy unix
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1.0.1
with:
toolchain: stable
override: true
- name: Check style
run: cargo fmt -- --check
- name: Check tag with toml
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')}}
run: |
VERSION_TAG="$(git describe --tags --abbrev=0)"
echo "Version tag: $VERSION_TAG"
echo "Checking if toml is updated.."
grep ${VERSION_TAG:1} Cargo.toml
- name: Install libraries
run: |
sudo apt update
sudo apt install --yes libudev-dev
- name: Build
run: cargo build --verbose
build:
needs: check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
TARGET: aarch64-unknown-linux-gnu
- os: ubuntu-latest
TARGET: armv7-unknown-linux-gnueabihf
- os: ubuntu-latest
TARGET: x86_64-unknown-linux-gnu
steps:
- name: Building ${{ matrix.TARGET }}
run: echo "${{ matrix.TARGET }}"
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1.0.1
with:
toolchain: stable
target: ${{ matrix.TARGET }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target=${{ matrix.TARGET }}
- name: Rename
run: cp target/${{ matrix.TARGET }}/release/linux2rest${{ matrix.EXTENSION }} linux2rest-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
- uses: actions/upload-artifact@master
with:
name: linux2rest-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
path: linux2rest-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
- uses: svenstaro/upload-release-action@v2
name: Upload binaries to release
if: ${{ github.event_name == 'push' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: linux2rest-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
asset_name: linux2rest-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
tag: ${{ github.ref }}
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
overwrite: true