Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Downloading files in rust #123

Downloading files in rust

Downloading files in rust #123

name: Lint, build and test
on:
pull_request:
jobs:
lint:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-linux-android
- os: macos-latest
target: x86_64-apple-ios
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
build:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
build-android:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: aarch64-linux-android
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-ndk
- uses: actions-rs/cargo@v1
with:
command: ndk
args: --target aarch64-linux-android build
build-ios:
needs: lint
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-apple-ios
default: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: make dircache
- uses: actions-rs/cargo@v1
with:
command: test