Skip to content

v0.2.0

v0.2.0 #83

Workflow file for this run

name: Rust
on:
push:
pull_request:
release:
types: [released]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
id: "rust-toolchain"
- name: Install SDL2 #needed by display simulator
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev
- uses: actions/cache@v3
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
- run: cargo test --workspace --all-features
env:
RUST_BACKTRACE: 1
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
doc2readme:
runs-on: ubuntu-latest
container:
image: ghcr.io/msrd0/cargo-doc2readme
steps:
- uses: actions/checkout@v3
- run: cargo doc2readme --check -p embedded-sprites
cargo_publish:
if: ${{ github.event_name == 'release' }}
needs: [test, doc2readme]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: msrd0/cargo-publish-action@v1
with:
packages: embedded-sprites-proc-macro embedded-sprites
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}