diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 9451f7b2..727f819d 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -17,13 +17,15 @@ concurrency: env: CI_CHUNK_SIZE: 288 + TOTAL_CHUNKS: 4 jobs: prepare: name: Prepare job runs-on: docker - outputs: - individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }} + strategy: + matrix: + chunk: [0, 1, 2, 3] steps: - name: Clone repo uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 @@ -31,11 +33,10 @@ jobs: ref: main token: ${{ secrets.BOT_PAT }} - - name: Get number of modules + - name: Run only for chunk ${{ matrix.chunk }} run: | - set -x - projects=(src/*/*) - echo "NUM_INDIVIDUAL_MODULES=${#projects[@]}" >> "$GITHUB_ENV" + echo "Processing chunk ${{ matrix.chunk }} of $TOTAL_CHUNKS" + ./split_test.sh ${{ matrix.chunk }} $TOTAL_CHUNKS # Temporary pause because of leak of tj-actions/changed-files # - name: Find lib changes @@ -62,20 +63,6 @@ jobs: # chmod +x ./.github/scripts/bump-versions.py # ./.github/scripts/bump-versions.py ${{ steps.modified-libs.outputs.all_changed_files }} - - id: generate-matrices - name: Create output matrices - uses: https://github.com/actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 - with: - script: | - const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES; - const chunkSize = process.env.CI_CHUNK_SIZE; - - const numIndividualChunks = 1; - - console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`); - - core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] }); - build_individual: name: Build individual modules needs: prepare