Cargo: Update to 0.6.2 #172
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy unix | |
on: [push, pull_request] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup toolchain for wasm | |
run: | | |
rustup update 1.79.0 | |
rustup default 1.79.0 | |
rustup set profile minimal | |
- 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 | |
FEATURES: "raspberry" | |
- os: ubuntu-latest | |
TARGET: armv7-unknown-linux-gnueabihf | |
FEATURES: "raspberry" | |
- os: ubuntu-latest | |
TARGET: x86_64-unknown-linux-gnu | |
FEATURES: "" | |
steps: | |
- name: Building ${{ matrix.TARGET }} | |
run: echo "${{ matrix.TARGET }}" | |
- uses: actions/checkout@master | |
- name: Setup toolchain for wasm | |
run: | | |
rustup update 1.79.0 | |
rustup default 1.79.0 | |
rustup set profile minimal | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --verbose --release --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }} | |
- 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 |