Skip to content

Commit

Permalink
feat: add caching to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jonapap committed May 7, 2023
1 parent 36e3acd commit 468b780
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cargo/config-ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
rustflags = [
"-C", "linker=arm-none-eabi-gcc",
"-C", "link-arg=-nostartfiles",
# For using with ACT
"-C", "link-arg=-L/root/gcc-arm-none-eabi-12.2.1-linux/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/lib/thumb/v7e-m+fp/hard/",
# For using with Github Actions
"-C", "link-arg=-L/home/runner/gcc-arm-none-eabi-12.2.1-linux/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/lib/thumb/v7e-m+fp/hard/",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x",
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ jobs:
with:
toolchain: stable
target: thumbv7em-none-eabihf
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
command: build
9 changes: 9 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ jobs:
components: clippy
toolchain: stable
target: thumbv7em-none-eabihf
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
with:
toolchain: stable
target: thumbv7em-none-eabihf
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Netlify CLI
run: npm install -g netlify-cli
- name: Build Documentation
Expand Down

0 comments on commit 468b780

Please sign in to comment.