Skip to content

setup CI

setup CI #1

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
steps:
- uses: actions/checkout@v3
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test
windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v3
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test
release:
runs-on: ubuntu-latest
needs: [linux, windows]
steps:
- uses: actions/checkout@v3
- name: Setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --release
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish