summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-10-02 22:24:59 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-10-02 23:30:12 +0200
commit753781a2639c3505ab046cb48acb6473b84b214b (patch)
tree48f22ea348ae8705c8b1341efb9f236b4d5ae2ff
parent73208d524843ca451b4cbfdb06e35f1b85290f4c (diff)
downloadembassy-753781a2639c3505ab046cb48acb6473b84b214b.zip
Build docs in CI
-rw-r--r--.github/workflows/doc.yml85
-rw-r--r--.github/workflows/rust.yml2
-rw-r--r--embassy-embedded-hal/Cargo.toml2
-rw-r--r--embassy-executor/Cargo.toml2
-rw-r--r--embassy-usb/Cargo.toml2
5 files changed, 89 insertions, 4 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
new file mode 100644
index 00000000..349ca404
--- /dev/null
+++ b/.github/workflows/doc.yml
@@ -0,0 +1,85 @@
+name: Docs
+
+on:
+ push:
+ branches: [master]
+
+env:
+ BUILDER_THREADS: '2'
+
+jobs:
+ doc:
+ runs-on: ubuntu-latest
+
+ # Since stm32 crates take SO LONG to build, we split them
+ # into a separate job. This way it doesn't slow down updating
+ # the rest.
+ strategy:
+ matrix:
+ crates:
+ - stm32
+ - rest
+
+ # This will ensure at most one doc build job is running at a time
+ # (for stm32 and non-stm32 independently).
+ # If another job is already running, the new job will wait.
+ # If another job is already waiting, it'll be canceled.
+ # This means some commits will be skipped, but that's fine because
+ # we only care that the latest gets built.
+ concurrency: doc-${{ matrix.crates }}
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Install Rust targets
+ run: |
+ rustup target add x86_64-unknown-linux-gnu
+ rustup target add wasm32-unknown-unknown
+ rustup target add thumbv6m-none-eabi
+ rustup target add thumbv7m-none-eabi
+ rustup target add thumbv7em-none-eabi
+ rustup target add thumbv7em-none-eabihf
+ rustup target add thumbv8m.base-none-eabi
+ rustup target add thumbv8m.main-none-eabi
+ rustup target add thumbv8m.main-none-eabihf
+
+ - name: Install docserver
+ run: |
+ wget -q -O /usr/local/bin/builder "https://github.com/embassy-rs/docserver/releases/download/v0.3/builder"
+ chmod +x /usr/local/bin/builder
+
+ - name: build-stm32
+ if: ${{ matrix.crates=='stm32' }}
+ run: |
+ mkdir crates
+ builder ./embassy-stm32 crates/embassy-stm32/git.zup
+ builder ./stm32-metapac crates/stm32-metapac/git.zup
+
+ - name: build-rest
+ if: ${{ matrix.crates=='rest' }}
+ run: |
+ mkdir crates
+ builder ./embassy-boot/boot crates/embassy-boot/git.zup
+ builder ./embassy-boot/nrf crates/embassy-boot-nrf/git.zup
+ builder ./embassy-boot/stm32 crates/embassy-boot-stm32/git.zup
+ builder ./embassy-cortex-m crates/embassy-cortex-m/git.zup
+ builder ./embassy-embedded-hal crates/embassy-embedded-hal/git.zup
+ builder ./embassy-executor crates/embassy-executor/git.zup
+ builder ./embassy-futures crates/embassy-futures/git.zup
+ builder ./embassy-lora crates/embassy-lora/git.zup
+ builder ./embassy-net crates/embassy-net/git.zup
+ builder ./embassy-nrf crates/embassy-nrf/git.zup
+ builder ./embassy-rp crates/embassy-rp/git.zup
+ builder ./embassy-sync crates/embassy-sync/git.zup
+ builder ./embassy-usb crates/embassy-usb/git.zup
+ builder ./embassy-usb-driver crates/embassy-usb-driver/git.zup
+
+ - name: upload
+ run: |
+ mkdir -p ~/.kube
+ echo "${{secrets.KUBECONFIG}}" > ~/.kube/config
+ POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
+ kubectl cp crates $POD:/data
+
+ \ No newline at end of file
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index d2e8e316..b93c8783 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -11,7 +11,7 @@ env:
jobs:
all:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
needs: [build-nightly, build-stable, test]
steps:
- name: Done
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml
index fe8fac7c..845f742e 100644
--- a/embassy-embedded-hal/Cargo.toml
+++ b/embassy-embedded-hal/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/"
features = ["nightly", "std"]
-target = "thumbv7em-none-eabi"
+target = "x86_64-unknown-linux-gnu"
[features]
std = []
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index fa3d0b2b..3b1c4ab4 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/"
-features = ["nightly", "defmt", "unstable-traits"]
+features = ["nightly", "defmt"]
flavors = [
{ name = "std", target = "x86_64-unknown-linux-gnu", features = ["std"] },
{ name = "wasm", target = "wasm32-unknown-unknown", features = ["wasm"] },
diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml
index aad54dba..1f705e9f 100644
--- a/embassy-usb/Cargo.toml
+++ b/embassy-usb/Cargo.toml
@@ -6,7 +6,7 @@ edition = "2021"
[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb/src/"
-features = ["defmt"]
+features = ["defmt", "usbd-hid"]
target = "thumbv7em-none-eabi"
[features]