diff options
| author | xoviat <[email protected]> | 2023-05-29 15:07:21 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-05-29 15:07:21 -0500 |
| commit | 68441a74c2da3d3186ca351f0b3d263940564a16 (patch) | |
| tree | e5d40a357c49accd1b774a2b401d79b03ecf6075 /.github | |
| parent | aba0f8fd6cd51cad65480689bc9254df4f071175 (diff) | |
| parent | 3b38079490b0c283899cab42308c4feab4c47fdc (diff) | |
Merge branch 'main' of https://github.com/embassy-rs/embassy into uart
Diffstat (limited to '.github')
| -rwxr-xr-x | .github/ci/build-stable.sh | 16 | ||||
| -rwxr-xr-x | .github/ci/build.sh | 18 | ||||
| -rwxr-xr-x | .github/ci/test.sh | 28 | ||||
| -rw-r--r-- | .github/workflows/doc.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/rust.yml | 80 |
5 files changed, 63 insertions, 81 deletions
diff --git a/.github/ci/build-stable.sh b/.github/ci/build-stable.sh new file mode 100755 index 000000000..0dadd6102 --- /dev/null +++ b/.github/ci/build-stable.sh | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | export RUSTUP_HOME=/ci/cache/rustup | ||
| 8 | export CARGO_HOME=/ci/cache/cargo | ||
| 9 | export CARGO_TARGET_DIR=/ci/cache/target | ||
| 10 | |||
| 11 | hashtime restore /ci/cache/filetime.json || true | ||
| 12 | hashtime save /ci/cache/filetime.json | ||
| 13 | |||
| 14 | sed -i 's/channel.*/channel = "stable"/g' rust-toolchain.toml | ||
| 15 | |||
| 16 | ./ci_stable.sh | ||
diff --git a/.github/ci/build.sh b/.github/ci/build.sh new file mode 100755 index 000000000..1c3a7f3b0 --- /dev/null +++ b/.github/ci/build.sh | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | export RUSTUP_HOME=/ci/cache/rustup | ||
| 8 | export CARGO_HOME=/ci/cache/cargo | ||
| 9 | export CARGO_TARGET_DIR=/ci/cache/target | ||
| 10 | if [ -f /ci/secrets/teleprobe-token.txt ]; then | ||
| 11 | echo Got teleprobe token! | ||
| 12 | export TELEPROBE_TOKEN=$(cat /ci/secrets/teleprobe-token.txt) | ||
| 13 | fi | ||
| 14 | |||
| 15 | hashtime restore /ci/cache/filetime.json || true | ||
| 16 | hashtime save /ci/cache/filetime.json | ||
| 17 | |||
| 18 | ./ci.sh | ||
diff --git a/.github/ci/test.sh b/.github/ci/test.sh new file mode 100755 index 000000000..a7140cfd9 --- /dev/null +++ b/.github/ci/test.sh | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | export RUSTUP_HOME=/ci/cache/rustup | ||
| 8 | export CARGO_HOME=/ci/cache/cargo | ||
| 9 | export CARGO_TARGET_DIR=/ci/cache/target | ||
| 10 | |||
| 11 | hashtime restore /ci/cache/filetime.json || true | ||
| 12 | hashtime save /ci/cache/filetime.json | ||
| 13 | |||
| 14 | cargo test --manifest-path ./embassy-sync/Cargo.toml | ||
| 15 | cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml | ||
| 16 | cargo test --manifest-path ./embassy-hal-common/Cargo.toml | ||
| 17 | cargo test --manifest-path ./embassy-time/Cargo.toml --features generic-queue | ||
| 18 | |||
| 19 | cargo test --manifest-path ./embassy-boot/boot/Cargo.toml | ||
| 20 | cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly | ||
| 21 | cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly,ed25519-dalek | ||
| 22 | cargo test --manifest-path ./embassy-boot/boot/Cargo.toml --features nightly,ed25519-salty | ||
| 23 | |||
| 24 | #cargo test --manifest-path ./embassy-nrf/Cargo.toml --no-default-features --features nightly,nrf52840,time-driver-rtc1 ## broken doctests | ||
| 25 | |||
| 26 | cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f429vg,exti,time-driver-any,exti | ||
| 27 | cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f732ze,exti,time-driver-any,exti | ||
| 28 | cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features nightly,stm32f769ni,exti,time-driver-any,exti | ||
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b4e225e64..a69a49718 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml | |||
| @@ -2,7 +2,7 @@ name: Docs | |||
| 2 | 2 | ||
| 3 | on: | 3 | on: |
| 4 | push: | 4 | push: |
| 5 | branches: [master] | 5 | branches: [main] |
| 6 | 6 | ||
| 7 | env: | 7 | env: |
| 8 | BUILDER_THREADS: '1' | 8 | BUILDER_THREADS: '1' |
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 0cbca31b8..000000000 --- a/.github/workflows/rust.yml +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | name: Rust | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: [staging, trying, master] | ||
| 6 | pull_request: | ||
| 7 | branches: [master] | ||
| 8 | |||
| 9 | env: | ||
| 10 | CARGO_TERM_COLOR: always | ||
| 11 | |||
| 12 | jobs: | ||
| 13 | all: | ||
| 14 | runs-on: ubuntu-latest | ||
| 15 | needs: [build-nightly, build-stable, test] | ||
| 16 | steps: | ||
| 17 | - name: Done | ||
| 18 | run: exit 0 | ||
| 19 | build-nightly: | ||
| 20 | runs-on: ubuntu-latest | ||
| 21 | permissions: | ||
| 22 | id-token: write | ||
| 23 | contents: read | ||
| 24 | steps: | ||
| 25 | - uses: actions/checkout@v3 | ||
| 26 | with: | ||
| 27 | submodules: true | ||
| 28 | - name: Cache multiple paths | ||
| 29 | uses: actions/cache@v3 | ||
| 30 | with: | ||
| 31 | path: | | ||
| 32 | ~/.cargo/bin/ | ||
| 33 | ~/.cargo/registry/index/ | ||
| 34 | ~/.cargo/registry/cache/ | ||
| 35 | ~/.cargo/git/db/ | ||
| 36 | target_ci | ||
| 37 | key: rust3-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} | ||
| 38 | - name: build | ||
| 39 | env: | ||
| 40 | TELEPROBE_TOKEN: ${{ secrets.TELEPROBE_TOKEN }} | ||
| 41 | run: | | ||
| 42 | curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch | ||
| 43 | chmod +x /usr/local/bin/cargo-batch | ||
| 44 | ./ci.sh | ||
| 45 | rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* | ||
| 46 | build-stable: | ||
| 47 | runs-on: ubuntu-latest | ||
| 48 | steps: | ||
| 49 | - uses: actions/checkout@v3 | ||
| 50 | with: | ||
| 51 | submodules: true | ||
| 52 | - name: Cache multiple paths | ||
| 53 | uses: actions/cache@v3 | ||
| 54 | with: | ||
| 55 | path: | | ||
| 56 | ~/.cargo/bin/ | ||
| 57 | ~/.cargo/registry/index/ | ||
| 58 | ~/.cargo/registry/cache/ | ||
| 59 | ~/.cargo/git/db/ | ||
| 60 | target_ci_stable | ||
| 61 | key: rust-stable-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} | ||
| 62 | - name: build | ||
| 63 | run: | | ||
| 64 | curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch | ||
| 65 | chmod +x /usr/local/bin/cargo-batch | ||
| 66 | ./ci_stable.sh | ||
| 67 | rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}* | ||
| 68 | |||
| 69 | test: | ||
| 70 | runs-on: ubuntu-latest | ||
| 71 | steps: | ||
| 72 | - uses: actions/checkout@v3 | ||
| 73 | |||
| 74 | - name: Test boot | ||
| 75 | working-directory: ./embassy-boot/boot | ||
| 76 | run: cargo test && cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly" | ||
| 77 | |||
| 78 | - name: Test sync | ||
| 79 | working-directory: ./embassy-sync | ||
| 80 | run: cargo test | ||
