Skip to content

Commit

Permalink
Add Rust CI (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Tao Lu <[email protected]>
  • Loading branch information
yeetfield and Tao Lu authored Jan 28, 2023
1 parent 89be5d3 commit d5e04db
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci-py.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python test

on: [ push ]
on:
push:
paths:
- "ozy/**"
- ".github/workflows/ci-py.yaml"

jobs:
build:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/ci-rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust CI

on:
push:
paths:
- "rozy/**"
- ".github/workflows/ci-rust.yaml"

jobs:
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
asset: ozy-Linux-x86_64
runs-on: ubuntu-18.04
- target: x86_64-apple-darwin
asset: ozy-Darwin-x86_64
runs-on: macos-12

runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Format
run: cargo fmt --manifest-path rozy/Cargo.toml
- name: Clippy
run: cargo clippy --manifest-path rozy/Cargo.toml
- if: ${{ contains(matrix.target, '-musl') }}
run: sudo apt-get install musl-tools
- name: Test
run: cargo test --target=${{ matrix.target }} --manifest-path rozy/Cargo.toml

0 comments on commit d5e04db

Please sign in to comment.