forked from Kohi-den/extensions-source
parent
23cb583570
commit
d7d802d165
1 changed files with 20 additions and 7 deletions
27
.github/workflows/build_push.yml
vendored
27
.github/workflows/build_push.yml
vendored
|
@ -17,15 +17,13 @@ concurrency:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CI_CHUNK_SIZE: 288
|
CI_CHUNK_SIZE: 288
|
||||||
TOTAL_CHUNKS: 4
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
name: Prepare job
|
name: Prepare job
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
strategy:
|
outputs:
|
||||||
matrix:
|
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
|
||||||
chunk: [0, 1, 2, 3]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||||
|
@ -33,10 +31,11 @@ jobs:
|
||||||
ref: main
|
ref: main
|
||||||
token: ${{ secrets.BOT_PAT }}
|
token: ${{ secrets.BOT_PAT }}
|
||||||
|
|
||||||
- name: Run only for chunk ${{ matrix.chunk }}
|
- name: Get number of modules
|
||||||
run: |
|
run: |
|
||||||
echo "Processing chunk ${{ matrix.chunk }} of $TOTAL_CHUNKS"
|
set -x
|
||||||
./split_test.sh ${{ matrix.chunk }} $TOTAL_CHUNKS
|
projects=(src/*/*)
|
||||||
|
echo "NUM_INDIVIDUAL_MODULES=${#projects[@]}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# Temporary pause because of leak of tj-actions/changed-files
|
# Temporary pause because of leak of tj-actions/changed-files
|
||||||
# - name: Find lib changes
|
# - name: Find lib changes
|
||||||
|
@ -63,6 +62,20 @@ jobs:
|
||||||
# chmod +x ./.github/scripts/bump-versions.py
|
# chmod +x ./.github/scripts/bump-versions.py
|
||||||
# ./.github/scripts/bump-versions.py ${{ steps.modified-libs.outputs.all_changed_files }}
|
# ./.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:
|
build_individual:
|
||||||
name: Build individual modules
|
name: Build individual modules
|
||||||
needs: prepare
|
needs: prepare
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue