Skip to content

Commit

Permalink
ci: add CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Apr 30, 2024
1 parent 1b33cdd commit 902731f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI build

on:
push:
branches: ["main"]
paths-ignore:
- "*.md"
pull_request:
branches: ["main"]
paths-ignore:
- "*.md"

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use nightly Rust
run: |
rustup default nightly
rustup target add riscv32imac-unknown-none-elf
rustup target add riscv32imafc-unknown-none-elf
rustup target add riscv32i-unknown-none-elf
- name: Fetch Deps
run: |
mkdir -p ../ch32-data/build/
cd ../ch32-data/build/
git clone https://github.com/ch32-rs/ch32-metapac.git
- name: Build Only
run: |
./ci.sh
8 changes: 8 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -ex
set -o pipefail

for d in $(find examples -type d -depth 1); do
(cd $d && cargo build --release)
done

0 comments on commit 902731f

Please sign in to comment.