Skip to content

Commit 5d21ea4

Browse files
authored
Merge pull request #97 from Tomer-Eliahu/fix-ci
Fix CI
2 parents cfeaaa3 + 98244b1 commit 5d21ea4

File tree

11 files changed

+44
-42
lines changed

11 files changed

+44
-42
lines changed

.github/bors.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,36 @@
11
name: CI
22

33
on:
4+
workflow_dispatch: #Enables manual run of this workflow
45
push:
56
branches: [master, staging, trying]
67
pull_request:
78

89
jobs:
910
build:
10-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1112

1213
continue-on-error: ${{ matrix.experimental || false }}
1314

1415
strategy:
1516
matrix:
1617
rust:
17-
- 1.62.0
18-
- nightly
18+
- 1.63.0
19+
- nightly-2022-08-12 #Since Rust 1.63.0 came out Aug 11 2022, we use nightly from the day after.
1920
include:
20-
- rust: nightly
21+
- rust: nightly-2022-08-12
2122
experimental: true
2223

2324
steps:
2425
- uses: actions/checkout@v2
2526

26-
- name: Install Rust
27-
uses: actions-rs/toolchain@v1
28-
with:
29-
profile: minimal
30-
toolchain: ${{ matrix.rust }}
31-
override: true
32-
components: rustfmt, clippy, llvm-tools-preview
33-
target: thumbv7m-none-eabi
3427

3528
- name: Install Python dependencies
3629
run: |
3730
pip3 install --user python-dateutil linkchecker
3831
3932
- name: Cache installed binaries
40-
uses: actions/cache@v1
33+
uses: actions/cache@v4
4134
id: cache-bin
4235
with:
4336
path: ~/cache-bin
@@ -50,13 +43,25 @@ jobs:
5043
crate: mdbook
5144
version: latest
5245

46+
5347
- name: Install cargo-binutils
5448
if: steps.cache-bin.outputs.cache-hit != 'true'
5549
uses: actions-rs/[email protected]
5650
with:
5751
crate: cargo-binutils
5852
version: latest
5953

54+
#Moved until after installing mdbook and cargo-binutils because otherwise installing them fails
55+
#(note all GitHub runners come with the latest stable version of Rust pre-installed, and it is that version we want to install these).
56+
- name: Install Rust
57+
uses: actions-rs/toolchain@v1
58+
with:
59+
profile: minimal
60+
toolchain: ${{ matrix.rust }}
61+
override: true
62+
components: rustfmt, clippy, llvm-tools-preview
63+
target: thumbv7m-none-eabi
64+
6065
- name: Install arm-none-eabi-gcc and qemu
6166
if: steps.cache-bin.outputs.cache-hit != 'true'
6267
run: |
@@ -84,7 +89,7 @@ jobs:
8489
RUST_VERSION: ${{ matrix.rust }}
8590

8691
deploy:
87-
runs-on: ubuntu-20.04
92+
runs-on: ubuntu-latest
8893

8994
needs: [build]
9095

@@ -94,7 +99,7 @@ jobs:
9499
- uses: actions/checkout@v2
95100

96101
- name: Cache installed binaries
97-
uses: actions/cache@v1
102+
uses: actions/cache@v4
98103
id: cache-bin
99104
with:
100105
path: ~/cache-bin

ci/logging/app/.cargo/config renamed to ci/logging/app/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semiho
33
rustflags = ["-C", "link-arg=-Tlink.x"]
44

55
[build]
6-
target = "thumbv7m-none-eabi"
6+
target = "thumbv7m-none-eabi"

ci/logging/app2/.cargo/config renamed to ci/logging/app2/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ rustflags = [
66
]
77

88
[build]
9-
target = "thumbv7m-none-eabi"
9+
target = "thumbv7m-none-eabi"

ci/memory-layout/.cargo/config renamed to ci/memory-layout/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
rustflags = ["-C", "link-arg=-Tlink.x"]
33

44
[build]
5-
target = "thumbv7m-none-eabi"
5+
target = "thumbv7m-none-eabi"

