From d2690449873a9e3ef3c56bef9a65895ed311eecb Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 17 May 2025 12:52:50 -0700 Subject: [PATCH 1/3] Add tmate for testing purposes. Signed-off-by: Dan Schaper --- .github/workflows/ftl-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ftl-build.yml b/.github/workflows/ftl-build.yml index 83bb323..92f1804 100644 --- a/.github/workflows/ftl-build.yml +++ b/.github/workflows/ftl-build.yml @@ -36,6 +36,11 @@ jobs: - platform: linux/arm64/v8 - platform: linux/riscv64 steps: + - + name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true - name: Prepare name for digest up/download run: | From cfa2aee6a7cae430fedddc6e7feef18c49da53ff Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 17 May 2025 13:54:06 -0700 Subject: [PATCH 2/3] Break up testing steps. Signed-off-by: Dan Schaper --- ftl-build/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ftl-build/Dockerfile b/ftl-build/Dockerfile index e8ac9c7..e4065b8 100644 --- a/ftl-build/Dockerfile +++ b/ftl-build/Dockerfile @@ -124,11 +124,11 @@ RUN sed -i '/buffer_with_truncation /d' /bats-core/libexec/bats-core/bats-format # Test compile FTL's development branch, the result is removed from the final container # Run the full test suite to ensure that the container is still capable of running the tests RUN git clone https://github.com/pi-hole/FTL.git --branch "${GIT_BRANCH}" \ - && cd FTL \ - && bash build.sh "-DSTATIC=${STATIC}" \ + && cd FTL + +RUN bash build.sh "-DSTATIC=${STATIC}" \ && readelf -A ./pihole-FTL \ - && readelf -l ./pihole-FTL \ - && bash test/arch_test.sh \ - && bash test/run.sh \ - && cd .. \ - && rm -r FTL + && readelf -l ./pihole-FTL + +RUN bash test/arch_test.sh \ + && bash test/run.sh \ No newline at end of file From 6692ac49fa65f10e4922b52023aa424bebaa50d1 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 17 May 2025 14:11:09 -0700 Subject: [PATCH 3/3] Set workdir for build and test, git clone to workdir. Signed-off-by: Dan Schaper --- ftl-build/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftl-build/Dockerfile b/ftl-build/Dockerfile index e4065b8..fb64c8b 100644 --- a/ftl-build/Dockerfile +++ b/ftl-build/Dockerfile @@ -123,8 +123,9 @@ RUN sed -i '/buffer_with_truncation /d' /bats-core/libexec/bats-core/bats-format # Test compile FTL's development branch, the result is removed from the final container # Run the full test suite to ensure that the container is still capable of running the tests -RUN git clone https://github.com/pi-hole/FTL.git --branch "${GIT_BRANCH}" \ - && cd FTL +WORKDIR /opt/FTL-build + +RUN git clone https://github.com/pi-hole/FTL.git --branch "${GIT_BRANCH}" . RUN bash build.sh "-DSTATIC=${STATIC}" \ && readelf -A ./pihole-FTL \