aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-10-02 23:31:11 +0200
committerGitHub <[email protected]>2022-10-02 23:31:11 +0200
commit63f5602111d53c552b2417b9386512788fee8766 (patch)
tree48f22ea348ae8705c8b1341efb9f236b4d5ae2ff
parent73208d524843ca451b4cbfdb06e35f1b85290f4c (diff)
parent753781a2639c3505ab046cb48acb6473b84b214b (diff)
Merge pull request #994 from embassy-rs/ci-docs
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 000000000..349ca4040
--- /dev/null
+++ b/.github/workflows/doc.yml
@@ -0,0 +1,85 @@
1name: Docs
2
3on:
4 push:
5 branches: [master]
6
7env:
8 BUILDER_THREADS: '2'
9
10jobs:
11 doc:
12 runs-on: ubuntu-latest
13
14 # Since stm32 crates take SO LONG to build, we split them
15 # into a separate job. This way it doesn't slow down updating
16 # the rest.
17 strategy:
18 matrix:
19 crates:
20 - stm32
21 - rest
22
23 # This will ensure at most one doc build job is running at a time
24 # (for stm32 and non-stm32 independently).
25 # If another job is already running, the new job will wait.
26 # If another job is already waiting, it'll be canceled.
27 # This means some commits will be skipped, but that's fine because
28 # we only care that the latest gets built.
29 concurrency: doc-${{ matrix.crates }}
30
31 steps:
32 - uses: actions/checkout@v2
33 with:
34 submodules: true
35 - name: Install Rust targets
36 run: |
37 rustup target add x86_64-unknown-linux-gnu
38 rustup target add wasm32-unknown-unknown
39 rustup target add thumbv6m-none-eabi
40 rustup target add thumbv7m-none-eabi
41 rustup target add thumbv7em-none-eabi
42 rustup target add thumbv7em-none-eabihf
43 rustup target add thumbv8m.base-none-eabi
44 rustup target add thumbv8m.main-none-eabi
45 rustup target add thumbv8m.main-none-eabihf
46
47 - name: Install docserver
48 run: |
49 wget -q -O /usr/local/bin/builder "https://github.com/embassy-rs/docserver/releases/download/v0.3/builder"
50 chmod +x /usr/local/bin/builder
51
52 - name: build-stm32
53 if: ${{ matrix.crates=='stm32' }}
54 run: |
55 mkdir crates
56 builder ./embassy-stm32 crates/embassy-stm32/git.zup
57 builder ./stm32-metapac crates/stm32-metapac/git.zup
58
59 - name: build-rest
60 if: ${{ matrix.crates=='rest' }}
61 run: |
62 mkdir crates
63 builder ./embassy-boot/boot crates/embassy-boot/git.zup
64 builder ./embassy-boot/nrf crates/embassy-boot-nrf/git.zup
65 builder ./embassy-boot/stm32 crates/embassy-boot-stm32/git.zup
66 builder ./embassy-cortex-m crates/embassy-cortex-m/git.zup
67 builder ./embassy-embedded-hal crates/embassy-embedded-hal/git.zup
68 builder ./embassy-executor crates/embassy-executor/git.zup
69 builder ./embassy-futures crates/embassy-futures/git.zup
70 builder ./embassy-lora crates/embassy-lora/git.zup
71 builder ./embassy-net crates/embassy-net/git.zup
72 builder ./embassy-nrf crates/embassy-nrf/git.zup
73 builder ./embassy-rp crates/embassy-rp/git.zup
74 builder ./embassy-sync crates/embassy-sync/git.zup
75 builder ./embassy-usb crates/embassy-usb/git.zup
76 builder ./embassy-usb-driver crates/embassy-usb-driver/git.zup
77
78 - name: upload
79 run: |
80 mkdir -p ~/.kube
81 echo "${{secrets.KUBECONFIG}}" > ~/.kube/config
82 POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name})
83 kubectl cp crates $POD:/data
84
85 \ No newline at end of file
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index d2e8e316b..b93c8783d 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -11,7 +11,7 @@ env:
11 11
12jobs: 12jobs:
13 all: 13 all:
14 runs-on: ubuntu-20.04 14 runs-on: ubuntu-latest
15 needs: [build-nightly, build-stable, test] 15 needs: [build-nightly, build-stable, test]
16 steps: 16 steps:
17 - name: Done 17 - name: Done
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml
index fe8fac7c8..845f742e4 100644
--- a/embassy-embedded-hal/Cargo.toml
+++ b/embassy-embedded-hal/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/" 8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/"
9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/" 9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/"
10features = ["nightly", "std"] 10features = ["nightly", "std"]
11target = "thumbv7em-none-eabi" 11target = "x86_64-unknown-linux-gnu"
12 12
13[features] 13[features]
14std = [] 14std = []
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index fa3d0b2b6..3b1c4ab46 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
7[package.metadata.embassy_docs] 7[package.metadata.embassy_docs]
8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/" 8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/"
9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/" 9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/"
10features = ["nightly", "defmt", "unstable-traits"] 10features = ["nightly", "defmt"]
11flavors = [ 11flavors = [
12 { name = "std", target = "x86_64-unknown-linux-gnu", features = ["std"] }, 12 { name = "std", target = "x86_64-unknown-linux-gnu", features = ["std"] },
13 { name = "wasm", target = "wasm32-unknown-unknown", features = ["wasm"] }, 13 { name = "wasm", target = "wasm32-unknown-unknown", features = ["wasm"] },
diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml
index aad54dbaf..1f705e9ff 100644
--- a/embassy-usb/Cargo.toml
+++ b/embassy-usb/Cargo.toml
@@ -6,7 +6,7 @@ edition = "2021"
6[package.metadata.embassy_docs] 6[package.metadata.embassy_docs]
7src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb/src/" 7src_base = "https://github.com/embassy-rs/embassy/blob/embassy-usb-v$VERSION/embassy-usb/src/"
8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb/src/" 8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb/src/"
9features = ["defmt"] 9features = ["defmt", "usbd-hid"]
10target = "thumbv7em-none-eabi" 10target = "thumbv7em-none-eabi"
11 11
12[features] 12[features]