mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-27 09:30:29 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07a34f8347 | ||
|
|
e626313db4 | ||
|
|
01c63d291f |
3
.github/.cspell/project-dictionary.txt
vendored
3
.github/.cspell/project-dictionary.txt
vendored
@@ -2,8 +2,10 @@ almalinux
|
||||
archlinux
|
||||
bindgen
|
||||
binstall
|
||||
choco
|
||||
coreutils
|
||||
cyclonedx
|
||||
cygdrive
|
||||
deepsource
|
||||
distro
|
||||
doas
|
||||
@@ -23,6 +25,7 @@ pwsh
|
||||
quickinstall
|
||||
rclone
|
||||
rdme
|
||||
requirechecksums
|
||||
sccache
|
||||
syft
|
||||
udeps
|
||||
|
||||
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
@@ -53,6 +53,11 @@ jobs:
|
||||
- os: macos-14
|
||||
- os: windows-2019
|
||||
- os: windows-2022
|
||||
# https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760
|
||||
- os: windows-2022
|
||||
bash: msys64
|
||||
- os: windows-2022
|
||||
bash: cygwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
@@ -62,6 +67,18 @@ jobs:
|
||||
- name: Generate tool list
|
||||
id: tool-list
|
||||
run: tools/ci/tool-list.sh "${{ matrix.tool }}" >>"${GITHUB_OUTPUT}"
|
||||
- run: |
|
||||
set -eEuxo pipefail
|
||||
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
|
||||
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
|
||||
if: matrix.bash == 'msys64'
|
||||
- run: |
|
||||
set -eEuxo pipefail
|
||||
choco install --no-progress --requirechecksums cygwin
|
||||
echo "C:\tools\cygwin\bin" >> $GITHUB_PATH
|
||||
echo "C:\tools\cygwin\usr\bin" >> $GITHUB_PATH
|
||||
if: matrix.bash == 'cygwin'
|
||||
- run: env
|
||||
- uses: ./
|
||||
with:
|
||||
tool: ${{ steps.tool-list.outputs.tool }}
|
||||
@@ -92,43 +109,7 @@ jobs:
|
||||
if [[ "$(cargo binstall -V)" != "$(jq -r '.latest.version' manifests/cargo-binstall.json)" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760
|
||||
test-msys64:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# - os: windows-2019
|
||||
- os: windows-2022
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
- run: |
|
||||
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
|
||||
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
|
||||
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
|
||||
- run: rm Cargo.toml
|
||||
- name: Generate tool list
|
||||
id: tool-list
|
||||
run: tools/ci/tool-list.sh >>"${GITHUB_OUTPUT}"
|
||||
- uses: ./
|
||||
with:
|
||||
tool: ${{ steps.tool-list.outputs.tool }}
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
|
||||
- name: Test bash
|
||||
run: just --version && shfmt --version && protoc --version
|
||||
shell: bash
|
||||
- name: Test pwsh
|
||||
run: just --version; shfmt --version; protoc --version
|
||||
shell: pwsh
|
||||
- name: Test powershell
|
||||
run: just --version; shfmt --version; protoc --version
|
||||
shell: powershell
|
||||
- name: Test cmd
|
||||
run: just --version & shfmt --version & protoc --version
|
||||
shell: cmd
|
||||
if: matrix.bash != 'cygwin'
|
||||
|
||||
test-container:
|
||||
strategy:
|
||||
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -10,9 +10,18 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.38.4] - 2024-06-11
|
||||
|
||||
- Workaround Cygwin bash's buggy behavior. ([#534](https://github.com/taiki-e/install-action/pull/534))
|
||||
This fixes an installation issue when default bash was overridden like the following:
|
||||
|
||||
```sh
|
||||
echo "C:\tools\cygwin\bin" >> $GITHUB_PATH
|
||||
```
|
||||
|
||||
## [2.38.3] - 2024-06-11
|
||||
|
||||
- Workaround msys64 bash's buggy behavior. ([#533](https://github.com/taiki-e/install-action/pull/533))
|
||||
- Workaround MSYS64 bash's buggy behavior. ([#533](https://github.com/taiki-e/install-action/pull/533))
|
||||
This fixes an installation issue when default bash was overridden like the following:
|
||||
|
||||
```sh
|
||||
@@ -2309,7 +2318,8 @@ Note: This release is considered a breaking change because installing on version
|
||||
|
||||
Initial release
|
||||
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.38.3...HEAD
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.38.4...HEAD
|
||||
[2.38.4]: https://github.com/taiki-e/install-action/compare/v2.38.3...v2.38.4
|
||||
[2.38.3]: https://github.com/taiki-e/install-action/compare/v2.38.2...v2.38.3
|
||||
[2.38.2]: https://github.com/taiki-e/install-action/compare/v2.38.1...v2.38.2
|
||||
[2.38.1]: https://github.com/taiki-e/install-action/compare/v2.38.0...v2.38.1
|
||||
|
||||
15
main.sh
15
main.sh
@@ -400,7 +400,7 @@ init_install_action_bin_dir() {
|
||||
}
|
||||
canonicalize_windows_path() {
|
||||
case "${host_os}" in
|
||||
windows) sed <<<"$1" 's/^\/c\//C:\\/; s/\//\\/g' ;;
|
||||
windows) sed <<<"$1" 's/^\/cygdrive\//\//; s/^\/c\//C:\\/; s/\//\\/g' ;;
|
||||
*) echo "$1" ;;
|
||||
esac
|
||||
}
|
||||
@@ -517,8 +517,17 @@ info "host platform: ${host_arch}_${host_os}"
|
||||
|
||||
home="${HOME}"
|
||||
if [[ "${host_os}" == "windows" ]]; then
|
||||
# https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760
|
||||
home="${home/\/home\//\/c\/Users\/}"
|
||||
if [[ "${home}" == "/home/"* ]]; then
|
||||
if [[ -d "${home/\/home\//\/c\/Users\/}" ]]; then
|
||||
# MSYS2 https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760
|
||||
home="${home/\/home\//\/c\/Users\/}"
|
||||
elif [[ -d "${home/\/home\//\/cygdrive\/c\/Users\/}" ]]; then
|
||||
# Cygwin https://github.com/taiki-e/install-action/issues/224#issuecomment-1720196288
|
||||
home="${home/\/home\//\/cygdrive\/c\/Users\/}"
|
||||
else
|
||||
warn "\$HOME starting /home/ (${home}) on Windows bash is usually fake path, this may cause installation issue"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
install_action_dir="${home}/.install-action"
|
||||
tmp_dir="${install_action_dir}/tmp"
|
||||
|
||||
Reference in New Issue
Block a user