Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
29 changes: 21 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ on:
tags:
- "v*"
pull_request:
workflow_dispatch: # needed to be in 'main', for any branch to manually 'Run Workflow' in GitHub UI.

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free disk space
- uses: actions/checkout@v5
- name: Clear some space # without this, even setting up the cache doesn't work!!!
run: |
.ci/free_disk_space.sh
- name: Add dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libudev-dev
sudo rm -rf /usr/share/dotnet/
- name: Set up cargo cache
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: true
with:
path: |
Expand All @@ -33,12 +30,28 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: List cargo cache contents
run: |
du -h ~/.cargo/bin/
du -h ~/.cargo/registry/index/
du -h ~/.cargo/registry/cache/
du -h ~/.cargo/git/db/
du -h target_ci/ | grep -v \.fingerprint
#
# 18G target_ci/
- name: Remove 'target_ci/debug' artefacts (eventually from cache)
run: |
rm -rf target_ci/debug

- name: CI
run: |
./ci.sh
test ! -d target_ci/debug || (echo -e >&2 "Seems 'target_ci/debug' got created:\n"; du -h -d 1 target_ci/debug)

# Check binary-size, stolen from https://github.com/tweedegolf/sequential-storage/blob/master/.github/workflows/ci.yaml
binary-size:
runs-on: ubuntu-latest
if: false
permissions:
actions: read
pull-requests: write
Expand Down
6 changes: 3 additions & 3 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ cargo batch \

cargo fmt --check --manifest-path ./host/Cargo.toml
cargo clippy --manifest-path ./host/Cargo.toml --features gatt,peripheral,central
cargo test --manifest-path ./host/Cargo.toml --lib -- --nocapture
cargo test --manifest-path ./host/Cargo.toml --no-run -- --nocapture
cargo test --manifest-path ./examples/tests/Cargo.toml --no-run -- --nocapture
cargo test --release --locked --manifest-path ./host/Cargo.toml --lib -- --nocapture
cargo test --release --locked --manifest-path ./host/Cargo.toml --no-run -- --nocapture
cargo test --release --locked --manifest-path ./examples/tests/Cargo.toml --no-run -- --nocapture