Fix CI #90
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master, staging, trying] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental || false }} | |
strategy: | |
matrix: | |
rust: | |
- 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-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 | |
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 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: | | |
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 | |
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 | |
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 |