ci/script.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ main() {
4242
diff app.o.nm \
4343
<(cargo nm -- $(pwd)/target/thumbv7m-none-eabi/debug/deps/app-*.o | grep '[0-9]* [^N] ')
4444

45+
4546
edition_check
4647

4748
popd
@@ -86,7 +87,7 @@ main() {
8687
popd
8788

8889
# NOTE(nightly) this will require nightly until core::arch::arm::udf is stabilized
89-
if [ $RUST_VERSION = nightly ]; then
90+
if [ $RUST_VERSION = nightly-2022-08-12 ]; then
9091
pushd app4
9192
cargo build
9293
qemu_check target/thumbv7m-none-eabi/debug/app
@@ -96,9 +97,11 @@ main() {
9697

9798
popd
9899

100+
101+
#FIXME: This fails on nightly-2022-08-12, but we need at least rust 1.63.0 or other things fail. This needs to be fixed manually.
99102
# # exception handling
100103
# NOTE(nightly) this will require nightly until core::arch::arm::udf is stabilized
101-
if [ $RUST_VERSION = nightly ]; then
104+
if [ $RUST_VERSION = FIXME ]; then
102105
pushd exceptions
103106

104107
# check that the disassembly matches
@@ -231,7 +234,7 @@ main() {
231234

232235
# # DMA
233236
# NOTE(nightly) this will require nightly until core::pin is stabilized (1.33)
234-
if [ $RUST_VERSION = nightly ]; then
237+
if [ $RUST_VERSION = nightly-2022-08-12 ]; then
235238
pushd dma
236239
cargo build --examples
237240
popd

ci/smallest-no-std/.cargo/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

ci/smallest-no-std/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build]
2+
target = "thumbv7m-none-eabi"

src/logging.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ optimizing the program. Let's check that.
133133

134134
> **PROTIP** You can set `target.thumbv7m-none-eabi.runner` to the long QEMU
135135
> command from before (`qemu-system-arm -cpu (..) -kernel`) in the Cargo
136-
> configuration file (`.cargo/conifg`) to have `cargo run` use that *runner* to
136+
> configuration file (`.cargo/config.toml`) to have `cargo run` use that *runner* to
137137
> execute the output binary.
138138
139139
``` console
140-
$ head -n2 .cargo/config
140+
$ head -n2 .cargo/config.toml
141141
```
142142

143143
``` toml
144-
{{#include ../ci/logging/app/.cargo/config:1:2}}
144+
{{#include ../ci/logging/app/.cargo/config.toml:1:2}}
145145
```
146146

147147
``` console
@@ -217,11 +217,11 @@ Before you run this you'll have to append `-Tlog.x` to the arguments passed to
217217
the linker. That can be done in the Cargo configuration file.
218218

219219
``` console
220-
$ cat .cargo/config
220+
$ cat .cargo/config.toml
221221
```
222222

223223
``` toml
224-
{{#include ../ci/logging/app2/.cargo/config}}
224+
{{#include ../ci/logging/app2/.cargo/config.toml}}
225225
```
226226

227227
Now you can run it! Since the output now has a binary format we'll pipe it

src/memory-layout.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ We have to tweak the linker process to make it use our linker script. This is do
174174
passing the `-C link-arg` flag to `rustc`. This can be done with `cargo-rustc` or
175175
`cargo-build`.
176176

177-
**IMPORTANT**: Make sure you have the `.cargo/config` file that was added at the
177+
**IMPORTANT**: Make sure you have the `.cargo/config.toml` file that was added at the
178178
end of the last section before running this command.
179179

180180
Using the `cargo-rustc` subcommand:
@@ -183,17 +183,17 @@ Using the `cargo-rustc` subcommand:
183183
$ cargo rustc -- -C link-arg=-Tlink.x
184184
```
185185

186-
Or you can set the rustflags in `.cargo/config` and continue using the
186+
Or you can set the rustflags in `.cargo/config.toml` and continue using the
187187
`cargo-build` subcommand. We'll do the latter because it better integrates with
188188
`cargo-binutils`.
189189

190190
``` console
191-
# modify .cargo/config so it has these contents
192-
$ cat .cargo/config
191+
# modify .cargo/config.toml so it has these contents
192+
$ cat .cargo/config.toml
193193
```
194194

195195
``` toml
196-
{{#include ../ci/memory-layout/.cargo/config}}
196+
{{#include ../ci/memory-layout/.cargo/config.toml}}
197197
```
198198

199199
The `[target.thumbv7m-none-eabi]` part says that these flags will only be used

src/smallest-no-std.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ Cargo invocation.
9898
``` console
9999
$ mkdir .cargo
100100

101-
$ # modify .cargo/config so it has these contents
102-
$ cat .cargo/config
101+
$ # modify .cargo/config.toml so it has these contents
102+
$ cat .cargo/config.toml
103103
```
104104

105105
``` toml
106-
{{#include ../ci/smallest-no-std/.cargo/config}}
106+
{{#include ../ci/smallest-no-std/.cargo/config.toml}}
107107
```
108108

109109
## eh_personality

0 commit comments

Comments
 (0)