diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-10-02 22:24:59 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-10-02 23:30:12 +0200 |
| commit | 753781a2639c3505ab046cb48acb6473b84b214b (patch) | |
| tree | 48f22ea348ae8705c8b1341efb9f236b4d5ae2ff /.github/workflows | |
| parent | 73208d524843ca451b4cbfdb06e35f1b85290f4c (diff) | |
Build docs in CI
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/doc.yml | 85 | ||||
| -rw-r--r-- | .github/workflows/rust.yml | 2 |
2 files changed, 86 insertions, 1 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 @@ | |||
| 1 | name: Docs | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [master] | ||
| 6 | |||
| 7 | env: | ||
| 8 | BUILDER_THREADS: '2' | ||
| 9 | |||
| 10 | jobs: | ||
| 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 | ||
| 12 | jobs: | 12 | jobs: |
| 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 |
