Merge pull request #1495 from embassy-rs/new-ci
Switch from GHA to Bender CI
This commit is contained in:
commit
760a32246a
3 changed files with 21 additions and 81 deletions
21
.github/ci/rust.sh
vendored
Executable file
21
.github/ci/rust.sh
vendored
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
## on push branch=main
|
||||||
|
## on push branch~=gh-readonly-queue/main/.*
|
||||||
|
## on pull_request
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
echo Hello World!
|
||||||
|
|
||||||
|
export RUSTUP_HOME=/ci/cache/rustup
|
||||||
|
export CARGO_HOME=/ci/cache/cargo
|
||||||
|
export CARGO_TARGET_DIR=/ci/cache/target
|
||||||
|
if [ -f /ci/secrets/teleprobe-token.txt ]; then
|
||||||
|
echo Got teleprobe token!
|
||||||
|
export TELEPROBE_TOKEN=$(cat /ci/secrets/teleprobe-token.txt)
|
||||||
|
fi
|
||||||
|
|
||||||
|
hashtime restore /ci/cache/filetime.json || true
|
||||||
|
hashtime save /ci/cache/filetime.json
|
||||||
|
|
||||||
|
./ci.sh
|
80
.github/workflows/rust.yml
vendored
80
.github/workflows/rust.yml
vendored
|
@ -1,80 +0,0 @@
|
||||||
name: Rust
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [staging, trying, master]
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
all:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build-nightly, build-stable, test]
|
|
||||||
steps:
|
|
||||||
- name: Done
|
|
||||||
run: exit 0
|
|
||||||
build-nightly:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Cache multiple paths
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target_ci
|
|
||||||
key: rust3-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}
|
|
||||||
- name: build
|
|
||||||
env:
|
|
||||||
TELEPROBE_TOKEN: ${{ secrets.TELEPROBE_TOKEN }}
|
|
||||||
run: |
|
|
||||||
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch
|
|
||||||
chmod +x /usr/local/bin/cargo-batch
|
|
||||||
./ci.sh
|
|
||||||
rm -rf target_ci/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
|
|
||||||
build-stable:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Cache multiple paths
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target_ci_stable
|
|
||||||
key: rust-stable-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch
|
|
||||||
chmod +x /usr/local/bin/cargo-batch
|
|
||||||
./ci_stable.sh
|
|
||||||
rm -rf target_ci_stable/*{,/release}/{build,deps,.fingerprint}/{lib,}{embassy,stm32}*
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Test boot
|
|
||||||
working-directory: ./embassy-boot/boot
|
|
||||||
run: cargo test && cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly"
|
|
||||||
|
|
||||||
- name: Test sync
|
|
||||||
working-directory: ./embassy-sync
|
|
||||||
run: cargo test
|
|
1
ci.sh
1
ci.sh
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
export CARGO_TARGET_DIR=$PWD/target_ci
|
|
||||||
export RUSTFLAGS=-Dwarnings
|
export RUSTFLAGS=-Dwarnings
|
||||||
export DEFMT_LOG=trace
|
export DEFMT_LOG=trace
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue