Description
We are in the process of migrating from GitHub's macos-latest
runners to self hosted runners running on Mac Minis. When we use the dart-lang/setup-dart
action now, the first run is fine, but from the second and onwards runs we run into the following issue.
Installing Dart SDK version "2.13.3" from the stable channel on macos-x64
12Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/2.13.3/sdk/dartsdk-macos-x64-release.zip...
13 % Total % Received % Xferd Average Speed Time Time Time Current
14 Dload Upload Total Spent Left Speed
15
16 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
17 0 183M 0 20786 0 0 74501 0 0:42:56 --:--:-- 0:42:56 74235
18 26 183M 26 48.2M 0 0 34.8M 0 0:00:05 0:00:01 0:00:04 34.8M
19 64 183M 64 118M 0 0 52.9M 0 0:00:03 0:00:02 0:00:01 52.8M
20100 183M 100 183M 0 0 58.6M 0 0:00:03 0:00:03 --:--:-- 58.6M
21replace /Users/runner/actions-runner/_work/_tool/dart-sdk/bin/dart? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
22(EOF or read error, treating as "[N]one" ...)
23Error: Download failed! Please check passed arguments.
24Error: Process completed with exit code 1.
TL;DR How do we use the dart-lang/setup-dart
properly, in combination with the tool cache and caching multiple dart versions. Maybe as a workaround we can just answer yes
instead of NULL
on the replace /Users/runner/actions-runner/_work/_tool/dart-sdk/bin/dart?
question?
More detail
I see this in setup.sh
Unzipping dartsdk.zip
into the RUNNER_TOOL_CACHE
directory
# Download installation zip.
curl --connect-timeout 15 --retry 5 "$URL" > "${HOME}/dartsdk.zip"
unzip "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null
Then appending to the GITHUB_PATH
# Update paths.
echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH
echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH
So this action is not doing anything with versioning or checking if the requested version is already installed, like we see done in flutter for example
/Users/runner/actions-runner/_work/_tool runner$ ls -l flutter/
total 0
drwxr-xr-x 4 runner staff 128B Jun 14 12:52 ./
drwxr-xr-x 6 runner staff 192B Jun 14 14:26 ../
drwxr-xr-x 4 runner staff 128B Jun 14 12:52 2.0.3-stable/
drwxr-xr-x 4 runner staff 128B Jun 14 09:54 2.2.1-stable/
/Users/runner/actions-runner/_work/_tool runner$ ls -l dart-sdk
total 40
drwx------ 10 runner staff 320B Jun 9 13:02 ./
drwxr-xr-x 6 runner staff 192B Jun 14 14:26 ../
-rw-r--r-- 1 runner staff 1.5K Jun 7 13:14 LICENSE
-rw-r--r-- 1 runner staff 981B Jun 7 13:14 README
drwx------ 14 runner staff 448B Jun 10 10:05 bin/
-rw-r--r-- 1 runner staff 189B Jun 9 13:02 dartdoc_options.yaml
drwxr-xr-x 9 runner staff 288B Jun 9 13:02 include/
drwxr-xr-x 28 runner staff 896B Jun 9 13:19 lib/
-rw-r--r-- 1 runner staff 41B Jun 9 13:02 revision
-rw-r--r-- 1 runner staff 7B Jun 9 13:02 version
Anybody else running into this?
Update: The https://github.com/cedx/setup-dart action doesn't have this issue, so reverting to that for now.