Skip to content

Build and Test

Build and Test #771

Workflow file for this run

name: Build and Test
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '21 2 * * 1-5' # every weekday at 2:21 AM UTC
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
- name: Build
run: cargo build --verbose
- name: Run unit tests
run: cargo test --verbose
build-ios:
name: Build for iOS targets
runs-on: macos-latest
strategy:
matrix:
target: [ x86_64-apple-ios, aarch64-apple-ios, aarch64-apple-ios-sim ]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --target ${{ matrix.target }}
build-android:
name: Build for Android targets
runs-on: ubuntu-latest
strategy:
matrix:
target: [ aarch64-linux-android, armv7-linux-androideabi, i686-linux-android ]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.target }}