diff --git a/.github/workflows/build-src.yml b/.github/workflows/build-src.yml index 45411eaa51f5c..f7661d22ace68 100644 --- a/.github/workflows/build-src.yml +++ b/.github/workflows/build-src.yml @@ -28,16 +28,13 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 + fetch-depth: 50 - name: Initial setup id: setup run: | - git config --global --add advice.detachedHead false git config --global --add safe.directory "$PWD" - GIT_HEAD="$(git rev-parse HEAD)" - git checkout develop - git checkout "${GIT_HEAD}" + git fetch -fu origin develop:develop BUILD_TARGET="${{ inputs.build-target }}" source ./ci/dash/matrix.sh echo "HOST=${HOST}" >> $GITHUB_OUTPUT @@ -64,7 +61,7 @@ jobs: ${{ runner.os }}-${{ inputs.build-target }}-${{ steps.setup.outputs.HOST }} ${{ runner.os }}-${{ inputs.build-target }} - - name: Build source and run unit tests + - name: Build source run: | CCACHE_SIZE="400M" CACHE_DIR="/cache" @@ -73,6 +70,15 @@ jobs: BUILD_TARGET="${{ inputs.build-target }}" source ./ci/dash/matrix.sh ./ci/dash/build_src.sh + ccache -X 9 + ccache -c + shell: bash + + - name: Run unit tests + run: | + BASE_OUTDIR="/output" + BUILD_TARGET="${{ inputs.build-target }}" + source ./ci/dash/matrix.sh ./ci/dash/test_unittests.sh shell: bash