Skip to content

Commit

Permalink
Merge pull request #5 from Systemscape/add-ci
Browse files Browse the repository at this point in the history
Add CI Workflow first version
  • Loading branch information
JuliDi authored Jun 28, 2024
2 parents 9d9e496 + bcefec7 commit b809b6b
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Compile and Test

on:
pull_request:
merge_group:
workflow_dispatch:
push:
tags:
- '*'

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '--deny warnings'

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: cargo fmt -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: cargo clippy --no-deps -- -Dwarnings

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy, rust-src
- run: cargo test

test-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: >
cargo build
--target thumbv7m-none-eabi
--all-features
release:
runs-on: ubuntu-latest
steps:
- name: version
run: echo "version=$(cargo pkgid | cut -d '#' -f2)" >> $GITHUB_OUTPUT
id: version
- name: Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
#body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit b809b6b

Please sign in to comment.