Commit 14d64746 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

setup CI

parent cad6cb73
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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment