diff --git a/.github/workflows/build_blinky.yml b/.github/workflows/build_blinky.yml index d9b74dcb45..70898cb6ac 100644 --- a/.github/workflows/build_blinky.yml +++ b/.github/workflows/build_blinky.yml @@ -42,6 +42,11 @@ jobs: run: | sudo apt-get update sudo apt-get install -y gcc-multilib + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - name: Install newt run: | go version @@ -53,8 +58,9 @@ 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 + git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA + sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml + newt upgrade --shallow=1 cd .. - name: Build Blinky shell: bash diff --git a/.github/workflows/build_bootloader.yml b/.github/workflows/build_bootloader.yml index 0cd89f9aa9..9dc33e36ee 100644 --- a/.github/workflows/build_bootloader.yml +++ b/.github/workflows/build_bootloader.yml @@ -42,6 +42,11 @@ jobs: run: | sudo apt-get update sudo apt-get install -y gcc-multilib + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - name: Install newt run: | go version @@ -53,8 +58,9 @@ 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 + git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA + sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml + newt upgrade --shallow=1 cd .. - name: Build bootloader shell: bash diff --git a/.github/workflows/build_cc_target.yml b/.github/workflows/build_cc_target.yml index daf8e8c63e..d2ea5de7a2 100644 --- a/.github/workflows/build_cc_target.yml +++ b/.github/workflows/build_cc_target.yml @@ -50,8 +50,9 @@ 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 + git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA + sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml + newt upgrade --shallow=1 cd .. - name: Build targets shell: bash diff --git a/.github/workflows/build_targets.yml b/.github/workflows/build_targets.yml index d3b113d8ab..1b660b3486 100644 --- a/.github/workflows/build_targets.yml +++ b/.github/workflows/build_targets.yml @@ -37,6 +37,11 @@ jobs: - uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78 with: release: '12.2.Rel1' + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - name: Install newt run: | go version @@ -48,9 +53,10 @@ jobs: cp -f .github/project.yml build/project.yml cd build newt upgrade --shallow=1 + git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA + sed -i "s/0.0.0/$GITHUB_SHA-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 diff --git a/.github/workflows/newt_test_all.yml b/.github/workflows/newt_test_all.yml index c6480deccf..e517664277 100644 --- a/.github/workflows/newt_test_all.yml +++ b/.github/workflows/newt_test_all.yml @@ -34,6 +34,11 @@ jobs: run: | sudo apt-get update sudo apt-get install -y gcc-multilib + - name: Install GNU sed + if: matrix.os == 'macos-latest' + run: | + brew install gnu-sed + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH - name: Install newt run: | go version @@ -45,8 +50,9 @@ 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 + git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA + sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml + newt upgrade --shallow=1 cd .. - name: newt test all run: |