Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create format, build and cargo test github actions #12

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading