Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Browse files Browse the repository at this point in the history
… fixup! fixup! fixup! fixup! fixup! fixup! fixup! Allow building all the slides at once
  • Loading branch information
tdittr committed Aug 13, 2024
1 parent eb6f90f commit dbeac33
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 23 deletions.
49 changes: 49 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 2
updates:
- package-ecosystem: "cargo"
directories:
- "/exercises/1-course-introduction/1-introduction/1-setup-your-installation"
- "/exercises/1-course-introduction/1-introduction/2-embedded"
- "/exercises/2-foundations-of-rust/1-basic-syntax/1-basic-syntax"
- "/exercises/2-foundations-of-rust/2-ownership-and-references/1-move-semantics"
- "/exercises/2-foundations-of-rust/2-ownership-and-references/2-borrowing"
- "/exercises/2-foundations-of-rust/3-advanced-syntax/1-error-propagation"
- "/exercises/2-foundations-of-rust/3-advanced-syntax/2-error-handling"
- "/exercises/2-foundations-of-rust/3-advanced-syntax/3-slices"
- "/exercises/2-foundations-of-rust/3-advanced-syntax/4-ring-buffer"
- "/exercises/2-foundations-of-rust/3-advanced-syntax/5-boxed-data"
- "/exercises/2-foundations-of-rust/4-traits-and-generics/1-local-storage-vec"
- "/exercises/2-foundations-of-rust/5-closures-and-dynamic-dispatch/1-config-reader"
- "/exercises/3-crate-engineering/1-crate-engineering/1-my-serde-app"
- "/exercises/3-crate-engineering/1-crate-engineering/3-bsn"
- "/exercises/3-crate-engineering/1-crate-engineering/4-3d-printer"
- "/exercises/3-crate-engineering/1-crate-engineering/5-fizzbuzz"
- "/exercises/4-multitasking/2-parallel-multitasking/1-tf-idf"
- "/exercises/4-multitasking/2-parallel-multitasking/2-mutex"
- "/exercises/4-multitasking/3-asynchronous-multitasking/0-sync-to-async"
- "/exercises/4-multitasking/3-asynchronous-multitasking/1-async-channels"
- "/exercises/4-multitasking/3-asynchronous-multitasking/2-async-chat"
- "/exercises/4-multitasking/3-asynchronous-multitasking/3-measurement-data-sink"
- "/exercises/4-multitasking/3-asynchronous-multitasking/3-measurement-data-sink/node-simulator"
- "/exercises/6-rust-for-systems-programming/1-foreign-function-interface/1-crc-in-c"
- "/exercises/6-rust-for-systems-programming/1-foreign-function-interface/2-crc-in-rust"
- "/exercises/6-rust-for-systems-programming/1-foreign-function-interface/3-tweetnacl-bindgen"
- "/exercises/7-rust-for-data-science/1-rust-from-python/1-hello-world"
- "/exercises/7-rust-for-data-science/1-rust-from-python/2-strompy"
- "/exercises/8-embedded/1-embedded-ecosystem/1-lsm303agr-id"
- "/exercises/8-embedded/2-portable-drivers/1-lsm303agr-driver"
- "/exercises/8-embedded/3-async-on-embedded/1-compass"
- "/exercises/8-embedded/4-embassy-framework/1-embassy-project"
schedule:
interval: "weekly"
day: "thursday"
- package-ecosystem: "npm"
directory: "/slides/"
schedule:
interval: "weekly"
day: "thursday"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "thursday"
36 changes: 36 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: checks

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
branches-ignore:
- 'release/**'
merge_group:
branches:
- main
workflow_call: {}

jobs:
check:
name: "Check everything still builds"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install mdbook
run: |
wget --no-verbose "https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz"
tar -xzf mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz
sudo mv mdbook /usr/bin/
- name: Run checks
run: ./check.sh
- name: Build book and slides
run: ./build-all.sh ${{github.event.repository.name}}
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Based on: https://sli.dev/guide/hosting

on:
push:
branches:
- main
- gh-pages-action

permissions:
contents: read
Expand Down
11 changes: 11 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -eo pipefail

TARGETS=$(find exercises/ -name Cargo.toml | sort)

