Skip to content

Commit

Permalink
ci: Use proper SHA when downloading core
Browse files Browse the repository at this point in the history
This allows to directly download PR commits and avoid tricks with
local copy. This improves dependencies resolving when PR added
new external repo.
  • Loading branch information
sjanc committed Nov 16, 2023
1 parent 22ebb10 commit c423a9a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build_blinky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ jobs:
cp -f .github/project.yml build/project.yml
cd build
newt upgrade --shallow=1
rm -rf repos/apache-mynewt-core
git clone .. repos/apache-mynewt-core
cd repos/apache-mynewt-core
git fetch origin `git rev-parse HEAD`
cd ../..
sed -i "s/0.0.0/`git rev-parse HEAD`-commit/g" project.yml
newt upgrade --shallow=1
cd ..
- name: Build Blinky
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_bootloader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ jobs:
cp -f .github/project.yml build/project.yml
cd build
newt upgrade --shallow=1
rm -rf repos/apache-mynewt-core
git clone .. repos/apache-mynewt-core
cd repos/apache-mynewt-core
git fetch origin `git rev-parse HEAD`
cd ../..
sed -i "s/0.0.0/`git rev-parse HEAD`-commit/g" project.yml
newt upgrade --shallow=1
cd ..
- name: Build bootloader
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_cc_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ jobs:
cp -f .github/project.yml build/project.yml
cd build
newt upgrade --shallow=1
rm -rf repos/apache-mynewt-core
git clone .. repos/apache-mynewt-core
cd repos/apache-mynewt-core
git fetch origin `git rev-parse HEAD`
cd ../..
sed -i "s/0.0.0/`git rev-parse HEAD`-commit/g" project.yml
newt upgrade --shallow=1
cd ..
- name: Build targets
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ jobs:
cp -f .github/project.yml build/project.yml
cd build
newt upgrade --shallow=1
cd repos/apache-mynewt-core
git fetch origin `git rev-parse HEAD`
cd ../..
sed -i "s/0.0.0/`git rev-parse HEAD`-commit/g" project.yml
newt upgrade --shallow=1
rm -rf targets
rm -rf repos/apache-mynewt-core
git clone .. repos/apache-mynewt-core
cd ..
- name: Build targets
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/newt_test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ jobs:
cp -f .github/project.yml build/project.yml
cd build
newt upgrade --shallow=1
rm -rf repos/apache-mynewt-core
git clone .. repos/apache-mynewt-core
cd repos/apache-mynewt-core
git fetch origin `git rev-parse HEAD`
cd ../..
sed -i "s/0.0.0/`git rev-parse HEAD`-commit/g" project.yml
newt upgrade --shallow=1
cd ..
- name: newt test all
run: |
Expand Down

0 comments on commit c423a9a

Please sign in to comment.