Skip to content

Commit 4dfdf69

Browse files
bors[bot]robyoungadamgreig
authored
Merge #72
72: Switch to using GitHub Actions for CI r=adamgreig a=robyoung I have tried to keep it functionally identical to the travis workflow. This is a bit tricky for me to test. There are some minor changes though. - Added MSRV of 1.51.0 - I just picked a version out of thin air here. - I could not see an easy way of preventing master branch runs for PRs that have passed so this should run on all. - For deploying to github pages I'm using a 3rd party action. It looks reasonable and just uses the default repo scoped token. Co-authored-by: Rob Young <[email protected]> Co-authored-by: Adam Greig <[email protected]>
2 parents 4d10be2 + 8847806 commit 4dfdf69

File tree

16 files changed

+237
-173
lines changed

16 files changed

+237
-173
lines changed

.github/bors.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
block_labels = ["needs-decision"]
22
delete_merged_branches = true
33
required_approvals = 1
4-
status = ["continuous-integration/travis-ci/push"]
4+
status = [
5+
"build (stable)",
6+
"build (1.51.0)",
7+
]

.github/workflows/ci.yaml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, staging, trying]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
12+
continue-on-error: ${{ matrix.experimental || false }}
13+
14+
strategy:
15+
matrix:
16+
rust:
17+
- stable
18+
- beta
19+
- nightly
20+
- 1.51.0 # Minimum supported rust version (MSRV)
21+
include:
22+
- rust: nightly
23+
experimental: true
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- name: Install Rust
29+
uses: actions-rs/toolchain@v1
30+
with:
31+
profile: minimal
32+
toolchain: ${{ matrix.rust }}
33+
override: true
34+
components: rustfmt, clippy, llvm-tools-preview
35+
target: thumbv7m-none-eabi
36+
37+
- name: Install Python dependencies
38+
run: |
39+
pip3 install --user python-dateutil linkchecker
40+
41+
- name: Cache installed binaries
42+
uses: actions/cache@v1
43+
id: cache-bin
44+
with:
45+
path: ~/cache-bin
46+
key: cache-bin
47+
48+
- name: Install mdbook
49+
if: steps.cache-bin.outputs.cache-hit != 'true'
50+
uses: actions-rs/[email protected]
51+
with:
52+
crate: mdbook
53+
version: latest
54+
55+
- name: Install cargo-binutils
56+
if: steps.cache-bin.outputs.cache-hit != 'true'
57+
uses: actions-rs/[email protected]
58+
with:
59+
crate: cargo-binutils
60+
version: latest
61+
62+
- name: Install arm-none-eabi-gcc and qemu
63+
if: steps.cache-bin.outputs.cache-hit != 'true'
64+
run: |
65+
mkdir -p ~/cache-bin/arm_gcc
66+
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 \
67+
| tar --strip-components=1 -C ~/cache-bin/arm_gcc -xj
68+
69+
curl -L https://github.com/japaric/qemu-bin/raw/master/14.04/qemu-system-arm-2.12.0 \
70+
> ~/cache-bin/qemu-system-arm
71+
chmod a+x ~/cache-bin/qemu-system-arm
72+
73+
- name: Copy installed binaries to cache directory
74+
if: steps.cache-bin.outputs.cache-hit != 'true'
75+
run: |
76+
cp ~/.cargo/bin/* ~/cache-bin
77+
78+
- name: Put new bin directory into path
79+
run: |
80+
echo "$HOME/cache-bin" >> $GITHUB_PATH
81+
echo "$HOME/cache-bin/arm_gcc/bin" >> $GITHUB_PATH
82+
83+
- name: Test
84+
run: bash ci/script.sh
85+
env:
86+
RUST_VERSION: ${{ matrix.rust }}
87+
88+
deploy:
89+
runs-on: ubuntu-20.04
90+
91+
needs: [build]
92+
93+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
94+
95+
steps:
96+
- uses: actions/checkout@v2
97+
98+
- name: Cache installed binaries
99+
uses: actions/cache@v1
100+
id: cache-bin
101+
with:
102+
path: ~/cache-bin
103+
key: cache-bin
104+
105+
- name: Put new bin directory into path
106+
run: echo "$HOME/cache-bin" >> $GITHUB_PATH
107+
108+
- name: Build the book
109+
run: mdbook build
110+
111+
- name: Deploy book
112+
uses: peaceiris/actions-gh-pages@v3
113+
with:
114+
github_token: ${{ secrets.GITHUB_TOKEN }}
115+
publish_dir: book
116+
force_orphan: true

.travis.yml

-30
This file was deleted.

ci/asm/app/release.objdump

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11

2-
app: file format ELF32-arm-little
2+
app: file format elf32-littlearm
33

44

55
Disassembly of section .text:
66

7-
HardFault:
7+
<HardFault>:
88
b #-0x4 <HardFault>
99

10-
main:
11-
trap
10+
<main>:
11+
b #-0x4 <main>
1212

13-
Reset:
13+
<Reset>:
1414
push {r7, lr}
1515
mov r7, sp
1616
bl #-0xa
1717
trap
1818

19-
DefaultExceptionHandler:
20-
b #-0x4 <DefaultExceptionHandler>
21-
22-
UsageFault:
23-
<unknown>
19+
<UsageFault>:
20+
b #-0x4 <UsageFault>
2421

25-
HardFaultTrampoline:
22+
<HardFaultTrampoline>:
2623
mrs r0, msp
2724
b #-0x18 <HardFault>

ci/asm/app/release.vector_table

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
app: file format ELF32-arm-little
2+
app: file format elf32-littlearm
33

44
Contents of section .vector_table:
55
0000 00000120 45000000 4f000000 51000000 ... E...O...Q...

0 commit comments

Comments
 (0)