echo "Check all examples are covered by dependabot"
for target in $TARGETS;
do
DIRNAME=$(dirname "$target")
grep -Fxq " - \"/$DIRNAME\"" .github/dependabot.yml || echo "Missing entry in dependabot.yml: $DIRNAME" 1>&2
done
20 changes: 0 additions & 20 deletions slides/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,24 @@
"scripts": {
"build": "slidev build",
"dev-1_1": "slidev 1_1-introduction.md",
"build-1_1": "slidev build --out dist/1_1 --base /slides/1_1/ 1_1-introduction.md",
"dev-2_1": "slidev 2_1-basic-syntax.md",
"build-2_1": "slidev build --out dist/2_1 --base /slides/2_1/ 2_1-basic-syntax.md",
"dev-2_2": "slidev 2_2-ownership-and-references.md",
"build-2_2": "slidev build --out dist/2_2 --base /slides/2_2/ 2_2-ownership-and-references.md",
"dev-2_3": "slidev 2_3-advanced-syntax.md",
"build-2_3": "slidev build --out dist/2_3 --base /slides/2_3/ 2_3-advanced-syntax.md",
"dev-2_4": "slidev 2_4-traits-and-generics.md",
"build-2_4": "slidev build --out dist/2_4 --base /slides/2_4/ 2_4-traits-and-generics.md",
"dev-2_5": "slidev 2_5-closures-and-dynamic-dispatch.md",
"build-2_5": "slidev build --out dist/2_5 --base /slides/2_5/ 2_5-closures-and-dynamic-dispatch.md",
"dev-2_6": "slidev 2_6-interior-mutability.md",
"build-2_6": "slidev build --out dist/2_6 --base /slides/2_6/ 2_6-interior-mutability.md",
"dev-3_1": "slidev 3_1-crate-engineering.md",
"build-3_1": "slidev build --out dist/3_1 --base /slides/3_1/ 3_1-crate-engineering.md",
"dev-4_1": "slidev 4_1-introduction-to-multitasking.md",
"build-4_1": "slidev build --out dist/4_1 --base /slides/4_1/ 4_1-introduction-to-multitasking.md",
"dev-4_2": "slidev 4_2-parallel-multitasking.md",
"build-4_2": "slidev build --out dist/4_2 --base /slides/4_2/ 4_2-parallel-multitasking.md",
"dev-4_3": "slidev 4_3-asynchronous-multitasking.md",
"build-4_3": "slidev build --out dist/4_3 --base /slides/4_3/ 4_3-asynchronous-multitasking.md",
"dev-5_1": "slidev 5_1-rust-for-web.md",
"build-5_1": "slidev build --out dist/5_1 --base /slides/5_1/ 5_1-rust-for-web.md",
"dev-6_1": "slidev 6_1-foreign-function-interface.md",
"build-6_1": "slidev build --out dist/6_1 --base /slides/6_1/ 6_1-foreign-function-interface.md",
"dev-7_1": "slidev 7_1-rust-from-python.md",
"build-7_1": "slidev build --out dist/7_1 --base /slides/7_1/ 7_1-rust-from-python.md",
"dev-8_1": "slidev 8_1-embedded-ecosystem.md",
"build-8_1": "slidev build --out dist/8_1 --base /slides/8_1/ 8_1-embedded-ecosystem.md",
"dev-8_2": "slidev 8_2-portable-drivers.md",
"build-8_2": "slidev build --out dist/8_2 --base /slides/8_2/ 8_2-portable-drivers.md",
"dev-8_3": "slidev 8_3-async-on-embedded.md",
"build-8_3": "slidev build --out dist/8_3 --base /slides/8_3/ 8_3-async-on-embedded.md",
"dev-8_4": "slidev 8_4-embassy-framework.md",
"build-8_4": "slidev build --out dist/8_4 --base /slides/8_4/ 8_4-embassy-framework.md",
"build-Y": "slidev build --out dist/Y --base /slides/Y/ Y-ecosystem-and-tooling.md",
"dev-Y": "slidev Y-ecosystem-and-tooling.md",
"build-Z": "slidev build --out dist/Z --base /slides/Z/ Z-wrap-up.md",
"dev-Z": "slidev Z-wrap-up.md",
"_": ""
}
Expand Down

0 comments on commit dbeac33

Please sign in to comment.