From 73b64e7c26c77e8d4bd2960e8ff31876340de17d Mon Sep 17 00:00:00 2001 From: Maxim Polyakov Date: Fri, 29 Oct 2021 01:25:02 +0300 Subject: [PATCH] ci: action: Build a cross compiler and RTEMS only when ... ...there is no external archive with RTEMS OS object files. This will reduce the testing time in github workflow Signed-off-by: Maxim Polyakov --- .github/workflows/action-build-all-i386.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action-build-all-i386.yml b/.github/workflows/action-build-all-i386.yml index e557a5a..3ba4198 100644 --- a/.github/workflows/action-build-all-i386.yml +++ b/.github/workflows/action-build-all-i386.yml @@ -39,10 +39,13 @@ jobs: echo ${osversion} echo "::set-env name=VERSION::$osversion" - name: 'Step 5: Build cross-tools ${{ env.RTEMS_ARCH }}/${{ env.RTEMS_BSP }}' - run: ./build.sh cross + run: | + tarball_path=$(bash ci/ci-import-rtems-tarball.sh --arch ${{ env.RTEMS_ARCH }} --bsp ${{ env.RTEMS_BSP }}) + [[ "${tarball_path}" == "does-not-exist" ]] && ./build.sh cross || tar -xvf ${tarball_path} -C rtems_rtos - name: 'Step 6: Build RTEMS ${{ env.VERSION }}' run: | - ./build.sh rtems + tarball_path=$(bash ci/ci-import-rtems-tarball.sh --arch ${{ env.RTEMS_ARCH }} --bsp ${{ env.RTEMS_BSP }}) + [[ "${tarball_path}" == "does-not-exist" ]] && ./build.sh rtems || echo "Image building is not required" pversion=$(bash ./ci/ci-generate-version.sh --arch ${{ env.RTEMS_ARCH }} --bsp ${{ env.RTEMS_BSP }} --branch ${{ github.head_ref }}) echo ${pversion} echo "::set-env name=VERSION::$pversion"