From 3f76f3e971a221bbe8ea5ce6ce38e853fa8a5759 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sun, 29 Sep 2024 14:32:00 +0000 Subject: [PATCH 1/2] Run picotool step in github action This should catch bugs like https://github.com/rp-rs/rp-hal/issues/853 --- .github/workflows/rp2040_hal_examples.yml | 6 +++++- .github/workflows/rp235x_hal_examples_arm.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rp2040_hal_examples.yml b/.github/workflows/rp2040_hal_examples.yml index 19889aec9..85734696a 100644 --- a/.github/workflows/rp2040_hal_examples.yml +++ b/.github/workflows/rp2040_hal_examples.yml @@ -5,7 +5,7 @@ env: TARGET: thumbv6m-none-eabi jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -13,6 +13,10 @@ jobs: target: ${{ env.TARGET }} - name: Build run: cd ${PACKAGE} && cargo build + - name: Install picotool + run: sudo sh -c "apt-get install -y debian-archive-keyring && echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list && apt update && apt-get install -y libxml2-utils picotool" + - name: Test picotool + run: picotool info ${PACKAGE}/target/${TARGET}/debug/binary_info_demo -t elf -a | tee /dev/stderr | grep -q "rp2040-hal Binary Info Example" udeps: runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/rp235x_hal_examples_arm.yml b/.github/workflows/rp235x_hal_examples_arm.yml index 63b13f931..901245f10 100644 --- a/.github/workflows/rp235x_hal_examples_arm.yml +++ b/.github/workflows/rp235x_hal_examples_arm.yml @@ -5,7 +5,7 @@ env: TARGET: thumbv8m.main-none-eabihf jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -13,6 +13,10 @@ jobs: target: ${{ env.TARGET }} - name: Build run: cd ${PACKAGE} && cargo build --target=${TARGET} + - name: Install picotool + run: sudo sh -c "apt-get install -y debian-archive-keyring && echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list && apt update && apt-get install -y libxml2-utils picotool" + - name: Test picotool + run: picotool info ${PACKAGE}/target/${TARGET}/debug/binary_info_demo -t elf -a | tee /dev/stderr | grep -q RP2350 udeps: runs-on: ubuntu-20.04 steps: From eb14a75a5ef08030b1779febc49256a03ae93d70 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sun, 29 Sep 2024 19:22:16 +0000 Subject: [PATCH 2/2] Improve formatting of CI scripts --- .github/workflows/rp2040_hal_examples.yml | 6 +++++- .github/workflows/rp235x_hal_examples_arm.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rp2040_hal_examples.yml b/.github/workflows/rp2040_hal_examples.yml index 85734696a..6ca4487df 100644 --- a/.github/workflows/rp2040_hal_examples.yml +++ b/.github/workflows/rp2040_hal_examples.yml @@ -14,7 +14,11 @@ jobs: - name: Build run: cd ${PACKAGE} && cargo build - name: Install picotool - run: sudo sh -c "apt-get install -y debian-archive-keyring && echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list && apt update && apt-get install -y libxml2-utils picotool" + run: | + sudo apt-get install -y debian-archive-keyring + sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list" + sudo apt-get update + sudo apt-get install -y libxml2-utils picotool - name: Test picotool run: picotool info ${PACKAGE}/target/${TARGET}/debug/binary_info_demo -t elf -a | tee /dev/stderr | grep -q "rp2040-hal Binary Info Example" udeps: diff --git a/.github/workflows/rp235x_hal_examples_arm.yml b/.github/workflows/rp235x_hal_examples_arm.yml index 901245f10..7ccf42952 100644 --- a/.github/workflows/rp235x_hal_examples_arm.yml +++ b/.github/workflows/rp235x_hal_examples_arm.yml @@ -14,7 +14,11 @@ jobs: - name: Build run: cd ${PACKAGE} && cargo build --target=${TARGET} - name: Install picotool - run: sudo sh -c "apt-get install -y debian-archive-keyring && echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list && apt update && apt-get install -y libxml2-utils picotool" + run: | + sudo apt-get install -y debian-archive-keyring + sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list" + sudo apt-get update + sudo apt-get install -y libxml2-utils picotool - name: Test picotool run: picotool info ${PACKAGE}/target/${TARGET}/debug/binary_info_demo -t elf -a | tee /dev/stderr | grep -q RP2350 udeps: