Skip to content

Commit 14a98a8

Browse files
Change to a workspace with two members, and add CI.
1 parent 2f98aad commit 14a98a8

17 files changed

+177
-104
lines changed

.github/bors.toml

-4
This file was deleted.

.github/workflows/build.yml

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
on:
2+
push:
3+
branches: [ main ]
4+
pull_request:
5+
6+
name: Build
7+
8+
jobs:
9+
# Build the workspace for a target architecture
10+
build:
11+
runs-on: ubuntu-24.04
12+
strategy:
13+
matrix:
14+
rust: [stable, 1.59]
15+
target:
16+
- armebv7r-none-eabi
17+
- armebv7r-none-eabihf
18+
- armv7r-none-eabi
19+
- armv7r-none-eabihf
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Install rust
24+
run: |
25+
rustup install ${{ matrix.rust }}
26+
rustup default ${{ matrix.rust }}
27+
rustup target add ${{ matrix.target }}
28+
- name: Build
29+
run: |
30+
cargo build --target ${{ matrix.target }}
31+
cargo build --target ${{ matrix.target }} --no-default-features
32+
cargo build --target ${{ matrix.target }} --all-features
33+
34+
# Build the workspace for the target architecture but using nightly to compile libcore
35+
build-tier3:
36+
runs-on: ubuntu-24.04
37+
strategy:
38+
matrix:
39+
target:
40+
- armebv7r-none-eabi
41+
- armebv7r-none-eabihf
42+
- armv7r-none-eabi
43+
- armv7r-none-eabihf
44+
- armv8r-none-eabihf
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
- name: Install rust
49+
run: |
50+
rustup install nightly
51+
rustup default nightly
52+
rustup component add rust-src --toolchain nightly
53+
- name: Build
54+
run: |
55+
cargo build --target ${{ matrix.target }} -Zbuild-std=core
56+
cargo build --target ${{ matrix.target }} -Zbuild-std=core --no-default-features
57+
cargo build --target ${{ matrix.target }} -Zbuild-std=core --all-features
58+
59+
# Gather all the above build jobs together for the purposes of getting an overall pass-fail
60+
build-all:
61+
runs-on: ubuntu-24.04
62+
needs: [build, build-tier3]
63+
steps:
64+
- run: /bin/true
65+
66+
# Build the docs for the workspace
67+
docs:
68+
runs-on: ubuntu-24.04
69+
strategy:
70+
matrix:
71+
rust: [stable, 1.59]
72+
target:
73+
- armebv7r-none-eabi
74+
- armebv7r-none-eabihf
75+
- armv7r-none-eabi
76+
- armv7r-none-eabihf
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v4
80+
- name: Install rust
81+
run: |
82+
rustup install ${{ matrix.rust }}
83+
rustup default ${{ matrix.rust }}
84+
rustup target add ${{ matrix.target }}
85+
- name: Build docs
86+
run: |
87+
cargo doc --target ${{ matrix.target }}
88+
cargo doc --target ${{ matrix.target }} --no-default-features
89+
cargo doc --target ${{ matrix.target }} --all-features
90+
91+
# Format the workspace
92+
fmt:
93+
runs-on: ubuntu-24.04
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v4
97+
- name: Install rust
98+
run: |
99+
rustup install stable
100+
rustup default stable
101+
- name: Format
102+
run: |
103+
cargo fmt --check
104+
105+
# Run clippy on the workpace
106+
clippy:
107+
runs-on: ubuntu-24.04
108+
strategy:
109+
matrix:
110+
rust: [stable, 1.59]
111+
target:
112+
- armebv7r-none-eabi
113+
- armebv7r-none-eabihf
114+
- armv7r-none-eabi
115+
- armv7r-none-eabihf
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@v4
119+
- name: Install rust
120+
run: |
121+
rustup install ${{ matrix.rust }}
122+
rustup default ${{ matrix.rust }}
123+
rustup target add ${{ matrix.target }}
124+
rustup component add clippy
125+
- name: Clippy
126+
run: |
127+
cargo clippy --target ${{ matrix.target }}
128+
cargo clippy --target ${{ matrix.target }} --no-default-features
129+
cargo clippy --target ${{ matrix.target }} --all-features
130+
131+
# Run the unit tests
132+
unit-test:
133+
runs-on: ubuntu-24.04
134+
steps:
135+
- name: Checkout
136+
uses: actions/checkout@v4
137+
- name: Install rust
138+
run: |
139+
rustup install stable
140+
rustup default stable
141+
- name: Run cargo test
142+
run: |
143+
cargo test --workspace --exclude panic-dcc
144+
145+
# Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail
146+
all:
147+
runs-on: ubuntu-24.04
148+
needs: [build-all, docs, fmt, unit-test] # not gating on clippy
149+
steps:
150+
- run: /bin/true

.travis.yml

-78
This file was deleted.

Cargo.toml

+5-19
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
[package]
2-
authors = [
3-
"The Cortex-R Team <cortex-r@teams.rust-embedded.org>",
4-
"Jorge Aparicio <jorge@japaric.io>",
5-
]
6-
categories = ["embedded", "hardware-support", "no-std"]
7-
description = "Debug Communication Channel (DCC) API"
8-
edition = "2018"
9-
keywords = ["ARM", "DCC"]
10-
license = "MIT OR Apache-2.0"
11-
name = "arm-dcc"
12-
repository = "https://github.com/rust-embedded/arm-dcc"
13-
rust-version = "1.59"
14-
version = "0.1.0"
15-
16-
[features]
17-
nop = []
18-
191
[workspace]
20-
members = ["panic"]
2+
members = [
3+
"panic-dcc",
4+
"arm-dcc",
5+
]
6+
resolver = "2"

LICENSE-MIT

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Copyright (c) 2018-2019 Jorge Aparicio
2+
Copyright (c) Rust Embedded Devices Working Group developers
23

34
Permission is hereby granted, free of charge, to any
45
person obtaining a copy of this software and associated

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
This project is developed and maintained by the [Cortex-R team][team].
88

9-
# Minimum Supported Rust Version (MSRV)
9+
## Minimum Supported Rust Version (MSRV)
1010

11-
This crate is guaranteed to compile on stable Rust 1.31.0 and up. It *might*
11+
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
1212
compile with older versions but that may change in any new patch release.
1313

1414
## License

arm-dcc/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
authors = [
3+
"The Cortex-R Team <cortex-r@teams.rust-embedded.org>",
4+
"Jorge Aparicio <jorge@japaric.io>",
5+
]
6+
categories = ["embedded", "hardware-support", "no-std"]
7+
description = "Debug Communication Channel (DCC) API"
8+
edition = "2018"
9+
keywords = ["ARM", "DCC"]
10+
license = "MIT OR Apache-2.0"
11+
name = "arm-dcc"
12+
repository = "https://github.com/rust-embedded/arm-dcc"
13+
rust-version = "1.59"
14+
version = "0.1.0"
15+
16+
[features]
17+
nop = []

src/lib.rs renamed to arm-dcc/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ pub fn write_str(string: &str) {
150150
write_all(string.as_bytes())
151151
}
152152

153+
#[cfg(target_arch = "arm")]
153154
core::arch::global_asm!(
154155
r#"
155156
// Routine for putting data in the DCC register

bin/armebv7r-none-eabi.a

-836 Bytes
Binary file not shown.

bin/armebv7r-none-eabihf.a

-836 Bytes
Binary file not shown.

bin/armv7r-none-eabi.a

-836 Bytes
Binary file not shown.

bin/armv7r-none-eabihf.a

-836 Bytes
Binary file not shown.

panic/Cargo.toml renamed to panic-dcc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ rust-version = "1.59"
1414
version = "0.1.0"
1515

1616
[dependencies]
17-
arm-dcc = { path = "..", version = "0.1.0" }
17+
arm-dcc = { path = "../arm-dcc", version = "0.1.0" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)