Fix compatibility issue with Cygwin sh

```
D:\a\_temp\00683b68-582f-4719-bd7a-9e98dd7975b7.sh: line 1: set: -
: invalid option
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
```
This commit is contained in:
Taiki Endo
2024-09-28 16:20:03 +09:00
parent 4a3cc43080
commit 942f3ad679
3 changed files with 42 additions and 15 deletions

View File

@@ -63,24 +63,30 @@ jobs:
bash: msys64
- os: windows-2022
bash: cygwin
- os: windows-2022
tool: major.minor.patch
- os: windows-2022
tool: major.minor
- os: windows-2022
tool: major
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- run: |
printf 'C:\msys64\mingw32\bin\n' >>"${GITHUB_PATH}"
printf 'C:\msys64\usr\bin\n' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\msys64\mingw32\bin' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\msys64\usr\bin' >>"${GITHUB_PATH}"
if: matrix.bash == 'msys64'
- run: |
choco install --no-progress --requirechecksums cygwin
printf 'C:\tools\cygwin\bin\n' >>"${GITHUB_PATH}"
printf 'C:\tools\cygwin\usr\bin\n' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\tools\cygwin\bin' >>"${GITHUB_PATH}"
printf '%s\n' 'C:\tools\cygwin\usr\bin' >>"${GITHUB_PATH}"
if: matrix.bash == 'cygwin'
- uses: taiki-e/checkout-action@v1
# 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 "${{ matrix.tool }}" >>"${GITHUB_OUTPUT}"
run: tools/ci/tool-list.sh "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.bash }}" >>"${GITHUB_OUTPUT}"
- run: env
- uses: ./
with: