Skip to content

Commit 1db9ba1

Browse files
author
Jonas Schievink
committed
Add CI
1 parent 08ebad9 commit 1db9ba1

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

.genignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.github/FUNDING.yml
1+
.github

.github/bors.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
delete_merged_branches = true
2+
status = [
3+
"test (stable)",
4+
"test (nightly)",
5+
]

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, staging, trying ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
TARGET: thumbv7em-none-eabihf
12+
HAL: nrf52840-hal = "0.12.0"
13+
14+
# NOTE if you change the `matrix` field or add/remove a job you'll need to update the list of jobs
15+
# in `.github/bors.toml
16+
jobs:
17+
test:
18+
strategy:
19+
matrix:
20+
rust:
21+
- stable
22+
- nightly
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 20
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
path: app-template
29+
- uses: actions-rs/toolchain@v1
30+
with:
31+
profile: minimal
32+
toolchain: ${{ matrix.rust }}
33+
override: true
34+
target: ${{ env.TARGET }}
35+
- name: debug
36+
run: cd app-template && git status && ls -la
37+
- name: Install cargo-generate
38+
run: cargo install cargo-generate --debug
39+
- name: Install flip-link
40+
run: cargo install flip-link --debug
41+
- name: Instantiate template
42+
run: |
43+
git config --global init.defaultbranch main
44+
git config --global user.email "[email protected]"
45+
git config --global user.name "CI"
46+
cargo generate --git app-template --name out
47+
sed -i 's/# some-hal.*/${{ env.HAL }}/' out/Cargo.toml
48+
- name: Build template
49+
working-directory: out
50+
run: cargo build --target ${{ env.TARGET }}

0 commit comments

Comments
 (0)