From 046a99aba01051c93d2f6a4d2f6e54ddde4f7fd4 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 31 May 2023 13:56:12 +0200 Subject: [PATCH] Move doc building to new CI. --- .github/ci/doc.sh | 34 +++++++++++++++ .github/workflows/doc.yml | 87 ------------------------------------- embassy-cortex-m/Cargo.toml | 2 - 3 files changed, 34 insertions(+), 89 deletions(-) create mode 100755 .github/ci/doc.sh delete mode 100644 .github/workflows/doc.yml diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh new file mode 100755 index 000000000..eabde742b --- /dev/null +++ b/.github/ci/doc.sh @@ -0,0 +1,34 @@ +#!/bin/bash +## on push branch=main + +set -euo pipefail + +export RUSTUP_HOME=/ci/cache/rustup +export CARGO_HOME=/ci/cache/cargo +export CARGO_TARGET_DIR=/ci/cache/target +export BUILDER_THREADS=6 + +docserver-builder ./embassy-boot/boot crates/embassy-boot/git.zup +docserver-builder ./embassy-boot/nrf crates/embassy-boot-nrf/git.zup +docserver-builder ./embassy-boot/rp crates/embassy-boot-rp/git.zup +docserver-builder ./embassy-boot/stm32 crates/embassy-boot-stm32/git.zup +docserver-builder ./embassy-cortex-m crates/embassy-cortex-m/git.zup +docserver-builder ./embassy-embedded-hal crates/embassy-embedded-hal/git.zup +docserver-builder ./embassy-executor crates/embassy-executor/git.zup +docserver-builder ./embassy-futures crates/embassy-futures/git.zup +docserver-builder ./embassy-lora crates/embassy-lora/git.zup +docserver-builder ./embassy-net crates/embassy-net/git.zup +docserver-builder ./embassy-net-driver crates/embassy-net-driver/git.zup +docserver-builder ./embassy-net-driver-channel crates/embassy-net-driver-channel/git.zup +docserver-builder ./embassy-nrf crates/embassy-nrf/git.zup +docserver-builder ./embassy-rp crates/embassy-rp/git.zup +docserver-builder ./embassy-sync crates/embassy-sync/git.zup +docserver-builder ./embassy-time crates/embassy-time/git.zup +docserver-builder ./embassy-usb crates/embassy-usb/git.zup +docserver-builder ./embassy-usb-driver crates/embassy-usb-driver/git.zup +docserver-builder ./embassy-usb-logger crates/embassy-usb-logger/git.zup +#docserver-builder ./embassy-stm32 crates/embassy-stm32/git.zup + +export KUBECONFIG=/ci/secrets/kubeconfig.yml +POD=$(kubectl -n embassy get po -l app=docserver -o jsonpath={.items[0].metadata.name}) +kubectl cp crates $POD:/data diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index a69a49718..000000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Docs - -on: - push: - branches: [main] - -env: - BUILDER_THREADS: '1' - -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 # runs out of disk space... - - 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@v3 - 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.4/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 - - - 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/rp crates/embassy-boot-rp/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-net-driver crates/embassy-net-driver/git.zup - builder ./embassy-net-driver-channel crates/embassy-net-driver-channel/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-time crates/embassy-time/git.zup - builder ./embassy-usb crates/embassy-usb/git.zup - builder ./embassy-usb-driver crates/embassy-usb-driver/git.zup - builder ./embassy-usb-logger crates/embassy-usb-logger/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 diff --git a/embassy-cortex-m/Cargo.toml b/embassy-cortex-m/Cargo.toml index 2eb0cce2a..70adda7df 100644 --- a/embassy-cortex-m/Cargo.toml +++ b/embassy-cortex-m/Cargo.toml @@ -13,8 +13,6 @@ flavors = [ { name = "thumbv7m-none-eabi", target = "thumbv7m-none-eabi", features = [] }, { name = "thumbv7em-none-eabi", target = "thumbv7em-none-eabi", features = [] }, { name = "thumbv7em-none-eabihf", target = "thumbv7em-none-eabihf", features = [] }, - { name = "thumbv8m.base-none-eabi", target = "thumbv8m.base-none-eabi", features = [] }, - { name = "thumbv8m.main-none-eabi", target = "thumbv8m.main-none-eabi", features = [] }, { name = "thumbv8m.main-none-eabihf", target = "thumbv8m.main-none-eabihf", features = [] }, ]