Skip to content

Commit

Permalink
ci: create format, build and cargo test github actions
Browse files Browse the repository at this point in the history
Actually, it’s an update to GitHub Action

Signed-off-by: liyang <[email protected]>
  • Loading branch information
liyang8246 committed Oct 7, 2024
1 parent 3af2d86 commit 52c4c55
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 18 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on: [push,pull_request]

env:
CARGO_TERM_COLOR: always
# By default, RUSTFLAGS with “-D warnings” turns “asm_const” warnings into errors.
RUSTFLAGS:

jobs:
fmt:
name: Rustfmt all packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

build-allwinner-rt:
name: Build allwinner-rt
needs: fmt
runs-on: ubuntu-latest
strategy:
matrix:
TARGET: [riscv64imac-unknown-none-elf]
TOOLCHAIN: [nightly]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ MATRIX.TARGET }}
toolchain: ${{ MATRIX.TOOLCHAIN }}
- name: Run build
run: cargo build -p allwinner-rt --target ${{ MATRIX.TARGET }}

test-allwinner-hal:
name: Test allwinner-hal
needs: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Run tests
run: cargo test
18 changes: 0 additions & 18 deletions .github/workflows/fmt-and-test.yml

This file was deleted.

0 comments on commit 52c4c55

Please sign in to comment.