Don't try to install musl-tools if it's already installed

This commit is contained in:
Dave Rolsky
2024-12-22 15:15:15 -06:00
parent a1777f5838
commit 718071590b
2 changed files with 18 additions and 1 deletions

View File

@@ -1,3 +1,15 @@
## 1.0.0
The addition of caching is a significant behavior change for this action, so the version has been
bumped to v1.0.0 because of this change.
- This action will now configure and use `Swatinem/rust-cache` by default for you. It will include
the `target` parameter as part of the cache key automatically. Suggested by @jennydaman (Jennings
Zhang). GH #23.
- This action now validates its input and will exit early if they are not valid. GH #35.
- When compiling for `musl` targets, this action will not try to reinstall the `musl-tools` package
if it's already installed.
## 1.0.0-beta1 - 2024-12-21
The addition of caching is a significant behavior change for this action, so the version has been

View File

@@ -111,7 +111,12 @@ runs:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install musl-tools on Linux if target includes "musl"
shell: bash
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
run: |
if dpkg -l musl-tools | grep -q "^ii\s*musl-tools"; then
exit 0
fi
sudo apt-get update --yes && \
sudo apt-get install --yes musl-tools
if: steps.determine-cross-compile.outputs.needs-cross != 'true' && contains(inputs.target, 'musl')
- name: Set build command
id: set-build-command