Browse Source

Merge pull request #210 from stm32-rs/use-gh-actions-for-ci

CI via GitHub actions
Daniel Egger 4 years ago
parent
commit
2238dd0ecc
3 changed files with 33 additions and 16 deletions
  1. 32 0
      .github/workflows/ci.yml
  2. 0 16
      .travis.yml
  3. 1 0
      README.md

+ 32 - 0
.github/workflows/ci.yml

@@ -0,0 +1,32 @@
+on: [push, pull_request]
+
+name: Continuous integration
+
+jobs:
+  ci:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        mcu: 
+          - stm32f100
+          - stm32f101
+          - stm32f103
+        rust:
+          - stable
+        include:
+          - rust: nightly
+            mcu: stm32f103
+            experimental: true
+
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: ${{ matrix.rust }}
+          target: thumbv7m-none-eabi
+          override: true
+      - uses: actions-rs/cargo@v1
+        with:
+          command: build
+          args: --features=${{ matrix.mcu }}

+ 0 - 16
.travis.yml

@@ -1,16 +0,0 @@
-language: rust
-rust:
-  - stable
-  - nightly
-cache: cargo
-env:
-- MCU=stm32f103
-- MCU=stm32f101
-- MCU=stm32f100
-matrix:
-  allow_failures:
-    - rust: nightly
-  fast_finish: true
-script:
-  - rustup target add thumbv7m-none-eabi
-  - cargo build --features=$MCU

+ 1 - 0
README.md

@@ -4,6 +4,7 @@
 
 [HAL]: https://crates.io/crates/embedded-hal
 
+[![Continuous integration](https://github.com/stm32-rs/stm32f1xx-hal/workflows/Continuous%20integration/badge.svg)](https://github.com/stm32-rs/stm32f1xx-hal)
 [![crates.io](https://img.shields.io/crates/v/stm32f1xx-hal.svg)](https://crates.io/crates/stm32f1xx-hal)
 [![Released API docs](https://docs.rs/stm32f1xx-hal/badge.svg)](https://docs.rs/stm32f1xx-hal)