aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rwxr-xr-x.github/ci/build-xtensa.sh37
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
5set -euo pipefail
6
7export RUSTUP_HOME=/ci/cache/rustup
8export CARGO_HOME=/ci/cache/cargo
9export 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.
13export CARGO_NET_GIT_FETCH_WITH_CLI=true
14
15cargo install espup
16/ci/cache/cargo/bin/espup install
17
18# Restore lockfiles
19if [ -f /ci/cache/lockfiles.tar ]; then
20 echo Restoring lockfiles...
21 tar xf /ci/cache/lockfiles.tar
22fi
23
24hashtime restore /ci/cache/filetime.json || true
25hashtime save /ci/cache/filetime.json
26
27mkdir .cargo
28cat > .cargo/config.toml<< EOF
29[unstable]
30build-std = ["alloc", "core"]
31EOF
32
33./ci-xtensa.sh
34
35# Save lockfiles
36echo Saving lockfiles...
37find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+