forked from Kohi-den/extensions-source
Update .github/workflows/build_push.yml
This commit is contained in:
parent
693421b355
commit
9c7557dc19
1 changed files with 7 additions and 20 deletions
27
.github/workflows/build_push.yml
vendored
27
.github/workflows/build_push.yml
vendored
|
@ -17,13 +17,15 @@ 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
|
||||||
outputs:
|
strategy:
|
||||||
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
|
matrix:
|
||||||
|
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
|
||||||
|
@ -31,11 +33,10 @@ jobs:
|
||||||
ref: main
|
ref: main
|
||||||
token: ${{ secrets.BOT_PAT }}
|
token: ${{ secrets.BOT_PAT }}
|
||||||
|
|
||||||
- name: Get number of modules
|
- name: Run only for chunk ${{ matrix.chunk }}
|
||||||
run: |
|
run: |
|
||||||
set -x
|
echo "Processing chunk ${{ matrix.chunk }} of $TOTAL_CHUNKS"
|
||||||
projects=(src/*/*)
|
./split_test.sh ${{ matrix.chunk }} $TOTAL_CHUNKS
|
||||||
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
|
||||||
|
@ -62,20 +63,6 @@ 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