From a5b684691dde740390a8f417d815c3c8beac9a4b Mon Sep 17 00:00:00 2001 From: Grant Nelson Date: Wed, 10 Jul 2024 12:26:50 -0600 Subject: [PATCH] Experiment for splitting package list --- .github/workflows/ci.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a01a53647..f69fa0b7d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -197,16 +197,19 @@ jobs: GOOS=js GOARCH=wasm go list std github.com/gopherjs/gopherjs/js/... github.com/gopherjs/gopherjs/tests/... \ | grep -v -x -f .std_test_pkg_exclusions \ ) + + echo "Packages to run:" ${PACKAGE_NAMES[@]} + PART_NUMBER=${{ matrix.part }} STRIDE=$((${#PACKAGE_NAMES[@]} / $NUMBER_OF_PARTS)) - OFFSET=STRIDE*$((${{ matrix.part }} - 1)) - if [ ${{ matrix.part }} -lt $NUMBER_OF_PARTS ]; then + OFFSET=STRIDE*$(($PART_NUMBER - 1)) + if [ $PART_NUMBER -lt $NUMBER_OF_PARTS ]; then PACKAGE_NAMES_FOR_PART=${PACKAGE_NAMES[@]:OFFSET:STRIDE} else PACKAGE_NAMES_FOR_PART=${PACKAGE_NAMES[@]:OFFSET} fi - echo "Packages for part #${{ matrix.part }}:" $PACKAGE_NAMES_FOR_PART + echo "Packages for part #${{ matrix.part }}:" ${PACKAGE_NAMES_FOR_PART[@]} gopherjs test -p 2 --minify -v --short $PACKAGE_NAMES_FOR_PART