Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 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
2 changes: 1 addition & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ block_labels = ["needs-decision"]
delete_merged_branches = true
required_approvals = 1
status = [
"build (1.62.0)",
"build (1.63.0)",
]
34 changes: 19 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,29 @@ on:

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 +42,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 +88,7 @@ jobs:
RUST_VERSION: ${{ matrix.rust }}

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

needs: [build]

Expand All @@ -94,7 +98,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
119 changes: 119 additions & 0 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: test CI

on:
workflow_dispatch: #Enables manual run of this workflow

jobs:
build:
runs-on: ubuntu-latest #Version 20.04 is no longer supported (see https://github.com/actions/runner-images/issues/11101)

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

strategy:
matrix:
rust:
- 1.63.0 #bump needed as otherwise the test script fails as package `cc v1.2.19` cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.62.0
- nightly-2022-08-12 #Need to fix nightly to be an old version.
#Needed because in ci/script.sh (the test script) some checks like "check presence of the `rust_begin_unwind` symbol" fail
#(I think due to compilation differences between when this was made to the new nightly).
#Since Rust 1.63.0 came out Aug 11 2022, we use nightly from the day after.
include:
- rust: nightly-2022-08-12
experimental: true

steps:
- uses: actions/checkout@v2


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

- name: Cache installed binaries
uses: actions/cache@v4 #v1 no longer supported: see https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
id: cache-bin
with:
path: ~/cache-bin
key: cache-bin

- name: Install mdbook
if: steps.cache-bin.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
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 untill 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: |
mkdir -p ~/cache-bin/arm_gcc
curl -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 \
| tar --strip-components=1 -C ~/cache-bin/arm_gcc -xj

curl -L https://github.com/japaric/qemu-bin/raw/master/14.04/qemu-system-arm-2.12.0 \
> ~/cache-bin/qemu-system-arm
chmod a+x ~/cache-bin/qemu-system-arm

- name: Copy installed binaries to cache directory
if: steps.cache-bin.outputs.cache-hit != 'true'
run: |
cp ~/.cargo/bin/* ~/cache-bin

- name: Put new bin directory into path
run: |
echo "$HOME/cache-bin" >> $GITHUB_PATH
echo "$HOME/cache-bin/arm_gcc/bin" >> $GITHUB_PATH

- name: Test
run: bash ci/script.sh
env:
RUST_VERSION: ${{ matrix.rust }}

deploy:
runs-on: ubuntu-latest #Version 20.04 is no longer supported (see https://github.com/actions/runner-images/issues/11101)

needs: [build]

if: github.event_name == 'push' && github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v2

- name: Cache installed binaries
uses: actions/cache@v4 #v1 no longer supported: see https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
id: cache-bin
with:
path: ~/cache-bin
key: cache-bin

- name: Put new bin directory into path
run: echo "$HOME/cache-bin" >> $GITHUB_PATH

- name: Build the book
run: mdbook build

- name: Deploy book
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book
force_orphan: true
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"
Loading