commit
1374ed6227
8
.github/ci/build.sh
vendored
8
.github/ci/build.sh
vendored
@ -17,10 +17,16 @@ cargo fmt -- --check
|
|||||||
# so the diff will show this PR's effect
|
# so the diff will show this PR's effect
|
||||||
git remote add upstream https://github.com/embassy-rs/stm32-data
|
git remote add upstream https://github.com/embassy-rs/stm32-data
|
||||||
git fetch --depth 15 upstream main
|
git fetch --depth 15 upstream main
|
||||||
git clone --depth 1 --branch stm32-data-$(git merge-base HEAD upstream/main) https://github.com/embassy-rs/stm32-data-generated/ build
|
git clone --depth 1 --branch stm32-data-$(git merge-base HEAD upstream/main) https://github.com/embassy-rs/stm32-data-generated/ build -q
|
||||||
|
|
||||||
|
# move the sources directory out of the cache if it exists
|
||||||
|
mv /ci/cache/sources ./sources || true
|
||||||
|
|
||||||
./d ci
|
./d ci
|
||||||
|
|
||||||
|
# move the sources directory into the cache
|
||||||
|
mv ./sources /ci/cache/sources
|
||||||
|
|
||||||
# upload diff
|
# upload diff
|
||||||
(
|
(
|
||||||
cd build
|
cd build
|
||||||
|
2
.github/ci/generated.sh
vendored
2
.github/ci/generated.sh
vendored
@ -12,7 +12,7 @@ export CARGO_TARGET_DIR=/ci/cache/target
|
|||||||
hashtime restore /ci/cache/filetime.json || true
|
hashtime restore /ci/cache/filetime.json || true
|
||||||
hashtime save /ci/cache/filetime.json
|
hashtime save /ci/cache/filetime.json
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/embassy-rs/stm32-data-generated/ build
|
git clone --depth 1 https://github.com/embassy-rs/stm32-data-generated/ build -q
|
||||||
./d ci
|
./d ci
|
||||||
|
|
||||||
COMMIT=$(git rev-parse HEAD)
|
COMMIT=$(git rev-parse HEAD)
|
||||||
|
9
d
9
d
@ -4,14 +4,15 @@ set -e
|
|||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
CMD=$1
|
CMD=$1
|
||||||
|
REV=7b078cef5335129b38245f0a7566103b9245973f
|
||||||
shift
|
shift
|
||||||
|
|
||||||
case "$CMD" in
|
case "$CMD" in
|
||||||
download-all)
|
download-all)
|
||||||
rm -rf ./sources/
|
rm -rf ./sources/
|
||||||
git clone https://github.com/embassy-rs/stm32-data-sources.git ./sources/
|
git clone https://github.com/embassy-rs/stm32-data-sources.git ./sources/ -q
|
||||||
cd ./sources/
|
cd ./sources/
|
||||||
git checkout 7b078cef5335129b38245f0a7566103b9245973f
|
git checkout $REV
|
||||||
;;
|
;;
|
||||||
install-chiptool)
|
install-chiptool)
|
||||||
cargo install --git https://github.com/embassy-rs/chiptool
|
cargo install --git https://github.com/embassy-rs/chiptool
|
||||||
@ -43,6 +44,10 @@ case "$CMD" in
|
|||||||
;;
|
;;
|
||||||
ci)
|
ci)
|
||||||
[ -d sources ] || ./d download-all
|
[ -d sources ] || ./d download-all
|
||||||
|
cd ./sources/
|
||||||
|
git fetch origin $REV
|
||||||
|
git checkout $REV
|
||||||
|
cd ..
|
||||||
rm -rf build/{data,stm32-metapac}
|
rm -rf build/{data,stm32-metapac}
|
||||||
cargo run --release --bin stm32-data-gen
|
cargo run --release --bin stm32-data-gen
|
||||||
cargo run --release --bin stm32-metapac-gen
|
cargo run --release --bin stm32-metapac-gen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user