Skip to content

Fix CI #97

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
33af35f
Create test_ci.yml
Tomer-Eliahu Apr 23, 2025
3a0799c
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
2cc4425
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
6f47146
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
d6f8ffa
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
7d96aa4
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
fe88c4f
Rename config to config.toml
Tomer-Eliahu Apr 23, 2025
415c9fd
Rename config to config.toml
Tomer-Eliahu Apr 23, 2025
6878616
Rename config to config.toml
Tomer-Eliahu Apr 23, 2025
22baafe
Rename config to config.toml
Tomer-Eliahu Apr 23, 2025
719ee16
Update config.toml to have rust flags
Tomer-Eliahu Apr 23, 2025
878dae7
Update config.toml
Tomer-Eliahu Apr 23, 2025
7b9e814
Update config.toml
Tomer-Eliahu Apr 23, 2025
a842be4
Update script.sh
Tomer-Eliahu Apr 23, 2025
f23b97d
Update script.sh
Tomer-Eliahu Apr 23, 2025
c5cc1ec
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
0880b48
Update test_ci.yml
Tomer-Eliahu Apr 23, 2025
c5a1348
Update script.sh
Tomer-Eliahu Apr 23, 2025
2e1ade0
Update script.sh
Tomer-Eliahu Apr 23, 2025
abba9bc
Update ci.yaml
Tomer-Eliahu Apr 23, 2025
a61df6d
Update bors.toml
Tomer-Eliahu Apr 23, 2025
cb05182
Delete .github/bors.toml
Tomer-Eliahu Apr 24, 2025
c1eb017
Update ci.yaml (added on workflow_dispatch to enable manual run)
Tomer-Eliahu Apr 24, 2025
2c7827a
Delete .github/workflows/test_ci.yml
Tomer-Eliahu Apr 24, 2025
22733be
changed config to config.toml
Tomer-Eliahu Apr 24, 2025
98244b1
Update logging.md (fixed typo)
Tomer-Eliahu Apr 24, 2025
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
6 changes: 0 additions & 6 deletions .github/bors.toml

This file was deleted.

35 changes: 20 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,36 @@
name: CI

on:
workflow_dispatch: #Enables manual run of this workflow
push:
branches: [master, staging, trying]
pull_request:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

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

strategy:
matrix:
rust:
- 1.62.0
- nightly
- 1.63.0
- nightly-2022-08-12 #Since Rust 1.63.0 came out Aug 11 2022, we use nightly from the day after.
include:
- rust: nightly
- rust: nightly-2022-08-12
experimental: true

steps:
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy, llvm-tools-preview
target: thumbv7m-none-eabi

- name: Install Python dependencies
run: |
pip3 install --user python-dateutil linkchecker

- name: Cache installed binaries
uses: actions/cache@v1
uses: actions/cache@v4
id: cache-bin
with:
path: ~/cache-bin
Expand All @@ -50,13 +43,25 @@ jobs:
crate: mdbook
version: latest


- name: Install cargo-binutils
if: steps.cache-bin.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest

#Moved until after installing mdbook and cargo-binutils because otherwise installing them fails
#(note all GitHub runners come with the latest stable version of Rust pre-installed, and it is that version we want to install these).
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy, llvm-tools-preview
target: thumbv7m-none-eabi

- name: Install arm-none-eabi-gcc and qemu
if: steps.cache-bin.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -84,7 +89,7 @@ jobs:
RUST_VERSION: ${{ matrix.rust }}

deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

needs: [build]

Expand All @@ -94,7 +99,7 @@ jobs:
- uses: actions/checkout@v2

- name: Cache installed binaries
uses: actions/cache@v1
uses: actions/cache@v4
id: cache-bin
with:
path: ~/cache-bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semiho
rustflags = ["-C", "link-arg=-Tlink.x"]

[build]
target = "thumbv7m-none-eabi"
target = "thumbv7m-none-eabi"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ rustflags = [
]

[build]
target = "thumbv7m-none-eabi"
target = "thumbv7m-none-eabi"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
rustflags = ["-C", "link-arg=-Tlink.x"]

[build]
target = "thumbv7m-none-eabi"
target = "thumbv7m-none-eabi"
9 changes: 6 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ main() {
diff app.o.nm \
<(cargo nm -- $(pwd)/target/thumbv7m-none-eabi/debug/deps/app-*.o | grep '[0-9]* [^N] ')


edition_check

popd
Expand Down Expand Up @@ -86,7 +87,7 @@ main() {
popd

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

popd


#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.
# # exception handling
# NOTE(nightly) this will require nightly until core::arch::arm::udf is stabilized
if [ $RUST_VERSION = nightly ]; then
if [ $RUST_VERSION = FIXME ]; then
pushd exceptions

# check that the disassembly matches
Expand Down Expand Up @@ -231,7 +234,7 @@ main() {

# # DMA
# NOTE(nightly) this will require nightly until core::pin is stabilized (1.33)
if [ $RUST_VERSION = nightly ]; then
if [ $RUST_VERSION = nightly-2022-08-12 ]; then
pushd dma
cargo build --examples
popd
Expand Down
2 changes: 0 additions & 2 deletions ci/smallest-no-std/.cargo/config

This file was deleted.

2 changes: 2 additions & 0 deletions ci/smallest-no-std/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "thumbv7m-none-eabi"
10 changes: 5 additions & 5 deletions src/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ optimizing the program. Let's check that.

> **PROTIP** You can set `target.thumbv7m-none-eabi.runner` to the long QEMU
> command from before (`qemu-system-arm -cpu (..) -kernel`) in the Cargo
> configuration file (`.cargo/conifg`) to have `cargo run` use that *runner* to
> configuration file (`.cargo/config.toml`) to have `cargo run` use that *runner* to
> execute the output binary.

``` console
$ head -n2 .cargo/config
$ head -n2 .cargo/config.toml
```

``` toml
{{#include ../ci/logging/app/.cargo/config:1:2}}
{{#include ../ci/logging/app/.cargo/config.toml:1:2}}
```

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

``` console
$ cat .cargo/config
$ cat .cargo/config.toml
```

``` toml
{{#include ../ci/logging/app2/.cargo/config}}
{{#include ../ci/logging/app2/.cargo/config.toml}}
```

Now you can run it! Since the output now has a binary format we'll pipe it
Expand Down
10 changes: 5 additions & 5 deletions src/memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ We have to tweak the linker process to make it use our linker script. This is do
passing the `-C link-arg` flag to `rustc`. This can be done with `cargo-rustc` or
`cargo-build`.

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

Using the `cargo-rustc` subcommand:
Expand All @@ -183,17 +183,17 @@ Using the `cargo-rustc` subcommand:
$ cargo rustc -- -C link-arg=-Tlink.x
```

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

``` console
# modify .cargo/config so it has these contents
$ cat .cargo/config
# modify .cargo/config.toml so it has these contents
$ cat .cargo/config.toml
```

``` toml
{{#include ../ci/memory-layout/.cargo/config}}
{{#include ../ci/memory-layout/.cargo/config.toml}}
```

The `[target.thumbv7m-none-eabi]` part says that these flags will only be used
Expand Down
6 changes: 3 additions & 3 deletions src/smallest-no-std.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ Cargo invocation.
``` console
$ mkdir .cargo

$ # modify .cargo/config so it has these contents
$ cat .cargo/config
$ # modify .cargo/config.toml so it has these contents
$ cat .cargo/config.toml
```

``` toml
{{#include ../ci/smallest-no-std/.cargo/config}}
{{#include ../ci/smallest-no-std/.cargo/config.toml}}
```

## eh_personality
Expand Down
Loading