From 249caaa7ff3c30164a586ceaf2f806cee6da1a26 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 10 May 2023 13:24:01 +0800 Subject: [PATCH 1/3] [script] serialize make all depedent targets to avoid ``make all`` bugs --- .github/workflows/build.yml | 35 +++++------------------------------ Makefile | 2 +- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4017fcaf5..e0cd7bc71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,15 +127,10 @@ jobs: - uses: hendrikmuhs/ccache-action@v1 - - name: checkout submodules - shell: bash - run: | - make checkout - - name: Build shell: bash run: | - make compile BUILD_TYPE=$BUILD_TYPE + make all BUILD_TYPE=$BUILD_TYPE # Check the cache size and see if it is over the limit - name: Check ccache size @@ -216,15 +211,10 @@ jobs: - uses: hendrikmuhs/ccache-action@v1 - - name: checkout submodules - shell: bash - run: | - make checkout - - name: Build shell: bash run: | - make compile BUILD_TYPE=$BUILD_TYPE CMAKE_FLAGS="${{ matrix.config.cmake_flags }}" + make all BUILD_TYPE=$BUILD_TYPE CMAKE_FLAGS="${{ matrix.config.cmake_flags }}" ubuntu_support: needs: change_detect @@ -262,15 +252,10 @@ jobs: - uses: hendrikmuhs/ccache-action@v1 - - name: checkout submodules - shell: bash - run: | - make checkout - - name: Build shell: bash run: | - make compile BUILD_TYPE=$BUILD_TYPE + make all BUILD_TYPE=$BUILD_TYPE debug_build: needs: change_detect @@ -315,15 +300,10 @@ jobs: - uses: hendrikmuhs/ccache-action@v1 - - name: checkout submodules - shell: bash - run: | - make checkout - - name: Build shell: bash run: | - make compile BUILD_TYPE=${{ matrix.config.build_type }} -j ${{ matrix.config.cores }} + make all BUILD_TYPE=${{ matrix.config.build_type }} -j ${{ matrix.config.cores }} - name: Quick Test shell: bash @@ -371,15 +351,10 @@ jobs: - uses: hendrikmuhs/ccache-action@v1 - - name: checkout submodules - shell: bash - run: | - make checkout - - name: Build shell: bash run: | - make compile BUILD_TYPE=${{ matrix.config.build_type }} -j ${{ matrix.config.cores }} CMAKE_FLAGS="-DOPENFPGA_ENABLE_STRICT_COMPILE=ON" + make all BUILD_TYPE=${{ matrix.config.build_type }} -j ${{ matrix.config.cores }} CMAKE_FLAGS="-DOPENFPGA_ENABLE_STRICT_COMPILE=ON" - name: Quick Test shell: bash diff --git a/Makefile b/Makefile index db960eb5b..d06031cf9 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ list_cmake_targets: prebuild # Show the targets available to be built, which can be specified through ``CMAKE_GOALS`` when compile cd ${BUILD_DIR} && make help && cd - -all: checkout compile +all: checkout | compile # A shortcut command to run checkout and compile in serial format-cpp: From 196ba1fe7f93a4080f035e1862df6b9f65355739 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 10 May 2023 13:48:43 +0800 Subject: [PATCH 2/3] [script] debugging --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d06031cf9..e9b5d808f 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ prebuild: echo "cd ${BUILD_DIR} && ${CMAKE_COMMAND} ${CMAKE_FLAGS} ${SOURCE_DIR}" && \ cd ${BUILD_DIR} && ${CMAKE_COMMAND} ${CMAKE_FLAGS} ${SOURCE_DIR} -compile: prebuild +compile: | prebuild # Compile the code base. By default, all the targets will be compiled # Following options are available # .. option:: CMAKE_GOALS @@ -75,11 +75,11 @@ compile: prebuild echo "Building target(s): ${CMAKE_GOALS}" @+${MAKE} -C ${BUILD_DIR} ${CMAKE_GOALS} -list_cmake_targets: prebuild +list_cmake_targets: | prebuild # Show the targets available to be built, which can be specified through ``CMAKE_GOALS`` when compile cd ${BUILD_DIR} && make help && cd - -all: checkout | compile +all: | checkout compile # A shortcut command to run checkout and compile in serial format-cpp: From 83218044f5a61081fd80e8242969efae63c75e99 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Wed, 10 May 2023 16:05:24 +0800 Subject: [PATCH 3/3] [script] debugging --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e9b5d808f..abb6e0760 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,9 @@ list_cmake_targets: | prebuild # Show the targets available to be built, which can be specified through ``CMAKE_GOALS`` when compile cd ${BUILD_DIR} && make help && cd - -all: | checkout compile +all: checkout # A shortcut command to run checkout and compile in serial + @+${MAKE} compile format-cpp: # Format all the C/C++ files under this project, excluding submodules