Skip to content

Commit 160d0fe

Browse files
committed
iterate
1 parent 1c17b8d commit 160d0fe

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,22 @@ jobs:
8080
echo "Packages: $PACKAGES"
8181
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
8282
83-
- name: Configure environment for Windows
84-
if: matrix.os == 'windows-latest'
83+
- name: Install rust-parallel
8584
run: |
86-
# Install MSYS2
87-
choco install msys2 -y --no-progress
85+
mkdir -p "$HOME/.local/bin"
86+
87+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
88+
# Windows installation
89+
curl -L https://github.com/aaronriekenberg/rust-parallel/releases/download/v1.18.1/rust-parallel-x86_64-pc-windows-msvc.zip -o rust-parallel.zip
90+
unzip rust-parallel.zip -d "$HOME/.local/bin"
91+
else
92+
# Linux installation
93+
curl -L https://github.com/aaronriekenberg/rust-parallel/releases/download/v1.18.1/rust-parallel-x86_64-unknown-linux-gnu.tar.gz -o rust-parallel.tar.gz
94+
tar -xzf rust-parallel.tar.gz -C "$HOME/.local/bin"
95+
chmod +x "$HOME/.local/bin/rust-parallel"
96+
fi
8897
89-
# Install "parallel" utility
90-
C:\\tools\\msys64\\usr\\bin\\bash -lc "pacman -S --noconfirm parallel"
98+
echo "$HOME/.local/bin" >> $GITHUB_PATH
9199
92100
- name: Setup PHP
93101
uses: shivammathur/setup-php@v2
@@ -120,7 +128,7 @@ jobs:
120128
- name: Run packages tests
121129
run: |
122130
source .github/workflows/.utils.sh
123-
echo "$PACKAGES" | xargs -n1 | ${{ matrix.os == 'windows-latest' && 'C:\\tools\\msys64\\usr\\bin\\parallel' || 'parallel' }} -j +3 "_run_task {} \
131+
echo "$PACKAGES" | xargs -n1 | rust-parallel -j 3 -s -r '(.+)' "source .github/workflows/.utils.sh; _run_task {} \
124132
'(cd src/{} \
125133
&& $COMPOSER_MIN_STAB \
126134
&& $COMPOSER_UP \

rust-parallel.zip

1.32 MB
Binary file not shown.

0 commit comments

Comments
 (0)