Skip to content

Switch to using GitHub Actions for CI #72

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

Merged
merged 12 commits into from
Aug 8, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
@@ -1,4 +1,4 @@
block_labels = ["needs-decision"]
delete_merged_branches = true
required_approvals = 1
status = ["continuous-integration/travis-ci/push"]
status = ["build"]
116 changes: 116 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI

on:
push:
branches: [master, staging, trying]
pull_request:

jobs:
build:
runs-on: ubuntu-20.04

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

strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.51.0 # Minimum supported rust version (MSRV)
include:
- rust: nightly
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
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

- 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-20.04

needs: [build]

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

steps:
- uses: actions/checkout@v2

- name: Cache installed binaries
uses: actions/cache@v1
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
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

19 changes: 8 additions & 11 deletions ci/asm/app/release.objdump
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm


Disassembly of section .text:

HardFault:
<HardFault>:
b #-0x4 <HardFault>

main:
trap
<main>:
b #-0x4 <main>

Reset:
<Reset>:
push {r7, lr}
mov r7, sp
bl #-0xa
trap

DefaultExceptionHandler:
b #-0x4 <DefaultExceptionHandler>

UsageFault:
<unknown>
<UsageFault>:
b #-0x4 <UsageFault>

HardFaultTrampoline:
<HardFaultTrampoline>:
mrs r0, msp
b #-0x18 <HardFault>
2 changes: 1 addition & 1 deletion ci/asm/app/release.vector_table
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm

Contents of section .vector_table:
0000 00000120 45000000 4f000000 51000000 ... E...O...Q...
Expand Down
6 changes: 3 additions & 3 deletions ci/exceptions/app/app.objdump
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm


Disassembly of section .text:

main:
<main>:
trap
trap

Reset:
<Reset>:
movw r1, #0x0
movw r0, #0x0
movt r1, #0x2000
Expand Down
2 changes: 1 addition & 1 deletion ci/exceptions/app/app.vector_table.objdump
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm

Contents of section .vector_table:
0000 00000120 45000000 7f000000 7f000000 ... E...........
Expand Down
32 changes: 0 additions & 32 deletions ci/install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion ci/logging/app4/dev.objdump
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
00000000 g O .log 00000001 Goodbye
00000001 g O .log 00000001 Hello, world!
00000001 .log 00000000 __log_warning_start__
00000001 g .log 00000000 __log_warning_start__
6 changes: 3 additions & 3 deletions ci/main/app/app.objdump
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm


Disassembly of section .text:

main:
<main>:
sub sp, #4
movs r0, #42
str r0, [sp]
b #-2 <main+0x8>
b #-4 <main+0x8>

Reset:
<Reset>:
push {r7, lr}
mov r7, sp
bl #-18
Expand Down
2 changes: 1 addition & 1 deletion ci/main/app4/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() -> ! {
// check that DATA is properly initialized
if ptr::read_volatile(&DATA) != 1 {
// this makes QEMU crash
asm!("BKPT" :::: "volatile");
asm!("BKPT");
}
}

Expand Down
4 changes: 2 additions & 2 deletions ci/memory-layout/app.text.objdump
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm


Disassembly of section .text:

Reset:
<Reset>:
sub sp, #4
movs r0, #42
str r0, [sp]
Expand Down
2 changes: 1 addition & 1 deletion ci/memory-layout/app.vector_table.objdump
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

app: file format ELF32-arm-little
app: file format elf32-littlearm

Contents of section .vector_table:
0000 00000120 09000000 ... ....
Loading