Skip to content

Commit

Permalink
Experiment for splitting package list
Browse files Browse the repository at this point in the history
  • Loading branch information
grantnelson-wf committed Jul 10, 2024
1 parent 6c6bcf6 commit a5b6846
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5b6846

Please sign in to comment.