diff options
| author | Scott Mabin <[email protected]> | 2024-11-12 14:09:24 +0000 |
|---|---|---|
| committer | Scott Mabin <[email protected]> | 2024-11-12 15:58:31 +0000 |
| commit | 95b84494bc2f6a137e7dfe349971b4386ec66411 (patch) | |
| tree | 30e2384666847de9d4f46aa94882852ab6bb3cb5 /.github/ci/build-xtensa.sh | |
| parent | 8478729e4917c2c26c81e38dfa0795d2339820a5 (diff) | |
basic xtensa CI
Diffstat (limited to '.github/ci/build-xtensa.sh')
| -rwxr-xr-x | .github/ci/build-xtensa.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh new file mode 100755 index 000000000..a13391c82 --- /dev/null +++ b/.github/ci/build-xtensa.sh | |||
| @@ -0,0 +1,37 @@ | |||
| 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 | # needed for "dumb HTTP" transport support | ||
| 12 | # used when pointing stm32-metapac to a CI-built one. | ||
| 13 | export CARGO_NET_GIT_FETCH_WITH_CLI=true | ||
| 14 | |||
| 15 | cargo install espup | ||
| 16 | /ci/cache/cargo/bin/espup install | ||
| 17 | |||
| 18 | # Restore lockfiles | ||
| 19 | if [ -f /ci/cache/lockfiles.tar ]; then | ||
| 20 | echo Restoring lockfiles... | ||
| 21 | tar xf /ci/cache/lockfiles.tar | ||
| 22 | fi | ||
| 23 | |||
| 24 | hashtime restore /ci/cache/filetime.json || true | ||
| 25 | hashtime save /ci/cache/filetime.json | ||
| 26 | |||
| 27 | mkdir .cargo | ||
| 28 | cat > .cargo/config.toml<< EOF | ||
| 29 | [unstable] | ||
| 30 | build-std = ["alloc", "core"] | ||
| 31 | EOF | ||
| 32 | |||
| 33 | ./ci-xtensa.sh | ||
| 34 | |||
| 35 | # Save lockfiles | ||
| 36 | echo Saving lockfiles... | ||
| 37 | find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+ | ||
